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

RS232 FORCE_SW, INVERT

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



Joined: 18 Oct 2004
Posts: 41
Location: Newark, CA

View user's profile Send private message

RS232 FORCE_SW, INVERT
PostPosted: Thu Nov 04, 2004 4:43 pm     Reply with quote

I using a 16F88 for RS232 comms on a PC and am developing the code on a PICDEM4. The PICDEM4 connects RB2 & RB5 from the 16F88 USART to a 9 pin connector thru a level conversion chip. Makes RS-232 easy.

My eventual target is a small PCBA powered by +12v from the RS232 and I want to save milliamps by not having a RS232 level converter so I have to invert the bits.

For development on the PICDEM4 I am using the H/W USART and the following statement: #use rs232(BAUD=19200, XMIT=PIN_B5, RCV=PIN_B2, PARITY=N, BITS=8) and it works fine.

I am ready switch to the RS-232 powerd PCBA and since it does not have an inverter used the FORCE_SW and INVERT options. #use rs232(FORCE_SW, INVERT, BAUD=19200, XMIT=PIN_B5, RCV=PIN_B2, PARITY=N, BITS=8).

I tried it on the PICDEM4, expecting the RS232 comms to not work because of the inversion. To my surpise it still works fine. This tells me the INVERT is not working correctly. Any suggestions?

Thanks
Barney
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Thu Nov 04, 2004 4:46 pm     Reply with quote

Have a look at the .lst file and see what it is doing.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Barney



Joined: 18 Oct 2004
Posts: 41
Location: Newark, CA

View user's profile Send private message

PostPosted: Thu Nov 04, 2004 5:43 pm     Reply with quote

Good suggestion. I looked at the list file and it did not show the FORCE_SW & INVERT in the #use RS232. I still have no idea how, but I was editing the wrong file. I made the change to the file I was downloading and it worked OK.

Thanks
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