Shop OBEX P1 Docs P2 Docs Learn Events
Using the LTC1298 DAC with the BAS2p stamp — Parallax Forums

Using the LTC1298 DAC with the BAS2p stamp

Hi, I am trying to figure out how to hook up the DAC with my board. Specifically, is the clock pin on the DAC for input or output? What should I do with it? Is there a pin on the stamp that it should go with?

Thanks
Z

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-01 14:25
    Hello,

    ·· The Clock Pin on that chip is an input which is driven by the BASIC Stamp when using the SHIFTOUT command.· If you look up the SHIFTOUT command in the BASIC Stamp Manual or the Editor Help File you will see how the pins are used.· You could also check this older AppNote for information specific to this chip as well as the N&V article.· I hope this helps.

    http://www.parallax.com/dl/docs/prod/appkit/ltc1298.pdf

    http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv4.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • edited 2006-06-01 15:27
    Thank you very much for the fast response. Now I see in some of the pictures in the manual I see that in some cases pin 1 of the ADC is tied to a basic stamp pin, and in other cases, it is a reference voltage, tied to the 5 V regulated. Which should I use? I am trying to use this to convert a 0-5V Analog signal into digital.

    Thanks
    Zak
  • edited 2006-06-01 16:01
    Also, the manual seems to say on page 10 that the max value for the difference between supply voltage and analog is .3 V, however I am able to run the program on pages 7-8 and see voltages between 0 and 4.9, with 4.9 being in the condition of approaching the supply voltage. Is there a problem with this? Also, eventually I will want to measure between -5 and 5 volts. will I be able to do this by using a ground reference voltage and a supply voltage of 5?

    Thanks
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-01 16:22
    Hello,

    ·· You might want to have a look at the datasheet for this device.· What that .3V refers to is how much higher than the supply voltage the input voltage can be.· So if you're powering the chip from 5V you cannot exceed 5.3V on the inputs without damaging the chip.· That does not affect you 0-5V range.· Measuring negative voltages gets a little trickier dpending on the relationship·of the ground to the circuit, you are measuring.· Still, that is a 10V span which is outside the range of the device.· I would recommend searching Google for circuit to do this.· They will likely be very similar and since you're trying to do both negative and a large range you will likely want to familiarize yourself with how that all works.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • edited 2006-06-01 18:37
    Thank you for the information, I have located another part with the same pinout and 10V range.

    Now I have a question about using the LCD display, its the 2x16 version with 5 pins. I am having difficulty just displaying a 4 digit number. The number is stored in a VAR of Word type.

    Right now I am using the following instruction to print this variable:
    DispBaud  CON 19200
    DispPin CON 15
    DispOn CON $22
    SEROUT DispPin, DispBaud, [noparse][[/noparse]DispOn]
    SEROUT DispPin, DispBaud, [noparse][[/noparse]"Voltage: ", STR AD]
    
    



    Where AD is the variable, set to some number like 4000, . Any suggestions? This prints a \ on the screen and nothing else.

    Thank you,
    Zak
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-01 19:39
    Zak,
    ·· Try using the DEC modifier to display the value.· It appears you have a serial display, so referring to your code you would use:
    DispBaud  CON 19200
    DispPin CON 15
    DispOn CON $22
    SEROUT DispPin, DispBaud, [noparse][[/noparse]DispOn]
    SEROUT DispPin, DispBaud, [noparse][[/noparse]"Voltage: ", DEC4 AD]
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.