Hi all,
This is my first post and i would like to tap into your wealth of knowledge. I did some PIC programming about 10 years ago as part of my Product Design degree though it was only ever meant to be a basic grounding.
I have a velleman p8048 programming board and i write my code in assembler language in notepad.
I am looking to write a program that uses 2 momentary switch inputs to control 4 led outputs. What i would like the buttons to do is to act as up and down scroll buttons.
I would like the 1st led to come on when the system is powered up, then when the scroll up button is pressed, the 1st and second led come on, and so on until all 4 leds are on. When all four are on i want the system to stay in that state until the scroll down button is pressed. (not to run over or loop around to 1 again)
i want to be able to go up and down through the order using the buttons.
e.g. 1 /\ 2 /\ 3 \/ 2 /\ 3 /\ 4 \/ 3 etc etc
i hope this make sense.
oh btw i am looking to use a 16F627-04/p pic
I was thinking of using a subrouting to control the LED's
SCROLL ADDWF GR
RETLW B'00000001' ;1 LED ON
RETLW B'00000011' ;2 LED ON
RETLW B'00000111' ;3 LED ON
RETLW B'00001111' ;4 LED ON
I am however unsure as to how to get the button triggered up down counting code working.
Thanks in Advance
Stacy
This is my first post and i would like to tap into your wealth of knowledge. I did some PIC programming about 10 years ago as part of my Product Design degree though it was only ever meant to be a basic grounding.
I have a velleman p8048 programming board and i write my code in assembler language in notepad.
I am looking to write a program that uses 2 momentary switch inputs to control 4 led outputs. What i would like the buttons to do is to act as up and down scroll buttons.
I would like the 1st led to come on when the system is powered up, then when the scroll up button is pressed, the 1st and second led come on, and so on until all 4 leds are on. When all four are on i want the system to stay in that state until the scroll down button is pressed. (not to run over or loop around to 1 again)
i want to be able to go up and down through the order using the buttons.
e.g. 1 /\ 2 /\ 3 \/ 2 /\ 3 /\ 4 \/ 3 etc etc
i hope this make sense.
oh btw i am looking to use a 16F627-04/p pic
I was thinking of using a subrouting to control the LED's
SCROLL ADDWF GR
RETLW B'00000001' ;1 LED ON
RETLW B'00000011' ;2 LED ON
RETLW B'00000111' ;3 LED ON
RETLW B'00001111' ;4 LED ON
I am however unsure as to how to get the button triggered up down counting code working.
Thanks in Advance
Stacy