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

hardware UART inversion success

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



Joined: 06 Mar 2007
Posts: 100
Location: Massachusetts, USA

View user's profile Send private message

hardware UART inversion success
PostPosted: Wed Mar 18, 2009 11:18 am     Reply with quote

Not a problem, a success Smile

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

View user's profile Send private message Visit poster's website

PostPosted: Wed Mar 18, 2009 11:25 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Mar 18, 2009 11:59 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Mar 18, 2009 12:46 pm     Reply with quote

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.
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