Try this code ..led's connected to PORT B. It will glow for every 1 sec interval
HTML:
#include <18f4520.h>
#FUSES NOWDT
#FUSES XT
#use delay(clock=4000000)
void main()
{
set_tris_b(0x00);
while(1)
{
output_b(0xFF);
delay_ms(1000);
output_b(0x00);
delay_ms(1000);
}
}
Best wishes :)
This is my circuit:
Thank you so much. This is my first thread in a forum and the first reply I received.
But the code did not work. Is my circuit wrong or is the connection of oscillator incoorect?