PDA

View Full Version : State machine programming



tjstevens
- 15th April 2007, 20:02
Does any one have a sample of state machine coding for Pic Basic Pro?
I need to sequence though several machine states (I/O) and run PWM in the background. I'm having trouble with the cycle times not being consistent. I believe that state machine may be the answer. Please HELP.

mister_e
- 15th April 2007, 20:32
Lets say assembler may help... but without seeing what you have now, it's hard to suggest something or know why it doesn't work as expected. Is this a software or hardware related... ??? who know

If you're using interrupts, that might be one problem source... but...mmm hard to guess.

http://www.mister-e.org/Pics/CrystalBall_Informations.gif

HenrikOlsson
- 16th April 2007, 06:10
Hi,
Here's a link to finite state machine programming. http://www.emesystems.com/BS2fsm.htm It's based on the BasicStamp but should be close enough to work with PBP.

/Henrik Olsson.

mister_e
- 16th April 2007, 15:56
Ok... one more thing i didn't knew the right translation.

Anyways, here's a link i got from Tim Box. That should clear up few thing
http://protongeeks.com/index.php?option=com_content&task=view&id=55&Itemid=29

tjstevens
- 17th April 2007, 22:45
I'll check it out. I post to let everyone know how it turns out.