Shop OBEX P1 Docs P2 Docs Learn Events
Using DAC with Basic Stamp — Parallax Forums

Using DAC with Basic Stamp

UmairUmair Posts: 3
edited 2008-05-11 02:49 in BASIC Stamp
Hi,

I am working on a project where I have to use analog to digital(AD) as well as DAC with the basic stamp. In order to become familiar with these chips, I am putting a sine wave(analog signal) into my AD chip using shiftin command. I then send this serial data to DAC using shiftout command of bs2. for some reason, I do not get any output from· DAC. Any suggestions will be greatly appreciated. I am using analog devices chips AD7893-10 for AD and AD7233 for DAC. Both are bipolar voltage with·serial interface which should the make program easier to use.

Umair

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-10 14:04
    You will need to post your schematic and your program as attachments to a message. This should work, so there must be something about your program or setup that's not right.
  • UmairUmair Posts: 3
    edited 2008-05-10 23:46
    Thanks so much Mike. Here is the program and the schematic that I am using. I suspect there is a problem with my DAC( either code or the connection to BS2).
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-11 01:22
    First thing I saw: You have the statement "HIGH LDAC" with the comment "Tied permanently low for automatic update" which is exactly opposite of what the statement really does. Your statement should be "LOW LDAC".

    Similarly, you have the SYNC and SCLK signals backwards. You should initialize SYNC to high and SCLK to high at the beginning of your program. When you want to send a value to the DAC, you should do a "LOW SYNC" and let the SHIFTOUT do all the SCLK manipulation, then do a "HIGH SYNC".
  • UmairUmair Posts: 3
    edited 2008-05-11 02:49
    Thanks for replying Mike. I guess I got confused with the logic of LDAC which is active low. That is why to make it a "low", I send a high signal to LDAC. Is this concept right? Your explanation on this can definitely clear my understanding of negative logic concept.

    I think my SYNC configuration is also a result of this confusion. Furthermore, It is good to know that shiftout command takes care of the SCLK. Thank you so much for looking into this problem. I will try with your modifications and let you know the result.
Sign In or Register to comment.