FTDI Basic breakboard + PIC18F452

Discussion in 'Embedded Systems and Microcontrollers' started by msr, Apr 12, 2011.

  1. msr

    Thread Starter Active Member

    Jul 8, 2008
    62
    1
    Hello,

    Im doing a project with a PIC18F452 and I will have to use USART. Thus, I bought a FTDI Basic breakout board (from Sparkfun) to make debugging easier.


    I already tested FT232R with a loopback circuit and Putty (on Windows) and it works well. I also tested PIC with a loopback circuit and it also works well.
    However I can't get FT232R to work with PIC. In the microcontroller I have USART configured with 9600kbaud, 8bit, no parity (same as PC side), RX with interrupt. Im just sending data from PC to PIC. When PIC receives something prints it on LCD. The problem is PIC isn't receiveing anything.
    So I picked up a osciloscope probe and the results are these:

    [​IMG]

    The signal doesn't touch the GND!
    Thats why PIC doesn't detect data arriving at RX pin, right?

    However if I disconnect FT232 TX pin from PIC RX pin, I get:
    [​IMG]


    I have both GND (ft232 and PIC) connected.

    Any suggestions on how to solve this?


    Thanks!
     
  2. mjhilger

    Member

    Feb 28, 2011
    119
    16
    I'm not familiar with the breakout you have, but looking at coments it seems to have some issues. Do you have documents that explicitly state that your pic TX output should be connected to their RX pin? I'm curious if they reversed them so that it was a 1-1 of connect your TX pin here (to their TX pin). Send data out from your PC (disconnected from the PIC) and make sure data is transition your boards TX output. Because it looks like outputs fighting.
    Saw one coment about the 3.3v setting vs 5v setting changing the clock speed on your breakout board, that would not affect this, but might create a problem. Your scope should be very handy if you get your transition voltages correct and it still doesn't send/receive correctly.
     
  3. msr

    Thread Starter Active Member

    Jul 8, 2008
    62
    1
    Im not sure if I understood you well but (after some more tests) I can receive data FROM PIC. I just can't transmit data FROM PC because when I connect the wire to PIC RX pin the levels don't touch the GND.

    Im using a PICDEM 2 PLUS board (Microchip). They use a MAX3232 connected to PIC USART to convert TTL to RS232 levels. But once I don't have a RS232 cable (or RS232-USB converter) but a USART-USB converter, Im connecting the FTDI breakout board directly to PIC RX an TX pins.
     
  4. mjhilger

    Member

    Feb 28, 2011
    119
    16
    I'm sorry I missed that the signal that looked correct was from the breakout board. Your breakout board output is competing with the output of the MAX part. Looking at the schematic of the PICDEM 2, there does not seem to be a jumper to disable the connection. So, you are going to have to find the trace on the circuit board and cut the connection from the MAX232 part on its RXout pin. Make sure you cut it between the Max chip and your connection to your breakout board. The MAX part is outputting 5V on its RXout pin and your breakout board is trying to supply 5v RS232 data; the output buffer stages of each chip is fighting. This is not the case on the transmit side as the output is from the PIC into the MAX part. Once you cut the trace it should work fine.
     
  5. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I agree with mjhilger. You must cut the MAX232 socket out of circuit. Or connect your FTDI unit to a MAX232 and use the serial port on your PIC board. If you can get a USB to RS232 converter this would also solve your problems. I would not start to cut tracks unless you know what you are doing
     
Loading...