Shop OBEX P1 Docs P2 Docs Learn Events
ADC0831 replaced with ADC0804 — Parallax Forums

ADC0831 replaced with ADC0804

hsiaochunghsiaochung Posts: 17
edited 2005-06-30 01:11 in BASIC Stamp
· 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 hop.gif


· thanks for anyone

· Hsiaochung Liuyeah.gif

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-06-28 14:51
    Hello,

    ·· 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 WilliamsJon Williams Posts: 6,491
    edited 2005-06-28 15:00
    If you actually meant the ADC0834 (in·same family as ADC0831)·then I've attached a bit of code that should get you started.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • edited 2005-06-28 17:50
    If you really do have the ADC0804, there's a reply to·a question in the Stamps in Class forum with some instructions and example code.· Here's the link:

    · 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
  • hsiaochunghsiaochung Posts: 17
    edited 2005-06-29 03:22
    ·Thanks for Jon Williams·
    ·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 wrongjumpin.gif[/font]

    Post Edited (hsiaochung) : 6/29/2005 4:59:35 AM GMT
  • edited 2005-06-29 05:39
    Thanks for the netlist; that helps almost as much as a schematic.·

    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.·
  • hsiaochunghsiaochung Posts: 17
    edited 2005-06-30 01:11
    ·Thanks for ANDY

    · It did work

    ·
Sign In or Register to comment.