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 support@ccsinfo.com

? 16F687 UART baudrate not correct

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



Joined: 28 Sep 2005
Posts: 5

View user's profile Send private message

? 16F687 UART baudrate not correct
PostPosted: Wed Sep 28, 2005 11:14 pm     Reply with quote

?any one gets a hint on this:

I programed the pic16f687 uart function as

#use rs232(baud=9600, xmit=PIN_B7,rcv=PIN_B5)

then i check the oscilloscope, data was sent but at a much higher speed than 9600 bps should be. I'm using the internal 8mhz clock and it looked fine when i put the fosc/4 on the scope.

I noticed there is an errata listed under datasheet page for this chip on microchip's website.. but i have no idea if that's relavent?
_________________
wooohooo...
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Sep 28, 2005 11:26 pm     Reply with quote

Post a small test program that demonstrates the problem.
Make sure that the program you post has been tested with
your oscilloscope. If possible, send 0x55 in while(1) loop,
by using putc(). This will give a signal that you can easily
sync on with your scope. Measure the bit time and post it.

It would be best if you copied and pasted the test program
directly from MPLAB into your post, with no editing.


Also post the version of your compiler. This will be a number
such as 3.191, or 3.235, etc.
leong



Joined: 28 Sep 2005
Posts: 5

View user's profile Send private message

PostPosted: Thu Oct 06, 2005 7:20 pm     Reply with quote

Thanks,

that problem got solved mysteriously.. I had two folders with different names but same project name in them. when i tried to load project from one place, some how the workspace is still the old one... When I made modifications in header file, it mixed up...

that problem disapeared after I reorganized the test folder and reopened the project.. this time it's 9600 khz per bit exact..

thank you for the hint.



PCM programmer wrote:
Post a small test program that demonstrates the problem.
Make sure that the program you post has been tested with
your oscilloscope. If possible, send 0x55 in while(1) loop,
by using putc(). This will give a signal that you can easily
sync on with your scope. Measure the bit time and post it.

It would be best if you copied and pasted the test program
directly from MPLAB into your post, with no editing.


Also post the version of your compiler. This will be a number
such as 3.191, or 3.235, etc.

_________________
wooohooo...
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