View Full Version : I\O techniques
Astrocreep
01-26-2007, 05:32 AM
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.
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 (http://www.hc4led.com)
Low power SD Data Logger www.sddatalogger.com (http://www.sddatalogger.com)
SX-Video Display Modules www.sxvm.com (http://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
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!
TechnoRobbo
01-27-2007, 12:35 AM
http://forums.parallax.com/showthread.php?p=622885
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun
TR