RS232, max232


Closed Thread
Results 1 to 13 of 13

Thread: RS232, max232

  1. #1
    Join Date
    May 2007
    Posts
    21

    Default RS232, max232

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

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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/PicBasic/MCS_X3.htm
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jul 2006
    Posts
    6


    Did you find this post helpful? Yes | No

    Smile pic-rs232


  4. #4
    Join Date
    May 2007
    Posts
    21


    Did you find this post helpful? Yes | No

    Default thanks for the schematics

    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?

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    That's the job of those max232,
    http://www.maxim-ic.com/quick_view2.cfm?qv_pk=1798
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    May 2007
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Thanks alot mister_e, eric123... I have all the information I need.

  7. #7
    Join Date
    Jan 2007
    Posts
    37


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Eric123 View Post
    Just one Question how do you format nice colons, is there special symbols ?, mine goes character after characte, line after line

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by therian View Post
    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...

  9. #9
    Join Date
    Jan 2007
    Posts
    37


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Not sure what you mean...post an example of what you want and/or what you actually get...
    the output is formatted
    Attached Images Attached Images  

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by therian View Post
    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.

  11. #11
    Join Date
    Jan 2007
    Posts
    37


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    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

  12. #12
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by therian View Post
    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.
    Last edited by skimask; - 29th May 2007 at 07:15.

  13. #13
    Join Date
    Jan 2007
    Posts
    37


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    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

Similar Threads

  1. UART vs software RS232
    By Michael in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 5th September 2008, 19:27
  2. RS232 into 2 PC ports
    By manxman in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th August 2008, 14:33
  3. PIC18F4680 to PC via MAX232 (RS232 serial) no output
    By opticsteam1 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th April 2008, 21:39
  4. PIC and MAX232 in/out
    By The Master in forum Serial
    Replies: 10
    Last Post: - 29th March 2008, 21:41
  5. MAX232 and DB9 connecter
    By Tomas in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 25th March 2006, 17:02

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts