Hi All!
I wrote my very 1st code with PIC16F690, built my circuit on breadbord and programmed it with Pickit3!
Here's what it is intended to do:
- initially all LEDs off
- On 1st press: LEDs flashes in this way:
LED1, LED2 flash every 1 second
LED3, LED4 flash every 2 second
- on 2nd press: all LEDs are turned off
- On 3r press: flash LEDs again as above
And so on
I have connected my pushbutton as pullup configuration with a 10 k resistor...
Here's how my code behave:
- initially on LEDs are off
- on first press: all LEDs flashes as required
And that's it!!!
On the 2nd press, the LEDs keep flashing instead of being turned off
Basically, only the firt press work, all the other press does not change anything...
I didn't include all my code but the necessary part for you to help me...it has my pins configuration, constants and variable definition and the main code
Please have a look at my attachement!
And please help!!!
I wrote my very 1st code with PIC16F690, built my circuit on breadbord and programmed it with Pickit3!
Here's what it is intended to do:
- initially all LEDs off
- On 1st press: LEDs flashes in this way:
LED1, LED2 flash every 1 second
LED3, LED4 flash every 2 second
- on 2nd press: all LEDs are turned off
- On 3r press: flash LEDs again as above
And so on
I have connected my pushbutton as pullup configuration with a 10 k resistor...
Here's how my code behave:
- initially on LEDs are off
- on first press: all LEDs flashes as required
And that's it!!!
On the 2nd press, the LEDs keep flashing instead of being turned off
Basically, only the firt press work, all the other press does not change anything...
I didn't include all my code but the necessary part for you to help me...it has my pins configuration, constants and variable definition and the main code
Please have a look at my attachement!
And please help!!!
Attachments
-
3.9 KB Views: 44