Shop OBEX P1 Docs P2 Docs Learn Events
Info and help required for ADC0838 chip — Parallax Forums

Info and help required for ADC0838 chip

GogsGogs Posts: 19
edited 2008-07-18 01:19 in BASIC Stamp
confused.gif
I requireinformation on how the ADC0838 chip is wired up to the Stamp2P OEM chip. Also whether any projects have been done with this chip before that show the source code used. I have how the ADC0831 was connected before because of the manuals.

Much appreciated.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2008-07-17 14:46
    http://www.parallax.com/Portals/0/Downloads/docs/books/edu/Web-BasicAnalogDigital-v1.4.pdf

    Page 45 shows how it is connected and some sample code starts on page 48.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • GogsGogs Posts: 19
    edited 2008-07-17 15:11
    Cheer for that you are a great help.
  • GogsGogs Posts: 19
    edited 2008-07-17 15:18
    It is the ADC838 I want to now whether there is any diagrammes or programming info. This is an 8 bit 8 channel ADC.
  • FranklinFranklin Posts: 4,747
    edited 2008-07-17 15:30
    Sorry, It looks like it would use shiftin and shiftout to communicate but I know of no code for this chip.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • voodoofishvoodoofish Posts: 67
    edited 2008-07-17 20:07
    The link I provided mentions the adc0834 which by design should be similar to the 838 (download the datasheet for this part as it's got helpful info)
    The 838 has two additional pins(se - shift enable, and com - commmon out(?)) that from the datasheet, need to be grounded or pulled high depending on what you are doing.
    Just modifiy the code for the extra channels...they also give some good suggestions as well for searching google....this is where I found the below link....

    if you don't need all of the channels that the 8 provides I'd grab an 834 since it'll be easier to connect. if you do need em all, well...google is your friend [noparse]:)[/noparse]

    http://forums.parallax.com/forums/default.aspx?f=5&m=82651&p=1&ord=d

    ---[noparse][[/noparse]edit]---
    this gives you the pinouts and some code, I'm not sure if you need to do anything special for a 2p though
    http://stuff.mit.edu/afs/net.mit.edu/user/foley/Classes.old/AUP/Ad0838.bs2

    Post Edited (voodoofish) : 7/17/2008 8:17:24 PM GMT
  • MSDTechMSDTech Posts: 342
    edited 2008-07-17 21:34
    The ADC0831 family all use similar coding. With the ADC0832 through ADC0838, you need to send a command to tell the ADC which channel you want to use. Download the data sheet for ADC0831, as it covers the ADC0838 also.
    The code for the ADC0838 would look like:
    ReadVoltages:
    HIGH PM_V_CS 'Deactivate the ADC0834 Voltage Monitor
    LOW PM_Clk
    LOW PM_Din
    DataValue = 0
    'A2D_Start_Conversion
    LOW PM_V_CS
    SHIFTOUT PM_Din,PM_Clk,MSBFIRST,[noparse][[/noparse]VoltSelect\4]
    PULSOUT PM_Clk,10 '20 uSec for data conversion
    SHIFTIN PM_Dout,PM_Clk,MSBPRE,[noparse][[/noparse]DataValue.LOWBYTE]
    HIGH PM_V_CS
    RETURN
    Where VoltSelect is a constant you get out of the datasheet for the input you want to measure.
  • GogsGogs Posts: 19
    edited 2008-07-18 01:19
    Thanks, the MIT program is a good program to start with. I need to integrate 11 analogue channels in all. Anyone know roughly how long it would take to do this?
Sign In or Register to comment.