View previous topic :: View next topic |
Author |
Message |
mskala
Joined: 06 Mar 2007 Posts: 100 Location: Massachusetts, USA
|
hardware UART inversion success |
Posted: Wed Mar 18, 2009 11:18 am |
|
|
Not a problem, a success
In all the previous threads, it has been pointed out that CCS uses INVERT only with software uarts on the various PICs. As far as I know the CCS command is still true, but:
In the PIC184550, rev B4 and later, check out bits RXDTP and TXCKP. They do inversion on the hardware uart. I tested RXDTP only, and it works. Just set the RXDTP bit in your code after #use_rs232.
Why is this important? In my case, I want to be able to input RS232 data from modules that may or may not contain a MAX232 chip, some just send TTL level data. (See many GPS devices.) For RX only, I have the 'hack' transistor inverting receiver circuit. If RXDTP is set properly I can receive either type of data fine. (Probably could have software figure it out on the fly but not necessary for me).
I believe several of the PIC18's have this feature now.
Just for your info,
Mark S. |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Wed Mar 18, 2009 11:25 am |
|
|
This is also good for me. I print debug to the inverted uart.
Before that would halt all processing.
Now I can put the message in a buffer and let the interrupt
trickle the data out at its own pace.
Great! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Mar 18, 2009 11:59 am |
|
|
I didn't know about this. Thanks. If you Google for this, you'll find
more 18F chips with the new feature:
Quote: | site:microchip.com RXDTP |
It seems a little weird that Microchip is now adding new features via
erratas. There is no easy way to specify a silicon rev when you're
ordering PICs. It's not in the part number. Some suppliers, such as
Digikey, will do it upon request (even in small numbers). |
|
|
mskala
Joined: 06 Mar 2007 Posts: 100 Location: Massachusetts, USA
|
|
Posted: Wed Mar 18, 2009 12:46 pm |
|
|
This may have been out for a while. Digikey sold me B6 several months ago.
Errata for it seems to have a date of 7/2007. |
|
|
|