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

rs485 interrupt question

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



Joined: 04 Feb 2010
Posts: 37

View user's profile Send private message

rs485 interrupt question
PostPosted: Fri Mar 12, 2010 4:59 am     Reply with quote

Hi,

In rs485.c we should use int_rda or int_ext system in receiving mode. Is there any way to do this without interrupts ?

I use 18F67J60 and my pins are ;
B4 - RE
D2 - RX
D1 - TE
D0 - TX
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Mar 12, 2010 1:03 pm     Reply with quote

The rs485.c driver gives you the option to use a hardware UART (on pins
C6 and C7) or a software UART (on pins B3 and B0). The default case is
to use the hardware UART.

If you want to use the software UART, then you need to put the following
#define statement above the #include line for the rs485 driver. Example:
Code:

#define RS485_USE_EXT_INT   TRUE
#include <rs485.c>


Quote:

Is there any way to do this without interrupts ?

The rs485.c driver is written to use interrupts. The interrupt routine
receives the incoming packet bytes and puts them into a buffer.
I don't want to write driver for you that doesn't use interrupts.
It's best if you use the CCS driver.

More explanation of the rs485.c driver:
http://www.ccsinfo.com/forum/viewtopic.php?t=36810
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