This is quite achieveable, easy and simple too, but short of someone writing the code for you from your description, you have to start somewhere yourself.
What I do is generally start with a rough block diagram (doesn't have to be a flow chart) as to how I want my code to work... you've pretty much described that, but put in block form. Interconnect the blocks (on paper, back of an envelope or beer mat) so you have some sort of logical flow... (kinda like the block I've appended based on your description).
Next work out what you've got hanging on what pin of your PIC... then finally try to code each block... and put it to the test on a prototype. If you need to, each large rough Block can be broken down into smaller blocks and a proper flow chart constructed.
Again, short of writing the code for you, this is where you take over and continue...
Melanie
Bookmarks