Using DAC with Basic Stamp
Umair
Posts: 3
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
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
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".
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.