CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Trouble with 18f452 internal osc and RS232

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Joseph88



Joined: 14 Aug 2006
Posts: 17

View user's profile Send private message

Trouble with 18f452 internal osc and RS232
PostPosted: Tue Dec 19, 2006 9:02 am     Reply with quote

Hello gurus,

I'm having trouble with my 18f452 on a picdem 2 board and rs232 communications. It will communicate properly if I have an EXTERNAL oscillator installed, but if I switch to the internal oscillator, the data received in the terminal is jibberish. Any help would be greatly appreciated.

Here is the code i'm using:

#include <18F452.h>

#fuses NOWDT,NOPROTECT,NOLVP
#use delay(clock=8000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, PARITY=N)
setup_oscillator(OSC_8MHZ);

void main() {

while(true){
printf("HELLO");
output_high(PIN_B3);
delay_ms(100);
output_low(PIN_B3);
}

}
Mark Weir



Joined: 11 Sep 2003
Posts: 51
Location: New Zealand

View user's profile Send private message

Data Sheet
PostPosted: Tue Dec 19, 2006 2:48 pm     Reply with quote

Hi,

I think you might ned to check the data sheet for this.

I don't think 18F452 has an internal osc.

Cheers

Mark
Joseph88



Joined: 14 Aug 2006
Posts: 17

View user's profile Send private message

PostPosted: Tue Dec 19, 2006 2:50 pm     Reply with quote

Hi Mark,

Thanks for replying. Yes you are right, the 18f452 doesn't have an internal oscillator. I got the answer from the other ccs board. My bad.

Joe
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group