This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MAX3221: About MAX3221 schematic

Part Number: MAX3221

Hi All,

I would like this max3221cpwr to communicate with a pic micro-controller via UART. 

I tested the UART without the chip max3221cpwr. the microcontroller is sending and receiving data, but when I add the max I cannot get data.

I am using realterm to display the data that I am sending from a micro-controller.

After this stage (max3221cpwr)  I am using another rs232 board which is translating my data back to UART then from there I am using a UART to usb board up to my PC.

I don't have a DB9 on my PC.

  • Hi Patrick,

    Sorry to hear your experiencing trouble with this system. The layout you posted looks good. Could you check a few things to help narrow down where the problem is occurring?

    Connect a function generator to the Din pin of the MAX3221 and drive a simple square wave at the data rate your operating at (Alternatively you could send repetitive data that could be easily viewed on a scope). Then connect an oscilloscope (using a common ground if possible) to the Rout pin to see if the data is getting through. The output should follow the data-in with 5.4V as HIGH and -5.4V as LOW.

    Have you also double checked communication through the UART to usb board?

    Regards,
    Eric
  • Hi Eric,

    Sorry for a late response.

    I will test the chip as you advise me. I just have to organise a signal generator. Maybe I can generate PWM then connect it to Din.

    Regarding the UART to USB, the communication is good (I am receiving on my computer the data I am sending from the micro-controller).

  • Hi all,
    I connected the channel 1 to DIN and the oscilloscope to Dout channel 2.
    These images are the signal I am getting while I am changing the frequency.
    Please advise.
  • Hi Eric,

    according to the schematic in the datasheet i have to connect the uart to DIN and the DOUT to RS232 see image below.

    In your comment you mentioned that I have to connect the oscilloscope to ROUT. Is Rout the rs232 input?

  • Hi Partick,

    You are correct. Din is the control for Dout which will be an RS232 signal. Apologies for the misinformation.

    The Driver High Level input (VIH) of this device is 2V - 2.4V (depending on Vcc). The input waveform appears to be very close to these values. Could you change the the input square wave to have a peak-to-peak of 5V with a minimum of 0V?

    It appears that the device is not driving the output at all regardless of the input. Could you measure the voltages at the V+ and V- pins (pins 3 and 7)? They should be +5.4V and -5.4V respectively. These pins store the charge for the driver and would indicate a problem with the charge pump.

    If you'd like to check the charge pump, use an oscilloscope to measure the following:
    C1- should (infrequently) switch between GND and VCC
    C1+ should (infrequently) switch between VCC and V+
    C2- should (infrequently) switch between GND and V-
    C2+ should (infrequently) switch between V+ and GND

    Could you also verify that pins 12, 15, and 16 are your supply voltage (3.3V?).

    Let me know what you find.

    Regards,
    Eric
  • Hi Eric, 

    Thank you for your reply.

    I got 0V at PIN 3 and 7 only to realise that I made a mistake by giving different name to the node on the board and the vcc of the chip.

    The chip was not powered. 

    I powered the chip to 3.3V I can get 5.68V at PIN3 and -5.98V at PIN 7. 

    to test the communication part : 

    I connected Dout to RIN then DIN connected to Uart TX and Rout to uart RX. I am not getting the echoe that I am sending.

    Is it possible to tell me what is the board rate that I have to setup my uart? right now I set it at 9600. I will test it again with the signal generator to check the out put.

  • Hi Patrick,

    The setup you describe sounds correct. I'm interested to see what the waveform look like now.

    The baud rate you use depends on the UART device. This should be specified in the datasheet. You should also check to make sure the two devices (UART and PC) agree on a packet format (number of bits, parity, stop bits). This may cause miscommunication. The MAX3221 is rated at 250kbps so this won't be the limiting factor.

    Are you receiving any data from the echoe? Or is there no response at all?

    Regards,
    Eric
  • Hi Eric,

    Thank you for your tips. The following image are the signal that I am getting when I connect channel 1 to DIN and channel 2 to Dout.

    When I connect Dout to RIN (bridge) then connect my channel 2 to ROUT the following image is my result:

    It looks like Rout doesn't send out the echoes. Do you have any suggestion?

  • HI Eric,

    I made another experiment. I connected the UART TX from a microcontroller to the DIN of the max.

    Then connect the DOUT to the channel 2 of the oscilloscope the below image is the reading:

    But when i connect the DOUT to RIN I am not getting any signal at ROUT.

  • Hi Patrick,

    These output waveforms look good. The frequency and amplitudes are well within the RS232 specs. It looks like the problem exists in the receiver device. Connecting the above signal from Dout to Rin should result in data at Rout.
    Is this receiver device also a MAX3221? Using similar tests, is the receiver device also able to transmit data to Dout?
    If so, try sending data to the UART's RS232 and see if the data can be seen on this Rout pin.

    Also please double check that the receiver device is powered.

    Regards,
    Eric
  • Hi Eric,
    Thank you for your reply.
    Right now I am not using the urat receiver. I am connecting an oscilloscope at the ROUT.
    So my circuit is as follow: microcontroller UART TX==>DIN==>Max3221==>DOUT==>RIN==>Max3221==>ROUT==>oscilloscope.
    FORCEON and FORCEOFF are connected to VCC(3.3V). Do you think it can influence the ROUT?
  • Hi Patrick,

    What is the status of the ~EN pin? This is an active LOW that enables the transceiver's Rout output.

    From datasheet Section 5: Pin Configuration and Functions

    Are you driving the ~EN pin low during this transaction? 

    Regards,

    Eric

  • HI Eric,

    The EN PIN is connected to ground.

    I test the board as per your requested. I connected the first board to a second board as follow:

    DIN (1Board) connected to UART (microcontroller) then DOUT connected to RIN (2Board).

    RIN(2Board) is connected to channel 2 of the oscilloscope and channel 1 is connected to ROUT.

    The following image is what I am getting:

    It looks like something is happening but in a range of mV. This will never be pick up by a microcontroller.

  • Hi Eric,

    I have to said it was not easy to find this one but I found the solution to my problem.

    The PIN EN was connected to one of the GPIO of the microcontroller. I don't know how it hapened as in schematic there is no connection.

    But in PCB the PIN are connected. 

    Thank you very much for your time and patience that you devoted to me.

    I have to admit that working with Texas instrument is a good experience for me as the support is at the tip of the keyboard.

    Below is the signal that I am getting:

    Channel 2 is my RIN and channel 1 is ROUT.

    Once again Eric thank you.

    Patrick.

  • Hi Patrick,

    I'm so glad you were able to find a solution! Thank you very much for your kind words. Best of luck on the rest of your project!

    Kind regards,
    Eric