Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 26th January 2009, 03:09 AM   #1
Default FT232R converter problem

Got around to pasting a FT232R onto a proto board to give it a go. Windows XP recognized, it and was able to then install the latest driver.

Not having any luck communicating with a terminal, getting some gibberish, so TX from the PIC-->Max232 seems to be working. The odd thing is that a loopback test works just fine by shorting the RX and TX pins on the PIC side of the Max232.

In the Bray's terminal the transmit window indicates a 'frame error'. Played around with different baud rates. Tried device manager to change the ComPort buffer to smaller values, 64 bytes and latency to 4ms. Tried inverting the RX and TX in the Mprog (FTDI eeprom programmer), that didn't work.

Using a Prolific USB/Serial cable everything works as expected, so the software shouldn't be a problem.

Will say that the manual shows a 0.01uf polarized cap across the power pins on the bus powered setup that is implemented. Only able to come up with a ceramic cap for that, could that be a problem?

So checking to see if anyone has had this 'frame error', and where I might look to fix it.
nickelflippr is online now  
Old 26th January 2009, 03:35 AM   #2
Default

It sounds like you are feeding the max232 into the FT232R, when you should not be? FT232R takes logic level on it's input/output. TX and RX should be connected directly to your controller.

If that's not the case, at least post as much information on your setup as you can. Happily the FT232R has been a chip I've never had a problem with.

Are you using this on a breadboard? USB 2.0 is very high speed and can be pretty sensitive to physical setup.
__________________
Mark Higgins
DirtyLude is online now  
Old 26th January 2009, 06:37 AM   #3
Default

Quote:
Originally Posted by DirtyLude View Post
It sounds like you are feeding the max232 into the FT232R, when you should not be? FT232R takes logic level on it's input/output. TX and RX should be connected directly to your controller.
It works with TTL or RS232 here is thedata sheet link

The setup is per the bus powered configuration in the datasheet.

The FT232R is in a dip breakout board that socketed to a pad per hole pcb that's maybe 1.5"x2.5". So this is not on breadboard. Wiring is point to point.

It's weird that the loopback works, but when the Pic is connected, it doesn't. I am about to try the TTL route just to see if that would work. It's probably some sloppy soldering, or misplaced wire..........
nickelflippr is online now  
Old 26th January 2009, 08:15 AM   #4
Default

Is the PIC adequately decoupled ? I.e.. 100nF minimum across the power pins as close as possible ?

It could also be that you have your baud rate incorrect on the PIC. I had a similar problem once and it turned out to be firstly inadequate decoupling then I found I had a 4Mhz xtal in 4xPLL mode by accident rather than the 10Mhz xtal in PLL mode.

It was only after I listened to the signal through a speaker than it clicked that the baud rate in was different to the baud rate out of the PIC
picbits is online now  
Old 26th January 2009, 11:37 AM   #5
Default

Quote:
Originally Posted by picbits View Post
Is the PIC adequately decoupled ? I.e.. 100nF minimum across the power pins as close as possible ?

It could also be that you have your baud rate incorrect on the PIC. I had a similar problem once and it turned out to be firstly inadequate decoupling then I found I had a 4Mhz xtal in 4xPLL mode by accident rather than the 10Mhz xtal in PLL mode.

It was only after I listened to the signal through a speaker than it clicked that the baud rate in was different to the baud rate out of the PIC
Actually 100nF is to much capacitor for the 4X PLL. PLLs are extraordinarily picky about power rail noise and the higher the value decoupling cap the WORSE the HF noise due to parasitic resistance and inductance.

Of course you still need larger ones for the low frequencies. 100-200pF as close as possible, 0.1uF fairly close, and a 10uF somewhere nearby.

Dan

Last edited by Ubergeek63; 26th January 2009 at 11:40 AM.
Ubergeek63 is offline  
Old 26th January 2009, 01:37 PM   #6
Default

Quote:
Originally Posted by nickelflippr View Post
It works with TTL or RS232 here is thedata sheet link
I'm missing this somewhere. I don't see in the datasheet where it says the inputs can handle RS232 levels. The max voltage for inputs is 0.5v over and under VCC. There is an example of driving the TTL side of a MAX232, but nothing about receiving +9/-9v from a MAX232.
__________________
Mark Higgins
DirtyLude is online now  
Old 26th January 2009, 01:43 PM   #7
Default

Quote:
Originally Posted by DirtyLude View Post
I'm missing this somewhere. I don't see in the datasheet where it says the inputs can handle RS232 levels. The max voltage for inputs is 0.5v over and under VCC. There is an example of driving the TTL side of a MAX232, but nothing about receiving +9/-9v from a MAX232.
Perhaps the OP should post the circuit of what he's doing?, as far as I'm aware the FT232 will only accept TTL levels?. Because it's presumably intended to connect to a MAX232 it will also be the wrong polarity to connect directly to a PIC - which means you can't use the hardware USART unless you have a hardware inverter between them (both ways). If you use a software UART, it's simple to do the inversion in the software.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 26th January 2009, 01:49 PM   #8
Default

It is ttl level only.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com/
blueroomelectronics is offline  
Old 26th January 2009, 01:58 PM   #9
Default

Some of the newer pics (eg 18F2550) have the inverter selectable in hardware. Very useful feature and, as the OP didn't indicate which pic he is using, it may be relevant.

Mike.
Pommie is offline  
Old 26th January 2009, 02:04 PM   #10
Default

It's primary purpose is not to connect to a MAX232, that's just an option. There is a UART signal inversion option on the chip.

It can be connected to a hardware uC UART and uses standard UART signals fine in it's default operation mode. I have used this chip quite often for that purpose.
__________________
Mark Higgins

Last edited by DirtyLude; 26th January 2009 at 02:05 PM.
DirtyLude is online now  
Old 26th January 2009, 02:34 PM   #11
Default

I've got the FT232R working fine and at ttl levels. Connected to another FTDI device. The Vinculum. If you hit it with true RS232 levels it may have put on a parachute and bailed out
shingadaddy is offline  
Old 26th January 2009, 05:35 PM   #12
Default

Thanks one and all for your responses. The overwhelming consensus was to use it with the TTL interface. Wired it up and it worked, of course!

The idea of running it thru the Max232 was to mimic a USB/Serial cable. In the data sheet it does show hooking up to a RS232 converter, although I don't have their specifically recomended one. Will give another go when I have more time.

The Pic was a 16f877a on an Olimex Pic-40 board, so no problems there. A software serial routine was being used based on Nigel's assembly routine ported to GCBasic.

The FTDI link to the data sheet doesn't seem to work for me, so an attachment file for that.
Attached Files
File Type: pdf DS_FT232R_v104.pdf (796.4 KB, 73 views)
nickelflippr is online now  
Old 26th January 2009, 09:52 PM   #13
Default

I do not understand your confusion ... the datasheet you uploaded ...
8.4 USB to MCU UART Interface ... no level shifter

the level shifter is there only when you want rs232 levels or rs485 levels .. 8.1-8.3 but then again ft232 is not getting the rs232 levels but ttl levels, the rs232 are on the other side of the level shifter ... in order to talk to uC then you need another level shifter to get levels back to ttl.
arhi is offline  
Old 26th January 2009, 09:58 PM   #14
Default

Quote:
Originally Posted by nickelflippr View Post
The idea of running it thru the Max232 was to mimic a USB/Serial cable. In the data sheet it does show hooking up to a RS232 converter, although I don't have their specifically recomended one. Will give another go when I have more time.
I'm still not understanding what you were trying. The datasheet example show DSUB Connector -> MAX232 -> FT232R -> USB setup. The RS232 level signals are going out the DSUB. In this setup, it's exactly the same as your Prolific USB/Serial converter cable. What's the point of that, you already have a USB/Serial cable?

What it looks like you were trying to do is uC -> MAX232 -> FT232R -> USB in that case the RS232 level signals are going into the FT232R. That's not going to work no matter how you try to do it.
__________________
Mark Higgins

Last edited by DirtyLude; 26th January 2009 at 09:59 PM.
DirtyLude is online now  
Old 26th January 2009, 11:49 PM   #15
Default

Level shifter, got it, really appreciate the extra eyeballs and thoughts. My brain was inserting 'transceiver' for some reason, ..uggh. Okay gonna get out the hacksaw and chop off the DB9 connector, hehe.

The excercise is really to learn a little about the FT232R chip and hopefully apply to a homegrown prototype board for some 40pin pics. I like the idea of using the USB port for power, and of course the serial communications.
Attached Thumbnails
FT232R converter problem-im000149a.jpg  
nickelflippr is online now  
Reply

Tags
converter, ft232r, problem

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
4 -20 mA converter Jurie Electronic Projects Design/Ideas/Reviews 15 27th May 2009 07:53 AM
Monitor Converter: NTSC/PAL to VGA/SVGA scan converter NOSREME Electronic Projects Design/Ideas/Reviews 0 21st June 2005 03:46 AM
UHF down converter G.R.Gayathri Electronic Projects Design/Ideas/Reviews 1 30th December 2004 01:13 PM
Servo motor~~~~ problem~.....shaking problem!!!!! Gundam82 Robotics Chat 10 4th October 2004 08:12 PM
A/D Converter problem... Rescue1 Electronic Projects Design/Ideas/Reviews 5 14th February 2004 09:31 PM



All times are GMT. The time now is 09:45 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker