View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Feb 23, 2007 4:00 pm |
|
|
I tested the following program at both +5v and +3.0v and it works.
It blinks an LED on pin B0. It was compiled with vs. 3.249.
If it doesn't work for you, then I suspect you may be missing the
pull-up resistor on the MCLR pin or some other hardware problem.
Code: |
#include <16F88.H>
#fuses INTRC_IO, NOWDT, NOBROWNOUT, PUT, NOLVP
#use delay(clock=8000000)
void main()
{
// Blink an LED.
while(1)
{
output_high(PIN_B0);
delay_ms(500);
output_low(PIN_B0);
delay_ms(500);
}
} |
|
|
|
jweller
Joined: 16 Oct 2006 Posts: 7
|
|
Posted: Sun Feb 25, 2007 11:09 am |
|
|
PCM programmer wrote: | I suspect you may be missing the
pull-up resistor on the MCLR pin |
I'm not at work so I can't verify it right now, but I know your suspicions are dead on the money. I forgot the pullup.
this is what happens when they let software guys work with hardware |
|
|
jweller
Joined: 16 Oct 2006 Posts: 7
|
|
Posted: Mon Feb 26, 2007 12:04 pm |
|
|
Ok I added the pullup and my code still did not work. I am however able to compile and run your example code. Now that I've got something working, I can move forward. Thanks |
|
|
|