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

Is this ok? use rs232(BAUD=9600,RCV=PIN_B1,BITS=8)

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








Is this ok? use rs232(BAUD=9600,RCV=PIN_B1,BITS=8)
PostPosted: Tue Sep 30, 2008 12:23 pm     Reply with quote

Hi

Is it ok only to use one pin in the RS232 statement?

Is this legal I only use RX in the statement. If the compiler is buggy; look at the list file
Code:
#use rs232(BAUD=9600,RCV=PIN_B1,BITS=8,FORCE_SW)
//0016:  BCF    TRISA.TXB0D66
//0018:  BSF    LATA.LATA0


This is output when using both RX and TX
#use rs232(BAUD=9600,RCV=PIN_B1,XMIT=PIN_B2,BITS=8,FORCE_SW)
//0012: BCF TRISB.TXB0D75
//0014: BSF LATB.LATB2


p.s. this was my problem in the thread about connecting the AD right.
No error in my code but this statement in RS232.
Ttelmah
Guest







PostPosted: Tue Sep 30, 2008 12:40 pm     Reply with quote

Use both, then simply don't add any putc statements (the output code is not generated till it is used), and turn off the transmit part of the UART (a search here will find the defines needed to do this, I have posted them in the past several times). You can then use the transmit pin as normal. Otherwise the compiler will default to using a software UART, rather than a hardware UART, if setup this way.

Best Wishes
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