Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC C Oscillator Problem

Status
Not open for further replies.

princez

Junior Member level 3
Joined
Feb 13, 2010
Messages
28
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,457
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.
 

Attachments

  • DSN.rar
    13.3 KB · Views: 5

princez

Junior Member level 3
Joined
Feb 13, 2010
Messages
28
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,457
I also want to know that is there any way to check at which speed or clock my micro-controller is working?? any way to know it on hardware??
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top