|
|
View previous topic :: View next topic |
Author |
Message |
Barney
Joined: 18 Oct 2004 Posts: 41 Location: Newark, CA
|
RS232 FORCE_SW, INVERT |
Posted: Thu Nov 04, 2004 4:43 pm |
|
|
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: 1635 Location: Perth, Australia
|
|
Posted: Thu Nov 04, 2004 4:46 pm |
|
|
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
|
|
Posted: Thu Nov 04, 2004 5:43 pm |
|
|
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 |
|
|
|
|
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
|