Hey guys,
Working on a basic project with an 08m2.
I have worked with counting high pulses, but this is my first low and dont want to burn anything up.
My input(C.3) is a button that switches to ground momentarily.
I would like to count 3 pushes of that button to activate a simple program.
Do I make pin c.3 High? Do I need to add a resistor or anything to gnd?
I know I need a variable bit- b0 for a count
I added Variable bit b1 for program end? two presses of the button ends program.
Basic Schematic- View attachment 05 V Star Flasher Circuit.PDF
This is what I have thus far:
Thanks guys!
Working on a basic project with an 08m2.
I have worked with counting high pulses, but this is my first low and dont want to burn anything up.
My input(C.3) is a button that switches to ground momentarily.
I would like to count 3 pushes of that button to activate a simple program.
Do I make pin c.3 High? Do I need to add a resistor or anything to gnd?
I know I need a variable bit- b0 for a count
I added Variable bit b1 for program end? two presses of the button ends program.
Basic Schematic- View attachment 05 V Star Flasher Circuit.PDF
This is what I have thus far:
Thanks guys!
Code:
init:
let b0 = 0 ;switch counter byte
let b1 = 0 ;Flasher end
main:
if b0 = 3 then flasher
goto main
add:
if c.3 = 0
then b0 + 1
Flasher:
High c.4
pause 1000
low c.4
pause 1000
goto Flasher
Last edited: