I'm trying to make a simple delay turn-on function using Timer0 inside the PIC16F57 itself.All the example I can find on internet mostly come with build-in interrupt function which the PIC16F57 doesn't have,at least on the datasheet.Any way or hint to workaround?
Objective is quite simple:
- a switch was pressed(input stay HIGH)
- LED will turn ON after 3s
- LED will remain ON if switch is still being pressed/latched
- if switch input is LOW logic level,then LED will off
Did try with normal __delay_ms(3000)
but it's not practical since switch off the LED also need to wait for 3s if the switch on
routine is not completed.
I'm using MPLAB XIDE in C language and no way to change the mcu to other model as the PCB is already fixed for PIC16F57.