Calbar
Newbie level 4
Hi All,
This is probably quite trivial, but I am currently making a simple game using MpLab and it is my first time programming.
I am trying to create a 'lives' counter, so that every time a question is answered wrong, a life is taken away and then the new life number is displayed on a 7 seg.
I am using a 16F628 PIC and hyperterminal as the interface with a Max232 in the circuit.
I have been told that I need to create a new register, which has been done, and then apparently I need to give this register a value, to which 1 is taken away everytime a wrong answer is given. Once this is done, I then want to display what is in the register, onto the 7 seg display. I want to start with 9 lives, and go down to 0.
Hope this makes sense and is possible
Cheers
Calbar
This is probably quite trivial, but I am currently making a simple game using MpLab and it is my first time programming.
I am trying to create a 'lives' counter, so that every time a question is answered wrong, a life is taken away and then the new life number is displayed on a 7 seg.
I am using a 16F628 PIC and hyperterminal as the interface with a Max232 in the circuit.
I have been told that I need to create a new register, which has been done, and then apparently I need to give this register a value, to which 1 is taken away everytime a wrong answer is given. Once this is done, I then want to display what is in the register, onto the 7 seg display. I want to start with 9 lives, and go down to 0.
Hope this makes sense and is possible
Cheers
Calbar