Do I need MAX232 for Serial Comms


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default Do I need MAX232 for Serial Comms

    Good day

    What is the difference between using the Max232 for serial comms or just directly via resistor to a pic's PIN?

    In the PicBasic Pro Compiler manual it shows at the serout and serin to connect it from the PC's serial port to the PIC's pin and it is working good.
    Why do some people use MAX232 for this?

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    No, you do' tneed a Max 232 for Serial Communication. If you don't use one, you will need to invert your signal so your PC will be able to read it. Max 232 makes things a lot nicer.

    Make sure you start out with a SLOW baudrate, and establish communication first! 1200, 2400 is a good start.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  3. #3


    Did you find this post helpful? Yes | No

    Default

    What exactly is it that the MAX232 make nicer?

  4. #4
    Join Date
    Aug 2005
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Nicer means

    The Max232 is a RS232 Signal to TTL converter.

    Your PC serial port runs with a voltage range of 10+/-10 or higher and the voltage your Pic is running at is typically 5Volts.
    So the max232 drops the serial data voltage coming from the serial port to TTL levels and then increases the voltages coming back from your Pic to RS232 levels.
    Also the Max232 Inverts the signal, so you do not have to do this PC side in your software.

    The pic chip can handle the RS232 levels with resistors inline but you would only be able to use the Serin commands as these will receive Non Inverted data and your max speed would be 38400baud. You can get it higher using a bit bang routine but error% goes up.

    If you were using Hserin commands and using the built in Uart of the Pic then you will need the bits inverted so a Max232 would be better and correct levels are also guaranteed.

    I saved the cost of a Max232 on one circuit i layed up, by using a Transistor for the data coming from the serial port which would also inverted it and then had a spare gate on a 74hc04(Inverter) which was also already in the circuit, which I used for data going back to the PC. Ran at 115200baud using hserin fine.

    Regards

    Sean.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Thank you Sean!!!!

Similar Threads

  1. PIC18F4680 to PC via MAX232 (RS232 serial) no output
    By opticsteam1 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th April 2008, 20:39
  2. PIC and MAX232 in/out
    By The Master in forum Serial
    Replies: 10
    Last Post: - 29th March 2008, 20:41
  3. RS232, max232
    By kutsi in forum General
    Replies: 12
    Last Post: - 30th May 2007, 06:39
  4. MAX232 Pin Voltages / Bootloader / Microcode Studio
    By rossfree in forum Schematics
    Replies: 0
    Last Post: - 3rd May 2007, 15:00
  5. MAX232 and DB9 connecter
    By Tomas in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 25th March 2006, 16:02

Members who have read this thread : 0

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