View previous topic :: View next topic |
Author |
Message |
aaronik19
Joined: 25 Apr 2011 Posts: 297
|
Auto increment/decrement of value in DAC |
Posted: Tue Jul 02, 2013 3:53 pm |
|
|
Do someone know about an i2c DAC which accepts command to start decrease the value automatically and just after reached the needed value, another command will stop the process ? The same process will be done to increase the value?
Thanks |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Wed Jul 03, 2013 2:58 am |
|
|
Just use a PIC......
I doubt if anyone would have done something so special and 'odd'. A lot depends on what you actually 'want' from the DAC. You could (for instance), use one of the basic 8pin PIC's with internal clock, I2C, and PWM, and synthesise a DAC with the latter (assuming reasonable output filtering). However if you require a genuine 'resistive' DAC, without the noise problems associated with PWM, then you have to go a little more 'up market', on the PIC. PIC16F1782, gives MSSP, DAC, and internal oscillator, so can do this easily.
Best Wishes |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Wed Jul 03, 2013 3:55 am |
|
|
I agree with Ttelmah.
Think about it.
With your scheme you have to monitor the DAC to know when to tell it to stop ramping.
You have to send two commands anyway, so why not send:-
1) End value you want ramp to stop at.
2) Rate at which to ramp.
Using a PIC, the target works out which way to ramp, then gets on with it.
Mike |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Wed Jul 03, 2013 7:15 am |
|
|
Even better, you could upload a table of output values, and a speed, and leave it to synthesise a waveform for you....
Best Wishes |
|
|
oxo
Joined: 13 Nov 2012 Posts: 219 Location: France
|
|
Posted: Wed Jul 03, 2013 9:32 am |
|
|
Ttelmah wrote: | Even better, you could upload a table of output values, and a speed, and leave it to synthesise a waveform for you....
Best Wishes |
Or do it in hardware.
A oscillator, a binary counter, an R-2R network, a buffer amp. Et voila! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Wed Jul 03, 2013 12:31 pm |
|
|
A counter generally costs more than a PIC these days....
Thing is you can add so much extra if you want. Auto stop at a programmed level, variable rate, etc., much cheaper with the processor.
It's terrible, but a simple CMOS divider costs more than a processor.
Best Wishes |
|
|
aaronik19
Joined: 25 Apr 2011 Posts: 297
|
|
Posted: Wed Jul 03, 2013 3:24 pm |
|
|
in one of the forums I read about a PCA9685 16 channel PWM. Infact at the end I need about 8-10 channels of PWM. But following your comments I can have one PWM and a multiplexer to feed those channels. Right?
I think that the problem is that the PIC must handle other operations in parallel with PWM. It is going to have also RTC and RS485 where the latter one will be busy very frequently. That's why I am looking for a DAC which the PIC must give one start and stop commands. I had already made PWM where I have a counter looping and on every overflow, it will adjust the PWM accordingly. But these will compromised the RTC and RS485 |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Wed Jul 03, 2013 5:38 pm |
|
|
Quote: | I can have one PWM and a multiplexer to feed those channels. Right? |
NO NO NO!!
If you believe that, you are in way over your head logically
NOT TRUE unless you are cool with only modulating ONE channel at a time and then having all the other channels with NO PWM drive at all.
--------------------------
all i see in the OP is TALK and wishful thinking to get somewhere ,
BUT there is more needed from YOU!
got a design schematic , at ANY level of function?
got any CODE to begin the core of the project?
got ANYTHING to SHOW, beyond your partially defined goals?
There is just not enough effort on your part exhibited yet
to get started with a framework for what you seek.
Honestly, without more of a sense of how to go about this project
( which is so loosely described as to be incoherent)
how is anybody going to know where to start?
( when you don't seem to know yourself) |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Fri Jul 05, 2013 2:10 pm |
|
|
aaronik19 wrote: | I can have one PWM and a multiplexer to feed those channels. Right? |
asmboy is mostly right. It depends on what you want the channels to do when they are not selected. If you just use a digital multiplexer the non-selected channels will all go to zero or to full depending on how you wire things. That might be what you want. Or you could use analog track-and-hold circuits to hold the non-selected channels at stable voltages but the cost and complexity will be high.
We really don't know enough about your application to help you further. You have to give us more to work with. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|