implementing finite state machines with PICs
-
- Posts: 31
- Joined: Sat Dec 15, 2001 1:01 am
- Location: N.C.
- Contact:
implementing finite state machines with PICs
Does anybody have any general tips or experience doing this, or ideas for directly going from a Moore or Mealy machine diagram or flowchart to a programming flowchart? <p>Douglas
Re: implementing finite state machines with PICs
Why do you want a finite state machine?
Harold L. Reed
Microbes got brains
Microbes got brains
Re: implementing finite state machines with PICs
I've done a fair amount of state machines in CPLDs. I use a state register and some combinational logic to determine the next state.<p>In a microcontroller solution, This may not be as efficient as using an if-else-if of switch architecture. Within the execution of each state, the next state is loaded into the state register.<p>Are you implementing it in assembly or C?
-
- Posts: 31
- Joined: Sat Dec 15, 2001 1:01 am
- Location: N.C.
- Contact:
Re: implementing finite state machines with PICs
I've reasoned it out. For applications where asynchronous aspects are required at low frequencies, the PIC will work fine. However, at high frequencies, this aspect may be better implemented on a traditional FSM. Additionally, the flow chart created for the FSM can be almost exactly implemented into the PIC word for word, with each state being a label in assembly language, this is for a Moore machine and low speed Mealy machines. It's a real time saver!
Who is online
Users browsing this forum: No registered users and 156 guests