bs2px TTL Logic.
josecanales
Posts: 1
Hi. I am new using the stamp modules.· Currently I am trying to use the Bs2px in one of my projects.· I have read that a voltage less than 1.4 is interpreted as a logic "0" and above as a "1".· Im usinng the configpin Threshold comand.· Anyone has a sample code for this controller.· All my inputs are analog so any help would be appreciated.
Comments
Even though the BS2px has some features that make using analog signals much easier, the Stamps are not specifically designed for directly handling analog signals. For example, the threshold (1.4V) is not that accurate and can be thrown off by noise on the power supply. The BS2px does have an analog comparator on pins 1 and 2 that can be used with the PWM statement and an appropriate resistor and capacitor, can be used to make a pretty accurate analog to digital converter. The RCTIME statement with the same parts can also be used to make a simple analog to digital converter. The PBasic manual and What's a Microcontroller? do discuss these.