The count code would be something like this
Code:
Bcnt VAR BYTE ' variable for counting
Button VAR PORT?.? 'PIN FOR BUTTON
MAIN:
IF Button = 1 then Bcnt = Bcnt + 1
IF Bcnt > 4 then Bcnt =0
IF Bcnt = 1 then GOSUB someplace1 ' after done at the gosub "return"
IF Bcnt = 2 then GOSUB someplace2
so on and so on
That is the basics, you may need a debounce routine and pauses. Maybe some endifs and elses too.
The sub routines would have something like
HIGH PORT?.?
This pin will be connected to the pin on the 2803 that you want to trigger.
Bookmarks