Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

8 bit PISO to 12 BIT DAC help please..

Status
Not open for further replies.

tigasi5

New Member
Hello,

I am creating a test fixture in which I have to control, provide input digital signal into a DAC LTC8043. This DAC outputs an Iout going to the inverting input of a LT1097(op amp) which is a current to voltage converter which provides a voltage going to a LED.

My problem is that I need to control this LED which involves providing the DAC with CLK, SRI (serial digital input), and LD (load) signals.

The DAC is a 12 bit DAC, serial input.

I have selected an 8 bit Parrallel In Serial out shift register where the parrallel bits are set via DIP switches either connected HI or LOW.

How are these bits loaded into the PISO ?.

How can I load the serial output from the PISO into the DAC ?

What kind of CLK is needed ?

Also another question is:

With 8 bit serial input to the 12 bit DAC, will there be any issue with the last 4 bits in the DAC ?? Will these 4 bits become dont cares ?. Or does the DAC need exactly 12 bit input ?

Please help.
Thanks in advance for any help on this..Greatly appreciate it.
 
Hello,

I am creating a test fixture in which I have to control, provide input digital signal into a DAC LTC8043. This DAC outputs an Iout going to the inverting input of a LT1097(op amp) which is a current to voltage converter which provides a voltage going to a LED.

My problem is that I need to control this LED which involves providing the DAC with CLK, SRI (serial digital input), and LD (load) signals.

The DAC is a 12 bit DAC, serial input.

I have selected an 8 bit Parrallel In Serial out shift register where the parrallel bits are set via DIP switches either connected HI or LOW.

How are these bits loaded into the PISO ?.

How can I load the serial output from the PISO into the DAC ?

What kind of CLK is needed ?

Also another question is:

With 8 bit serial input to the 12 bit DAC, will there be any issue with the last 4 bits in the DAC ?? Will these 4 bits become dont cares ?. Or does the DAC need exactly 12 bit input ?

Please help.
Thanks in advance for any help on this..Greatly appreciate it.

hi,
This image clip from the datasheet explains the 3 wire control required.

Using only 8 clocks will only output the 8 MSB's of the 12 bit data value.

Also 8 bits will not 'flush' thru the residual 4 bits from the previous conversion.

Use two 8 bit S/R's, to give12 clock pulses and a 13th /LD pulse.

OK.?
 

Attachments

  • AAesp02.gif
    AAesp02.gif
    33.2 KB · Views: 297
Last edited:
Hi ericgibbs, Thanks for the reply.

I'm not a digital engineer and don't know how to go about this. How would I setup the 8 bit PISO's ? for the CLK, SRI, and LD to the DAC ?

Since its a test fixture, I guess the operator would toggle a switch to load the 12 bits, and LD into the PISO and DAC ?

Please advise.

Thanks again.
 
I'm not a digital engineer and don't know how to go about this. How would I setup the 8 bit PISO's ? for the CLK, SRI, and LD to the DAC ?
I don't understand, what exactly are you testing here? Are you testing to confirm that the 8 data bits are correct? Why would you want to modulate an LED, this would not be a very good test? Why not write the data bits to a register and then read back the register? Is this for a board functionality test, what are you trying to do? Is this for class or work?
 
Basically, the DAC and LED are on a board. I need to create a functional test for this function to basically turn on the LED. I cannot change the DAC or the way the LED is hooked up on the board. All I can do is to create external circuitry that will turn on off the LED.

With that said: I have an external breadboard and connectivity to the DAC lines.

My problem is that my background is not digital and I'm not sure how to load the serial 12 bit data, CLK, and LD for the DAC.

I thought about having 8 DIP switches (connected to Vcc or GND) and input to a 8 bit parrallel in serial out 74LS165, serial output going directly to the DAC serial input..

I think this will work, but I am not sure if the DAC needs exactly 12 bits to output a current. Will the DAC still output a current if the input is say 8 bits ?? Its a 12 bit DAC.

For my functional test, I just need the DAC to output a current, whether it can work with 8 bit input or not, I'm not sure.


Thanks.
 
Okay, that clarifies things. Maybe you could simply use a counter like a 74hc161 to generate LD (using invert of counter terminal count) on the 12th clock. For the data line use a switch that is either +5v or 0v in essence you clock all 0's or all 1's. LED will either be on or off. That would give you a general idea of functionality. Actually you don't even need to set the counter for 12 bits, just let it generate Terminal count at 16 clocks. Since data is all 1's or all 0's it is a don't care about the extra clocks. I think that would work.
See attached below.
Oh, and R1 on schematic is not needed.
 

Attachments

  • SPIload.gif
    SPIload.gif
    5.1 KB · Views: 226
  • spiwfrm.gif
    spiwfrm.gif
    9.3 KB · Views: 264
Last edited:
Thanks Mike.. How would I load the data lines serially ?..Its a serial input DAC. Can I use the 8 bit PISO mentioned earlier (74165 to generate 8 bit serial out). The counter looks like it will load the serial data at every 16th clock.

Also, how are the CLKs tied between the 74165, 74161 and the DAC( LTC8043) ?..

Another approach I was thinking of is: Can I use a one shot 74123 input tied to a switch (connected Vcc or GND) Output going to CLK of DAC. The user would toggle the switch to send 12 clocks.

Another toggle switch for the serial data in (connected Vcc or GND) connected to the input of a 7414, output going to the serial data input of the DAC. The user would toggle the switch 12 times to load 12 bits into the serial in of DAC.

And another switch connected the in the same way as the data in, but only toggled when the 12 CLK, 12 data inputs are done to load the data into the DAC..

Will this work ??
 
Thanks Mike.. How would I load the data lines serially ?..Its a serial input DAC. Can I use the 8 bit PISO mentioned earlier (74165 to generate 8 bit serial out). The counter looks like it will load the serial data at every 16th clock.

Also, how are the CLKs tied between the 74165, 74161 and the DAC( LTC8043) ?..

Another approach I was thinking of is: Can I use a one shot 74123 input tied to a switch (connected Vcc or GND) Output going to CLK of DAC. The user would toggle the switch to send 12 clocks.

Another toggle switch for the serial data in (connected Vcc or GND) connected to the input of a 7414, output going to the serial data input of the DAC. The user would toggle the switch 12 times to load 12 bits into the serial in of DAC.

And another switch connected the in the same way as the data in, but only toggled when the 12 CLK, 12 data inputs are done to load the data into the DAC..

Will this work ??

hi,
Do you have a PC with a parallel port, if not an RS232 port.??
 
Thanks Mike.. How would I load the data lines serially ?..Its a serial input DAC. Can I use the 8 bit PISO mentioned earlier (74165 to generate 8 bit serial out). The counter looks like it will load the serial data at every 16th clock.

Also, how are the CLKs tied between the 74165, 74161 and the DAC( LTC8043) ?..

Another approach I was thinking of is: Can I use a one shot 74123 input tied to a switch (connected Vcc or GND) Output going to CLK of DAC. The user would toggle the switch to send 12 clocks.

Another toggle switch for the serial data in (connected Vcc or GND) connected to the input of a 7414, output going to the serial data input of the DAC. The user would toggle the switch 12 times to load 12 bits into the serial in of DAC.

And another switch connected the in the same way as the data in, but only toggled when the 12 CLK, 12 data inputs are done to load the data into the DAC..

Will this work ??

No, you don't need a shift register at all. You simply use the circuit I showed to shift in all 1's or 0's. See attached below. Just hook up as shown in diagram directly to LTC8043 pins. I think I see what Eric is suggesting and using the PC is probably a better way to go so I this is schematic is just for your reference.
 

Attachments

  • counter.png
    counter.png
    3.5 KB · Views: 344
Hello Mike, thanks for the reply, really appreciate it.

One question I have is that will there be an issue with the data being loaded into the DAC (one bit per CLK pulse aligned with either rising or falling edge) as the CLK is much faster than the user toggling the switch ?

Also, how does the RCO load to the DAC work ?

Also, for all these signals (CLK, DATA, LD)there is a optoisolator on the board HCPL063 before the DAC.

Sorry for asking such basic questions..
 
Hi Mike,

I was also thinking about a set of 12 pre-set DIP switches for the data lines (set Hi or Low). Is there a way to design this so as to avoid the user toggling the data switch 12 times to get 12 pulses into the DAC ??

Thanks again.
 
Hi Mike,

I was also thinking about a set of 12 pre-set DIP switches for the data lines (set Hi or Low). Is there a way to design this so as to avoid the user toggling the data switch 12 times to get 12 pulses into the DAC ??

Thanks again.

You seem to be missing the scheme. The user would not need to flip the switch 12 times. User either sets switch in 1 position or the other. LED either on or off. Essentially you clock in 12 zero's or 12 ones. No real timing issues to worry about.
I really think Eric's idea of using a PC will be the way to go as it will give you much more flexibility and can be used for large portion of your board test. Of course this may require some software and hardware. Have to wait and see what Eric suggest.
I have to leave in about 30 mns for a 10 hr shift at the hospital so hopefully Eric will chime in for you...
 
Thanks Mike, I got it now. Was just a little confused. Instead of the CLK oscillator, I am planning on using a 74123 one shot to make a clock. Will that be ok ?

Also, the 74161 count will be changed from 4 to 15. Will that be an issue ?

Everything else will be as shown in your schematic.

Thanks for all your help..
 
Hello, Yes I do have a PC with a parrallel port, serial RS 232 as well.

hi,
A simple solution would be to write a short program for the PC and drive the adc via the PC's parallel port.

If you kept the PC wires short to the adc pcb, say about 1mtr or less, all you would require is three control wires and a 0v wire.

If this option is acceptable, let me know, I could write you a test program in a couple of days.
 
Hello Eric, Thanks. Please I would like to know how the program is written. This option is available.

I built the circuit from Mike and it works. However when turning off the LED, it goes dim, not fully turning OFF. I think there may still be some constant current from the DAC keeping the LED slightly dim.

Thanks.
 
Hello Eric, Thanks. Please I would like to know how the program is written. This option is available.

I built the circuit from Mike and it works. However when turning off the LED, it goes dim, not fully turning OFF. I think there may still be some constant current from the DAC keeping the LED slightly dim.

Thanks.

hi,
I thought you had solved the problem using hardware, give me a couple of days and I will post a simple test exe.

Download and install from the web the free Visual Basic runtime files, your PC may already have them installed.?
 
hi,
Download this ParaShift1. exe file.
Ensure that you have the VBasic runtime files in the Windows/System folder on the PC's hard drive.
If using Windows XP you may require the inpout.dll.

The PC's parallel ports are allocated as:-
Pin #2, Clock
Pin #3, Data
Pin #4, Load
Pins #18/25 0V/Common

Added image.
 

Attachments

  • ParaShift1.exe
    27 KB · Views: 114
  • AAesp04.gif
    AAesp04.gif
    5.4 KB · Views: 164
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top