Delay in C for PIC16F88

ke5nnt

Joined Mar 1, 2009
384
I know this thread has pretty much been answered, but it's so rare I get to input since I am so limited on my knowledge, but one of the first things I thought of when you were getting more blinking than you were supposed to was switch bounce (i.e. one button press appearing to the MCU as multiple presses due to button contacts clanking around).
Additionally, you may also state your configuration bits in this format to limit the number of times you have to write #pragma config:
Code:
#pragma config FOSC = INTOSCIO, WDTE = OFF, PWRTE = ON, ETC...
Just separate each with a comma.
Lastly, if the config bit is in the state you want it to be upon power-up/reset, you don't necessarily need to declare it since doing so won't change anything, though some may argue that including it in your code anyways helps you to review your code later if there are problems.

Anyways, my 2 cents. Glad you got it figured out.
 
Top