PIC16F84A simple delay probs?

Status
Not open for further replies.

rob.m0gkg

New Member
Hi guys and girls - a newbie here.

Just got into PIC programming to fulfill the needs of a few small projects im working on.

Here I am trying to get a PIC to continuously switch an LED on for 20secs, and then off for 20secs...

I am having a few problems with the delay loop. It seems to work when the interval is 1sec (i.e. 1sec on, 1 sec off) - but when the variables (d1, d2, d3) within the loop are changed to give 20sec, my LED just comes on and stays on?

Prehaps im going the wrong way about things or i've made a newbie error...

Anyone have any ideas?

Here is the code:


Thanks in advance for help...

Rob
 
Thanks guys - all working now...

Switched the watchdog timer off and all seems fine - I knew from my Delphi experience it would be something simple.

Cheers

Rob
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…