| ??? 09/26/00 04:21 Read: times |
#5311 - RE: rookie:"what's the state machine?" |
It's just a sequencer for a program (or program for a sequence). For example, in a simple alarm system, state 0 is the stand-by state. Every 100mS, check the value of the state.
If state=0, you check a contact. If open, set state=1, start a 1-second timer. If state=1, count down the timer; if 0, set state 2 & turn on the siren. If count not 0, check the contact; if closed, set state=0. This can go on for ever! The idea is to make it work on paper first, then it's much easier to code (especially in asm!). Regards, Richard |
| Topic | Author | Date |
| rookie:"what's the state machine?" | 01/01/70 00:00 | |
| RE: rookie:"what's the state machine?" | 01/01/70 00:00 | |
| RE: rookie:"what's the state machine?" | 01/01/70 00:00 | |
| RE: rookie:"what's the state machine?" | 01/01/70 00:00 | |
| RE: rookie:"what's the state machine?" | 01/01/70 00:00 | |
| RE: rookie:"what's the state machine?" | 01/01/70 00:00 | |
RE: rookie:"what's the state machine?" | 01/01/70 00:00 |



