Sharing Max232 with two pics?


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Apr 2009
    Posts
    15

    Default Sharing Max232 with two pics?

    I have a board with two 16F628A and one Max233, and I want to share it with the two PICs.

    Apparently it works ok but one of the PICs has been damaged (I can't reflash it), I've tried with another, first time works ok but when I try to reflash it fails (broken again).

    The pics does not use the RS232 at same time for send data, and I assume that when they receive it's not problem to share the signal.

    The first PIC uses a 20Mhz OSC and I'm using this code:

    OUTPUT SERIAL_OUT 'make the pin an output
    PAUSE 125 'don't know why, but whitout this pause does not work
    SEROUT SERIAL_OUT,BPS,[126,V,"0000"] 'send data
    INPUT SERIAL_OUT 'mak pin an input

    The second PIC uses a internal 4Mhz OSC and don't know why, but same code does not works, so I use directly this code:

    SEROUT SERIAL_OUT,BPS,[126,V,"1111"] 'send data

    and this is the PIC that always end broken (it works ok, but I can't reflash it).

    May be damaged because the SERIAL_OUT pin is allways output?

  2. #2
    Join Date
    Feb 2009
    Location
    Southern California
    Posts
    86

    Default

    I would either switch the pin to an input when not transmitting or probably put a couple diodes in line with the 2 micros and a pull up resistor before the max233. Haven't built it, so I might have the diodes backwards.

    David
    Attached Images Attached Images

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405

    Default

    Why not just use one of the OPEN baud modes? This leaves the TX pin set to input
    after the transmission is complete.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    Join Date
    Apr 2009
    Posts
    15

    Default

    Quote Originally Posted by Bruce View Post
    Why not just use one of the OPEN baud modes? This leaves the TX pin set to input
    after the transmission is complete.
    With OPEN transmission does not works, nothing happens, I think that mode is for direct connection to the PC.

    I'v solved the mistery of the broken PICs (just a programmer bug), anyway if someone have a better idea to share the MAX233, would be appreciated.

    Thks

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

    Default

    OPEN mode work if you use a good enough pull-up resistor for true mode...
    Steve

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

  6. #6
    Join Date
    Apr 2009
    Posts
    15

    Default

    Quote Originally Posted by mister_e View Post
    OPEN mode work if you use a good enough pull-up resistor for true mode...
    I can try it, would be enough a 47k resistor?

Similar Threads

  1. PIC and MAX232 in/out
    By The Master in forum Serial
    Replies: 10
    Last Post: - 29th March 2008, 20:41
  2. Retrieving infos from multiple PICs on a bus/chain
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th October 2007, 04:42
  3. Programming Pins of PICs?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 15th August 2007, 18:59
  4. MAX232 and DB9 connecter
    By Tomas in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 25th March 2006, 16:02
  5. Do I need MAX232 for Serial Comms
    By koossa in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 10th October 2005, 17:10

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