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

1000BPS using USE RS232

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



Joined: 02 Oct 2007
Posts: 1

View user's profile Send private message Send e-mail

1000BPS using USE RS232
PostPosted: Tue Oct 02, 2007 3:42 am     Reply with quote

Hi everyone,

I need to interface my PIC16F877 to another device which is using 1000BPS baud-rate. I am using a 4Mhz crystal.

Please let me know how I can change my baud-rate setting to 1000Bps using the USE RS232 directive.

Looking forward to your earliest reply.

Thanks.

Selva
inservi



Joined: 13 May 2007
Posts: 128

View user's profile Send private message

PostPosted: Tue Oct 02, 2007 4:03 am     Reply with quote

Hello,

Here is the essential 'header' for timing. You need to add other fuses as you need. Check the rs232 parameters as xmit and rcv pin.
Code:

#include "16F877.h"

#device *=16  // if you want

#FUSES XT                       //Crystal osc <= 4mhz
.. other #fuses

#use delay(clock=4000000)

#use rs232(baud=1000,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)



In fact, is simple as giving the right #use delay() and baud=1000.

Best regards,
dro.
_________________
in médio virtus
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