PDA

View Full Version : RS232, max232



kutsi
- 28th May 2007, 02:12
Hi all,

I'm studying RS232. So I read many posts about serial connection. But it seems, I'm confused at the end. I have few questions about using max232. As I understood so far, max232 is converting the signals coming from pc. So in any case, I have to use it, right? Is there any reason why we do not use coding instead of max232. Does it have any relation with DTE-DTE Connection (handshaking signals) between two PCs?

I'm using pic18f4550, and trying to set up a unidirectional comunication.(pc talks with pic) I want to design my own board, and it is my first time with RS232. So can anyone recommend me a guide for hardware connections?


Best regards...

mister_e
- 28th May 2007, 03:33
You can use coding and use a single resistor in series, for short distance between your PIC and the PC you shouldn't have any problem.

Problem is most PIC USART/EUSART don't allow to drive in inverted mode, hence why you must use a MAX232 or else kind of level inverter.

USART/EUSART allow more rich feature than a 100% software solution.

18F4550 is a USB PIC but it also have a EUSART, so yes you can build it yourself, how? well... sure you will find few schematic here and there.

I take this one from Bruce's website
http://www.rentron.com/images/004LOAD.GIF

http://www.rentron.com/PicBasic/MCS_X3.htm

Eric123
- 28th May 2007, 06:38
I am starting to work on the same thing, look at this web page.

http://www.electronic-engineering.ch/microchip/projects/rs232/rs_test/rs_test.html

http://www.electronic-engineering.ch/microchip/projects/rs_test/RS232-Interface.pdf

kutsi
- 28th May 2007, 21:49
They are really wonderful.
I have a further question which is about voltage converters. I remember that it is necessary to use a voltage converter like MC1489 to convert TTL logic levels to RS232 voltage level. Does max232 handle with it?

mister_e
- 28th May 2007, 23:50
That's the job of those max232,
http://www.maxim-ic.com/quick_view2.cfm?qv_pk=1798

kutsi
- 29th May 2007, 01:10
Thanks alot mister_e, eric123... I have all the information I need.

therian
- 29th May 2007, 05:37
I am starting to work on the same thing, look at this web page.

http://www.electronic-engineering.ch/microchip/projects/rs232/rs_test/rs_test.html

http://www.electronic-engineering.ch/microchip/projects/rs_test/RS232-Interface.pdf

Just one Question how do you format nice colons, is there special symbols ?, mine goes character after characte, line after line

skimask
- 29th May 2007, 05:53
Just one Question how do you format nice colons, is there special symbols ?, mine goes character after characte, line after line

Not sure what you mean...post an example of what you want and/or what you actually get...

therian
- 29th May 2007, 06:01
Not sure what you mean...post an example of what you want and/or what you actually get...

the output is formatted

skimask
- 29th May 2007, 06:05
the output is formatted

And again, is that what you want and can't get or what?
If that's the output that you want, you have to write that code yourself, using spaces, blank characters, whatever...SEROUT doesn't do that for you.

therian
- 29th May 2007, 06:10
And again, is that what you want and can't get or what?
If that's the output that you want, you have to write that code yourself, using spaces, blank characters, whatever...SEROUT doesn't do that for you.

so you cant locate cursor as with small lcd

skimask
- 29th May 2007, 06:12
so you cant locate cursor as with small lcd

It's not shown in the PBP manual, but the basic ASCII character set has things like 'backspace', 'forward space', 'newline', etc. in it.
Do a search and I'm sure you'll find a million hits with ASCII tables and with values and explanations (i.e. 10 = next line, 13 = carriage return, 32 = space, etc).
And using various variations of SEROUT/SEROUT2/HSEROUT, etc., you can easily format a serial output to your liking.

therian
- 30th May 2007, 06:39
It's not shown in the PBP manual, but the basic ASCII character set has things like 'backspace', 'forward space', 'newline', etc. in it.
Do a search and I'm sure you'll find a million hits with ASCII tables and with values and explanations (i.e. 10 = next line, 13 = carriage return, 32 = space, etc).
And using various variations of SEROUT/SEROUT2/HSEROUT, etc., you can easily format a serial output to your liking.
Thank you for answer now I will have much cleaner debug output