BS2sx features
Johnny-5
Posts: 34
Ok, i had little time to shop around and being that i already know pbasic and have a BOE i am upgrading from the BS2 to a BS2sx for christmas, i am already getting it, so i cant change my mind now. anyway i was wondering if this chip is capable of or could be made capable of a few things. one being A2D, im wanting to monitor the bots powersupply and know when it is running low. Second, i know the BS2xx chips can be put into a low-power/sleep mode, but is there any way to bring this chip out of that without a reset?
Comments
·
·· See the SLEEP command…As for A2D, please see Dr. Tracy Allen’s website for an inexpensive way to do what you’re asking without an ADC IC.· Take care.
http://www.emesystems.com/BS2rct.htm#B_voltage
Since you're getting a BS2sx, you might also want to check: http://www.emesystems.com/BS2SX.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Has any one done this? im wondering if both resistors need to be presision resisitors or not, before i buy parts.
You don't _have_ to use precision parts, however, I would recommend using a0.01uf film type capacitor. Once you get it constructed, you can follow the instructions at the web site to calibrate it, which accounts for differences in component values.
However, the description is written for the BS2, which is slower than the BS2sx. The units of RCTIME are 2 microseconds for the BS2 but only 0.8 microseconds for the BS2sx. The RCTIME cirrcuit for the 'sx would take something like 270 kohms instead of 680 kohms.
The BS2sx draws about 580 microamps in sleep and 65 milliamps in operation. To put it to sleep you give it the
SLEEP 10
command, where that would be around 10 seconds of sleep. You can use either a constant or a variable there, and the sleep time is approximate, in chunks of around 2 seconds. It wakes up automatically at the end of that time and continues on. The NAP command is similar, but it is for intervals less than 2 seconds. With Sleep, all of the pins become inputs briefly every two seconds. So for example, an led attached to a pin might appear to blink briefly. You might have to work around that little glitch, so your robot won't twitch!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com