74LS193 working issue

Akat

New Member
hi guys,

im running out of pin now from my PICAXE (40x1).. i wanna do DAC using DAC0800.. ive tried MAX518 but i found it quite slow, so due to my problem lack of pin, so i'm deciding to use counter up/down using two 74LS193.. and it need only 3 pins (instead of 8 if i convert to use DAC0800) to count the MSB and LSB and then output from 74LS193 will be fed into DAC.. the only problem here is at the code... how do i separate that MSB and LSB and send it over to 74LS193??? is it binary or serial? mind to share a little code here?
 

moxhamj

New Member
Lots of questions here and maybe the 193 isn't the best chip, but I guess you would do a master reset then count up or count down. That will use 3 pins.

How many pins have you got left? How many have you used and do all of those ones have to run fast? I ask because if you have some leds you are lighting then you could use 3 pins to drive two HC595s in series to get 16 slow outputs, and then free up lots of pins.

Also how many bits is the DAC. Is it 8, 10 or 12 or something else?

And how fast does the DAC have to run?

If you can provide a bit more detail I think lots of people here will come up with all sorts of clever solutions!
 

Akat

New Member
i just got 4 free pins now... and the DAC0800 is 8 bit.. DAC have to run really fast as fast as the data comes in, when i used MAX518, the code to implement the i2c in rough ways is making it slow and quite not telly with the data the comes in.. what i'm doing here is delta voltage adjustment, imagine like this:

5V ----> PIXACE[ADC (255) > codes (204)] ----> DAC ----> 4V

and the analog data that feed into PICAXE is quite fast in movement, the up and and down is unpredictable in waveform like.. so the data should be out in rapid also, otherwise the voltage out will be slightly shifted out from realtime.. if the data shifted in a approx. 0.1 sec is still can be forgiven, but sometimes when i used MAX518, the late sometimes reach up to 1 sec..
 

BCJKiwi

Senior Member
A few options to speed up the process with the Max518;
Raise the clock speed of the PICAXE 40X1
Run hardware i2c instead of bitbang (unless you are already doing that)
Run the i2c bus fast instead of slow (unless you are already doing that)
Optimise the code - what else do you have in the loop?
Can the i2c be separated from the loop?

Perhaps posting the code might be in order if you are able - the brains trust might be able to suggest some speedup options.

I don't see why this should be so slow (unless there is a whole lot of other stuff happening in the loop).
Have code sampling a number of devices, outputting to a number of I/O expanders and still logging to an SD card at over 10 times per second. 28X1 at 16MHz and i2cslow bus.
So I'm sure there is something that could be done for you.
 
Top