DAC not working on ZX24U

Discussion specific to the 24-pin ZX microcontrollers, e.g. ZX-24r, ZX-24s and ZX-24t.
Post Reply
icasey
Posts: 5
Joined: 13 June 2014, 22:03 PM

DAC not working on ZX24U

Post by icasey »

I've been trying to get the DAC working, I get no output at all on either pins 7 or 8. Any help would be appreciated.
Ian
Attachments
Dac_Test1.bas
(443 Bytes) Downloaded 447 times
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: DAC not working on ZX24U

Post by dkinzer »

icasey wrote:I get no output at all on either pins 7 or 8.
Confirmed. Working on a solution.

By the way, the DAC output is on pins 8 and 9 for channel 0 and 1, respectively.
- Don Kinzer
icasey
Posts: 5
Joined: 13 June 2014, 22:03 PM

Post by icasey »

Thanks Don,
It's been a while since I tried to program 1 of these modules.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

The xmega USB devices, like the ATxmega128A4U used on the ZX-24u, have two independent DAC channels. In contrast, the non-USB xmega devices have a single DAC that is shared for the two channels of each DAC. Consequently, configuring the DAC on a xmega USB device is slightly different from doing so on a non-USB xmega. That's why it isn't working.

I've uploaded v2.4.5 of the ZBasic Library for the xmega128A4U - the .zip file for it can be found at the link below. Extract the files from it, preserving the directories, to the zlib subdirectory of the ZBasic installation directory.

http://www.zbasic.net/download/zlib/4.2 ... 5_part.zip

Note that the "Dual Output" and "Automatic Refresh" bits are ignored for xmega-USB devices. Further, the third paragraph in the Discussion section of the OpenDAC() description should be ignored. Both of these are due to the fact that the DAC channels on xmega USB devices are completely independent.

Let me know how this works for you.
- Don Kinzer
icasey
Posts: 5
Joined: 13 June 2014, 22:03 PM

Post by icasey »

Don,
it is working good now !! Thanks again.
Post Reply