ADC0831 replaced with ADC0804
hsiaochung
Posts: 17
· In Stamp in class ==> Basic analog and digital
· chapter 3 basic analog to digital conversion , PL3_1R0.bs2
· I want to replace ADC0831 with ADC0804
· Could anyone give me a schematic and basicstamp program
· thanks for anyone
· Hsiaochung Liu
· chapter 3 basic analog to digital conversion , PL3_1R0.bs2
· I want to replace ADC0831 with ADC0804
· Could anyone give me a schematic and basicstamp program
· thanks for anyone
· Hsiaochung Liu
Comments
·· The ADC0831 is a synchronous serial device (3 pins to interface), however, the ADC0804 is a parallel device, requiring more than 8 pins to interface.· I don't think anyone's going to have any pre-written code to do that.· You may have to work that one out based on the datasheet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
· bs2 with lm335 temp sensor and adc0804 need help writing a program
I found it on Google with this search term:
· ADC0804 site:forums.parallax.com
I like Google-ing forums, because if the answer is already there, I don't have to wait for people's replies.·
Post Edited (Andy Lindsay (Parallax)) : 6/28/2005 7:31:52 PM GMT
·According your advice
·Following is the ADC 0804 with BS2 Schematic
··· ADC 0804·············· BS2
[font=æ°ç´°æé«]··········· · CS => Vss[/font]
[font=æ°ç´°æé«]············· RD => Vss[/font]
[font=æ°ç´°æé«]· WR / INTR =>·Pin8[/font]
[font=æ°ç´°æé«]····· ·CLK IN => Vss[/font]
[font=æ°ç´°æé«][/font][font=æ°ç´°æé«]········· Vin(+) => Pot of 100K Ohm[/font]
[font=æ°ç´°æé«]······· · Vin(-) => Vss[/font]
[font=æ°ç´°æé«]···· · A GND => Vss[/font]
[font=æ°ç´°æé«]····· VREF/2 => No Connect[/font]
[font=æ°ç´°æé«]···· · D GND => Vss[/font]
[font=æ°ç´°æé«]········· · Vcc => Vdd[/font]
[font=æ°ç´°æé«]····· · CLKR => Vss[/font]
[font=æ°ç´°æé«]······ DB0 => Pin 0[/font]
[font=æ°ç´°æé«]······ DB1 => Pin 1[/font]
[font=æ°ç´°æé«]······ DB2 => Pin 2[/font]
[font=æ°ç´°æé«]······ DB3 => Pin 3[/font]
[font=æ°ç´°æé«]·······DB4 => Pin 4[/font]
[font=æ°ç´°æé«]······ DB5 => Pin 5[/font]
[font=æ°ç´°æé«]······ DB6 => Pin 6[/font]
[font=æ°ç´°æé«]······ DB7 => Pin 7[/font]
[font=æ°ç´°æé«][/font]
[font=æ°ç´°æé«][/font]
[font=æ°ç´°æé«]The BasicStamp Program[/font]
[font=æ°ç´°æé«][/font]
[font=æ°ç´°æé«]' {$STAMP BS2}
··· ' {$PBASIC 2.5}[/font]
[font=æ°ç´°æé«]·measurement VAR Byte[/font]
[font=æ°ç´°æé«][/font]
[font=æ°ç´°æé«]HIGH 8
··· LOW 8
··· HIGH 8
··· INPUT 8[/font]
[font=æ°ç´°æé«]' Main routine[/font]
[font=æ°ç´°æé«]DO[/font]
[font=æ°ç´°æé«]· measurement = INL
··· · DEBUG HOME, "Binary value: ", BIN8 measurement, CR,
····· "Decimal value: ", DEC3 measurement
····· ·PAUSE 100[/font]
[font=æ°ç´°æé«]LOOP[/font]
[font=æ°ç´°æé«][/font]
[font=æ°ç´°æé«][/font]
[font=æ°ç´°æé«]No matter how· I adjust the variable resistance[/font]
[font=æ°ç´°æé«]The answer of BIN8 is 00000001[/font]
[font=æ°ç´°æé«][/font]
[font=æ°ç´°æé«]WHY ?· Is there something wrong[/font]
Post Edited (hsiaochung) : 6/29/2005 4:59:35 AM GMT
The first problem I see is that the netlist states the CLK IN and CLK R pins are connected to Vss.· They· should instead be connected to a resistor capacitor network (shown in National’s datasheet on page 24).· The resistor and capacitor are necessary to make the device’s internal oscillator function.· This could account for the problem you are reporting, so try it first.
If the RC network does not fix the problem, the next trouble-shooting step would be to disconnect the device from the BASIC Stamp.· Then, connect the device exactly as shown in National Semiconductor’s datasheet (Page 24).· Make sure that you get the correct response from the LEDs after pressing and releasing the pushbutton (and turning the POT).·
After you are sure the device is functioning correctly on its own, try reconnecting it to the BASIC Stamp.·
· It did work
·