Searching \ for ' PIC UNUSUAL D/A APPLICATION' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=d%2Fa
Search entire site for: 'PIC UNUSUAL D/A APPLICATION'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] PIC UNUSUAL D/A APPLICATION'
2001\08\29@204012 by tim

flavicon
face
I have 50 seperate logic lines  that switch in sequence from # 1 to # 50 then reverse from # 50 to # 1
at any one time only one line is in a low state  and all others are high state. what I need is an analog output
voltage generated from the pic in response to which switched line is enabled.
example:

max reference voltage output is 1 volt at line 50 switched on.  half of the reference voltage is 500 mv at line 25 switched on.
each switched line represents a 20 mv  change in output voltage.
 these parameters are not set in stone and the analog reference voltage could
change if it made code and chip selection easier.

any thoughts on which pic chip to use  as i have not bought any chips yet.
is there a simple  mixed signal  or  d/a chip that will do this instead of using a pic chip?
it seems that this type of digital line switching (single line enabled only ) to generate an analog voltage is really not what the D/A chips do that are
presently out there on the market. well as easy as this application seems to be
i want to ask before  i begin  re-inventing  sliced bread....

thanks alot  for reading this and all comments and suggestions welcome         tims 800

 
--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2001\08\30@091713 by Douglas Butler

flavicon
face
My first thought would not be to use a processor at all.  I would run
the 50 inputs to 50 open collector buffers pulling down a resistor
network.  Something like a R2R network but it might be simpler as you
don't have to distinguish when multiple lines are low together.  Finally
use an op amp to buffer and filter the output.

Sherpa Doug

> {Original Message removed}

2001\08\30@093643 by Mr MCU

flavicon
face
Hi Tim,

There are a bunch of methods to do want you want.  The first task is to be able to detect the 50 inputs.  You could use
a big micro (lots of I/O) or mux them with shift regs, muxes, etc.  I probably would use six (48 lines plus 2 for the
micro to read directly) or seven (56 inputs) CD4021, as they are cheap and only require 3 lines to the processor.

As far as making the voltage, you could then use the micro to drive a DAC (there are many), or for a cheap route out,
make a DAC in software via PWM.  There are lots of app notes on PWMs.

Since you need 50 steps of voltage, a 7 bit DAC (128 steps) should be plenty.  The PWM route; however, gives you about
the rail voltage of the micro as the top voltage, so you would need to scale the output by using a simple resistor
voltage divider.  So if the micro ran on a stable 5 volt line, the highest output would be 5 volts (you can adjust the
power supply voltage) then the voltage divider as 5:1 would give you a max 1 volt output.  Each of the 7 bit steps would
be approx 7.8 mv (1V / 128), so 3 steps would give you appx 23.4 mv.  By reworking the number of bits (leaving one bit
extra for easy stability) and the supply voltage, you should be able to get the voltage step size that you want.

As far as the micro goes, use whatever you have and can write code for, you could do it with just 4 lines to the micro!

- Mike



tim wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\08\30@144136 by Bob Buege

flavicon
face
At 09:07 AM 8/30/2001 -0400, you wrote:
My first thought would not be to use a processor at all.  I would run
the 50 inputs to 50 open collector buffers pulling down a resistor
network.  Something like a R2R network but it might be simpler as you
don't have to distinguish when multiple lines are low together.  Finally
use an op amp to buffer and filter the output.

Sherpa Doug

Since the lines are fired in a fixed sequence one at a time, it might be easier to just put open collector buffers on the odd numbered inputs and tie all outputs together. This will give a single input that tells whether the line number is even or odd and the processor can count up or down every time the even/odd line changes. Line 1 and 2 could be tied  to additional inputs in order to allow the processor to lock onto the line number and determine whether to count up or down. The processor would not be able to determine the line number and direction until the line number reaches line 1 or 2, but this may be acceptable if this is a case where the processor can be programmed to not do anything until after a lock has occurred.

Bob Buege

-- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2001\08\30@154014 by Bob Buege

flavicon
face
I previously wrote:

Since the lines are fired in a fixed sequence one at a time, it might be easier to just put open collector buffers on the odd numbered inputs and tie all outputs together. This will give a single input that tells whether the line number is even or odd and the processor can count up or down every time the even/odd line changes. Line 1 and 2 could be tied to additional inputs in order to allow the processor to lock onto the line number and determine whether to count up or down. The processor would not be able to determine the line number and direction until the line number reaches line 1 or 2, but this may be acceptable if this is a case where the processor can be programmed to not do anything until after a lock has occurred.

This can be further simplified by making your own buffer. Just put a diode from each odd line to a common point and tie that point to the base of a transistor through a current limiting resistor. Add a pull up resistor to the collector and run the output into the I/O port of your processor.

This is incorrect. I misread the original problem and gave a design for a buffer that assumed a positive signal from the active line. Since the active line goes negative, you will have to install the diodes with the cathodes connecting to the lines and the anodes tied to a common point. A pull up resistor will also be tied to the common point. The common point will be tied to the base of a transistor through another diode. The pull up resistor will limit the current to the base of the transistor so a separate current limiting resistor is not needed. The diode from the common point to the base of the transistor will raise the turn on threshold of the transitor to 1.4 volts. If the lines don't go all the way to ground when active, it may be necessary to use 2 diodes between the common point and the base.

Bob Buege


-- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2001\08\30@184639 by Steven Bakaletz

flavicon
face
Since this is a PIC group I'll use PICs.  I would use a PIC12C508A ($.97 ea
25 quanity at http://www.digikey.com ).  It has 6 I/O lines,
5 to monitor 5 lines and 1 to output data (10 for 50 lines).  Each would
poll the 5 lines for a change of state, and if need be do debounce.
When valid data is found an offset is added (0,5,10 -- ect) the one line for
output data is changed from an input to an output and
the switch number serially bit-banged out.  The output data line is changed
back to input when done.

The 10 Line monitoring PICs output data lines are connected together and
feed the input of the 11th PIC.  This PIC recieves
the serial data from the outher 10 and does any processing (checksum,
multiple inputs slected).

The 11th PIC can now output the data to:
1.) an A/D converter
2.) use the PIC to generate a analog voltage
www.microchip.com/Download/appnote/category/17cxx/misc/00538c.pdf
3.) display digitally (LED) , my preference.

Since the PIC12C508A has an internal osc part count is low.  You assign the
I/O pins in software, board layout is easy.
Only need 3 lines common to the 10 Segment PICs (5V,Gnd,Data Out).  The code
for the 10s are the same except for
the offset value, so its easy to write, debug and test.



>I have 50 seperate logic lines  that switch in sequence from # 1 to # 50
then reverse from # 50 to # 1
>at any one time only one line is in a low state  and all others are high
state. what I need is an analog output
>voltage generated from the pic in response to which switched line is
enabled.
>example:

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...