![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
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. | |
| |
| | #2 |
|
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 | |
| |
| | #3 | |
| Quote:
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.......... | ||
| |
| | #4 |
|
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 | |
| |
| | #5 | |
| Quote:
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. | ||
| |
| | #6 | |
| Quote:
__________________ Mark Higgins | ||
| |
| | #7 | |
| Quote:
| ||
| |
| | #8 |
|
It is ttl level only.
| |
| |
| | #9 |
|
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. | |
| |
| | #10 |
|
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. | |
| |
| | #11 |
|
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 | |
| |
| | #12 |
|
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. | |
| |
| | #13 |
|
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. | |
| |
| | #14 | |
| Quote:
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. | ||
| |
| | #15 |
|
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. | |
| |
|
| 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 |