princez
Junior Member level 3
hello.
I am trying to program my PIC18F4550 to work with external 20Mhz Oscillator. I have tried each and every single command i came across the reference manual for PIC-C programming language, but i am not successful to accomplish my task. Here's my code,
#include<18f4550.h>
#use delay (clock=20000000,HS)
#fuses HS,NOWDT
#use rs232 ( baud=9600,parity=N,xmit=pin_c6,rcv=pin_c7,stream=com1,bits=8)
void main(void)
{
int i;
while(true)
{
fprintf(com1,"hello");
putc(13);
i=getenv("CLOCK");
fprintf(com1,"%d",i);
delay_ms(1000);
}
}
i am also attaching the Proteus design file.
Pleaseeeee help me ASAP.
Thanks.
I am trying to program my PIC18F4550 to work with external 20Mhz Oscillator. I have tried each and every single command i came across the reference manual for PIC-C programming language, but i am not successful to accomplish my task. Here's my code,
#include<18f4550.h>
#use delay (clock=20000000,HS)
#fuses HS,NOWDT
#use rs232 ( baud=9600,parity=N,xmit=pin_c6,rcv=pin_c7,stream=com1,bits=8)
void main(void)
{
int i;
while(true)
{
fprintf(com1,"hello");
putc(13);
i=getenv("CLOCK");
fprintf(com1,"%d",i);
delay_ms(1000);
}
}
i am also attaching the Proteus design file.
Pleaseeeee help me ASAP.
Thanks.