![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
Guest
|
Is this ok? use rs232(BAUD=9600,RCV=PIN_B1,BITS=8) |
Posted: Tue Sep 30, 2008 12:23 pm |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Tue Sep 30, 2008 12:40 pm |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|