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

internal osc mode and serial comm

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







internal osc mode and serial comm
PostPosted: Sat Jun 10, 2006 4:24 pm     Reply with quote

I'm using 16F88 and I can't get serial com to work with 8mhz internal osc. I used the same chip with a 4mhz crystal and it works but not with intr. osc.

Could the internal osc frequency have to big of an error for serial comm to work?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Jun 10, 2006 9:23 pm     Reply with quote

According to the 16F88 data sheet, the maximum error for the
internal oscillator is +/- 2%, at 25 degrees C. So it should work
OK at room temperature. I tested the following program and
it worked OK. This program echoes back every key that you type.
Code:

#include <16F88.H>
#fuses INTRC_IO, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=8000000)
#use rs232(baud=9600, xmit=PIN_B5, rcv=PIN_B2, ERRORS)

//============================
void main()
{
int8 c;

while(1)
  {
   c = getc();
   putc(c);   
  }

}
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