Hi all,
I made a small project in order to learn about PICs.
On a a board i have two 7+1 segments displays that are controlled by the PIC.
At the beginning it should display "0" on both displays.
When I press a button it should increment display number 1 and when i press another button should increment the other display.
When the counter reaches 10 it resets back to zero.
My code is attached.
At this point it shows the same number on both displays, but this is ok for now.
What id doesn't do is when i press the button to change the number.
And a bigger problem is that when the program starts it increments the numbers.
the circuit board is ok, because at one point this code worked and after i changed some things in it (i don't remember what i changed) it stopped working.
Also when i run this program on the PIC Kit 2 programmer i get the same effect. The LEDs on it start light up and they should not change state.
Any help solving this problem would be appreciated.
Thanks
I made a small project in order to learn about PICs.
On a a board i have two 7+1 segments displays that are controlled by the PIC.
At the beginning it should display "0" on both displays.
When I press a button it should increment display number 1 and when i press another button should increment the other display.
When the counter reaches 10 it resets back to zero.
My code is attached.
At this point it shows the same number on both displays, but this is ok for now.
What id doesn't do is when i press the button to change the number.
And a bigger problem is that when the program starts it increments the numbers.
the circuit board is ok, because at one point this code worked and after i changed some things in it (i don't remember what i changed) it stopped working.
Also when i run this program on the PIC Kit 2 programmer i get the same effect. The LEDs on it start light up and they should not change state.
Any help solving this problem would be appreciated.
Thanks
Attachments
-
19.6 KB Views: 18