hey everyone, i just got my pickit2.
Im just trying to get an led flashing to test it out, but i cant seem to make it work.
for wiring i put both vdd pins to 5v, and both vss to ground, and from RA0 i have a resistor and LED.
It programs properly, but my LED does not flash?
Is my internal clock set up properly?
thanks
craig
Im just trying to get an led flashing to test it out, but i cant seem to make it work.
Code:
#if defined(__PCH__)
#include <18F4620.h>
#fuses INTRC_IO,NOWDT,NOPROTECT,PBADEN = OFF,LVP = OFF, NOBROWNOUT
#use delay(clock=8000000)
#endif
#define ALL_OUT 0x00
void main(void)
{
setup_oscillator( OSC_8MHZ );
delay_ms(1500);
SET_TRIS_A(ALL_OUT);
while(1)
{
OUTPUT_HIGH(PIN_A0);
delay_ms(1000);
OUTPUT_LOW(PIN_A0);
delay_ms(1000);
}
}
for wiring i put both vdd pins to 5v, and both vss to ground, and from RA0 i have a resistor and LED.
It programs properly, but my LED does not flash?
Is my internal clock set up properly?
thanks
craig
Last edited: