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 CCS Technical Support

Software RS232

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



Joined: 09 Feb 2009
Posts: 28

View user's profile Send private message

Software RS232
PostPosted: Mon Mar 23, 2009 11:18 am     Reply with quote

I'm using bit-bang RS232 on a pic12F629 with is connected without a level converter (such as the max232). Should I use the INVERT option or not?

In the CCS C help I found this:
Quote:
Check the level conversion. When using a driver/receiver chip, such as the MAX 232, do not use INVERT when making direct connections with resistors and/or diodes. You probably need the INVERT option in the #USE RS232.
Perhaps they should do a spell check on that statement as it isn't clear what they mean.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 23, 2009 11:34 am     Reply with quote

Quote:

I'm using bit-bang RS232 on a pic12F629 with is connected without a
level converter (such as the max232). Should I use the INVERT option or not?

Yes, with a direct connection, you should use the INVERT parameter.
Then connect the Rx pin of your soft UART (on the PIC) to pin 3 on
the PC's DB9 connector with a 22K series resistor, as shown in this
schematic:
http://www.instructables.com/files/orig/FVI/TR35/VW1EP27VUPP/FVITR35VW1EP27VUPP.gif
The Tx pin on the PIC (from a software UART) should connect to pin 2 on
the DB9 connector. This is not shown on the schematic. You must also
have a ground connection between your board and pin 5 on the DB-9
connector.
test153



Joined: 09 Feb 2009
Posts: 28

View user's profile Send private message

PostPosted: Mon Mar 23, 2009 11:43 am     Reply with quote

Thanks.

Finally I think I can make my RS232 working.
test153



Joined: 09 Feb 2009
Posts: 28

View user's profile Send private message

PostPosted: Tue Mar 24, 2009 3:21 am     Reply with quote

As for the GND connection, as you pointed out it must be present or funny things start to happen...

But what if I decide to use for example the FTDI FT232R should I then connect the ground to the USB port?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 24, 2009 1:12 pm     Reply with quote

You should refer to their documentation. On this page,
http://www.ftdichip.com/Documents/Schematics.htm
you can download this zip file:
Quote:
FT232R Example

It has a PDF schematic of the FT232R and an RS232 level converter chip.
They all use the same common ground, referred to as "GND" on the
schematic. This GND would also connect to your PIC ground (Vss pin).
Almost all board level circuits require a ground connection between devices.
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