Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Thick newbie needs help (probably a cinch)

I have wrote the flowchart but now im stuck ://
ie where next ://
for a 12c508A ?

All it is is a time based switched depending on input.
you press a button it starts normally
you press the same button for 5 seconds and it operates a switch (gate ?) (inside the PIC not hardware) thus switching the state of the machine (this state stays like this until the button is pressed again for seconds).
Have i said enough ??

As i said this is probably small fry to good programmers - ive trawled the net for a couple of hours for examples. I do like to learn!! honest!

Comments

  • CytCyt Member Posts: 557
    I guess that you wrote the flowchart knowing that you'd have several threads. Set up the threads:
    One Timer interrupt / HW interrupt, and the main program.

    In the timer interrupt implement your button handling - find out which port you need to read from, and make some global space for the flags that the main thread needs to see in order to take action.

    Of course, since I've never programmed PIC, I don't know if any of this is possible :-/

    Hoped that it helped a little bit.

    Regards.
Sign In or Register to comment.