ren1994 發表於 2012-2-10 19:37:24

BS2 如何使用計時器達到時間同步


g921002 發表於 2012-2-10 22:30:26



ren1994 發表於 2012-2-11 10:23:09

回復 2# g921002


g921002 發表於 2012-2-11 15:00:38

Does the BASIC Stamp module support interrupts?

No, the interpreter chip used in the BASIC Stamp microcontroller does not support interrupts. In many cases, a fast polling routine may be used to accomplish the same effect, however, depending on the number and size of the tasks involved in some applications, this will not be fast enough and the BASIC Stamp microcontroller may not be a plausible solution. While not true interrupts, the BS2p24, BS2p40 and BS2px24 modules support 「polled interrupts.」 The 「polling」 commands allow the BASIC Stamp modules to respond to certain I/O pin events at a faster rate than what is normally possible through manual PBASIC programming. In this case the interpreter periodically checks the state of the designated polled-input pins. It 「polls」 these pins after the end of each PBASIC command and before it reads the next PBASIC command from the user program; giving the appearance that it is polling 「in the background.」
Stamp 2 is the lack of interrupts and lack of a real time clock / counter.

BS2p24, BS2p40 and BS2px24 支援所謂 「polled interrupts."也非硬體的中斷(即便使用的uC有)
頁: [1]
查看完整版本: BS2 如何使用計時器達到時間同步