Shop OBEX P1 Docs P2 Docs Learn Events
I\O techniques — Parallax Forums

I\O techniques

AstrocreepAstrocreep Posts: 2
edited 2007-01-26 17:35 in BASIC Stamp
I am new to microcontrollers, and programming. I have a BS1 and a BS2 in the mail. What I would like to know, is the command or syntax for an input pin to sense a voltage level. Any help would be greatly appreciated.

Comments

  • BeanBean Posts: 8,129
    edited 2007-01-25 22:47
    Usually you just check if the pin is "1" or "0" using something like "IF IN4 = 1 THEN {whatever}"
    I think the BS1 uses PIN4 instead of IN4...

    If the voltage at the pin is > 1.4 Volts it will be a "1" if it is < 1.4 Volts it will be a "0".

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1

    "USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman
  • LSBLSB Posts: 175
    edited 2007-01-25 23:51
    Yes, if you application requires analysis of discrete voltage levels, research ADC or analog to digital on Google. Undoubtedly Parallax has some exellent information available in the online documentation of the chip required to do this. I beleive you will find it in the component section. Happy Stamping!
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-01-26 17:35
    http://forums.parallax.com/showthread.php?p=622885

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
Sign In or Register to comment.