Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FT232R TX to microcontroller problem

Status
Not open for further replies.

Druzyek

Newbie
Joined
Jan 20, 2014
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,348
I set up an FT232R on protoboard and now it is acting a little strange. It enumerates fine under Windows 7 when I plug it in but does not loop back data when I connect RX to TX. It was a few months ago when I soldered it on but as I remember it did loop data back at that time. I connected it to a microcontroller and can receive data fine from there to the PC. The odd thing is when I try to send data to the microcontroller from the PC. I have the microcontroller relay over TX anything it receives over RX (the same as loopback) once per second and when I first plug it in, it waits for my input as expected. It loops back any input I give it as expected but after the first character, if no input is available it continuously returns the number 176 (0xB0). It is as if the FT232 constantly spews that number out over TX unless it has received something else it is supposed to TX, in which case it does what it is supposed to.

The microcontroller and the loopback code seem good since everything works as expected when I try with an FTDI cable (TTL-232R.) The chip came from Mouser so I don't think it is a fake. Comparing EEPROM data between the chip and the cable was exactly the same except the serial numbers and the cable was set to use high current I/Os. The circuit I am using is the one on page 23 of the datasheet (https://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232R.pdf) except I didn't have a ferrite bead and my microcontroller is running from the 3.3v output (it should be taking less than 10mA.) The USB line reads 5.1v and the 3.3v output is about 3.28v. Checking the resistance of all of the soldered pins shows that they are connected as expected and there don't seem to be any shorts.

Any idea what could cause this?
 

I connected it to a microcontroller and can receive data fine from there to the PC. The odd thing is when I try to send data to the microcontroller from the PC. I have the microcontroller relay over TX anything it receives over RX (the same as loopback) once per second and when I first plug it in, it waits for my input as expected.

Can you explain this,with the help of a connection diagram?
 

Can you explain this,with the help of a connection diagram?

The diagram is pretty simple:
diagram.png

Here is the microcontroller code:
Code:
  while(1)
  {
    UART_SendHex(UART_Receive(0));
    UART_Send(' ');
    delay_ms(1000);
  }

With a known working FT232 cable the terminal window waits for input. If I type 'a' it prints "61" which is the correct hex value for 'a.' Then it waits for another character. If I type 'b' it prints "62," then waits again.

With the chip that is causing problems, the terminal window waits for input. If I type 'a' it prints "61" then spits out "B0" over and over after that. If I press 'b' it prints "62" but then continues printing "B0" after I release the 'b' key.

Somehow it seems the microcontroller is receiving 0xB0 over and over.
 

The circuit I am using is the one on page 23 of the datasheet (**broken link removed**) except I didn't have a ferrite bead

Somehow,electronic noise in the USB cable(between the computer and FT232R) is causing the MSP430 to believe that it is receiving an input,when it is not.Insert a ferrite bead in the appropriate location in the circuit,as given in the datasheet.That might filter out the noise and you should not receive 0xB0 as output,continuously.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top