How accurate is a BS2 OEM?
300c_Pilot
Posts: 5
I am wondering how accurate of a timer I can build with a stamp. I would like it to display time in 1000th of a second, or greater,·but I doubt a BS2 can do it. Any thoughts?
Thanks
Thanks
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
2. The BS2 uses a 'resonator' based oscillator. Thus I believe it's not terribly accurate.
3. You CAN base a PIC (or SX) design on a crystal oscillator, which can be accurate to 10 ppm. 10 parts-per-million means for every million ticks, it can be off 10. Thus, for every 11.574 hours, your clock could gain or lose 10 seconds.
4. You could check out the Simple Multi-Tasking co-processor (for $12 or so) which will give you a 50 mSec 'clock tick'. You can then use this 'clock tick' to synchronize your program. I believe it can be configured to give you a 5 mSec 'clock tick', for greater precision -- that would be 1/200 second per tick, and the BS2 could keep up with that. (.005, .010, .015, etc)
They also have ICs with the xtal included so you don't have to mess with two components.
Any microprocessor that keeps time is limited in the other functions it might do, so having an 'outboard' timepiece is a better solution if you are developing a concept.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
It (The device currently under thought) needs to be very accurate to the actual time that has passed. It will measure the amount of time that it takes to open and close a relay switch. Example: A Basler 51/50 Over Current Substation relay takes between 10 and 300 ml. seconds to close. Depending on age & type (Mecanical/electronic). We need to know if we can build something to do measure the actual time needed. The comercial eq. is over $30,000.00 to buy. We crrently rent one from ElectroRent.
The problem with a relay is that there is significant 'bounce' time. Thus the BS2 'PULSIN' keyword (which can measure a pulse on the BS2 up to 131 mSec with 2 uSec resolution) may or may not help you here.
The BS2 takes about 300 uSec per instruction, just to interpret the instruction and execute it. Having said that, you could put multiple PULSIN statements in a row, measure several of the 'bounce' pulses, and decide what your measurement was from that.
Personally, I'd be tempted to put a logic analyzer on the line (with a suitable current limiting resistor). You can get USB-based logic analyzers for around $500 or less.