Shop OBEX P1 Docs P2 Docs Learn Events
ADC0834 help — Parallax Forums

ADC0834 help

megadithmegadith Posts: 6
edited 2005-10-26 20:46 in BASIC Stamp
Hi! I'm programming my BS2 to use a ADC0834 that has 4 thermocouples connected to it. I'm fairly new at the BS2 programming and was wondering if anyone had some tested code available for me too look at. I've tried using my old ADC0831 code and adapting it with ADC0848 code but i can't seem to get it to work. I'm in a desperate situation. any help would be greatly appreciated. thanks!!!

Kevin

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-10-21 14:29
    Kevin -

    Jon Williams (from Parallax) was kind enough to provide the attached program to another Stamp user, just the other day. Please refer any questions about it to him.

    SYSADMINs: My apologies for duplicating this program upload, but I still am clueless as to how to snag a URL for individual post referral, and subsequent inclusion in a reply.

    Regards,

    Bruce Bates
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-21 14:36
    You can simply open the original link and post the forums URL of it: http://forums.parallax.com/attachment.php?attachmentid=39178

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • megadithmegadith Posts: 6
    edited 2005-10-21 14:39
    sweet! this is tested? thanks Jon. I'll try it out
  • megadithmegadith Posts: 6
    edited 2005-10-21 14:51
    ok, When i try to compile your code Jon, it brings up the error: Error: Expect ':' or End of Line

    It has this error at the line:
    CS PIN 15

    Any idea on why its doing that? before, for any pins i had i used a CON

    thanks!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-10-21 14:53
    Do you have the PBASIC 2.5 directive at the top of your code?· What version of the editor are you using?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • megadithmegadith Posts: 6
    edited 2005-10-21 14:57
    i'm using version 1.1. there is probably a newer one out there, right?

    is the PBASIC 2.5 directive a line of code or a comment. i see a comment on the top. thanks chris
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-10-21 14:59
    You should download the latest version of the Stamp Editor V2.2 from our webiste under downloads.· This will solve your problem.· A look at the code shows the directive is there, your editor is just too old to understand it.

    You can find the newest version here:

    http://www.parallax.com/html_pages/downloads/software/software_basic_stamp.asp

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-21 15:05
    And if there is some reason why you can't use the latest editor, change PIN to CON and the rest of the program will be fine -- there are no other PBASIC 2.5 features in use.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • megadithmegadith Posts: 6
    edited 2005-10-21 15:07
    i got the newest version and it seems to compile fine. thanks guys, i appreciate it!

    (man, do i feel like a newbie smile.gif )
  • megadithmegadith Posts: 6
    edited 2005-10-26 20:33
    I have one more quick question. the schematic you describe in your code, is it supposed to be like ADC0834.10 connected to ADC0834.13 and then the resistor to the BS DIO port or is it the ADC0834.10 connected to the resistor and then the .13 connected with the other end of the resistor the BS DIO port? thanks!
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-26 20:46
    You can connect the ADC pins together (one is an input, the other an output -- so no harm) -- put the resistor between the Stamp pin and the ADC; that way if the ADC output in is active and the Stamp in is an output the resistor will protect both.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.