implementing finite state machines with PICs

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
Isenbergdoug
Posts: 31
Joined: Sat Dec 15, 2001 1:01 am
Location: N.C.
Contact:

implementing finite state machines with PICs

Post by Isenbergdoug »

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
hlreed
Posts: 349
Joined: Wed Jan 09, 2002 1:01 am
Location: Richmond, TX
Contact:

Re: implementing finite state machines with PICs

Post by hlreed »

Why do you want a finite state machine?
Harold L. Reed
Microbes got brains
bobsRAC
Posts: 73
Joined: Sat May 18, 2002 1:01 am
Location: Florida
Contact:

Re: implementing finite state machines with PICs

Post by bobsRAC »

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?
Isenbergdoug
Posts: 31
Joined: Sat Dec 15, 2001 1:01 am
Location: N.C.
Contact:

Re: implementing finite state machines with PICs

Post by Isenbergdoug »

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!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests