Interfacing FT232 with PIC

Thread Starter

DerStrom8

Joined Feb 20, 2011
2,390
Hi all,

I haven't done a whole lot with serial communication so this is rather new to me. I designed a PIC prototyping board recently (Actually Rev 3) and am thinking about adding a USB programming interface with a bootloader on the PIC for Rev 4. However, since I"m not familiar with it I find myself in need of a bit of assistance.

The board is based around a PIC18F1330, which has RX/TX pins. I was thinking I read somewhere that you can use these pins to communicate through the bootloader and program the PIC. My question right now is hardware-based: How to connect the USB to the PIC itself. I expect I need a USB/Serial converter IC such as the FT232 but I'm not sure how to connect it. Connecting the FT232 to the USB connector isn't an issue, it's just connecting it to the PIC. It's not as simple as connecting the RXD/TXD pins, is it? I have seen Atmegas use this setup, but haven't seen it on PICs.

Thanks,
Matt
 

hexreader

Joined Apr 16, 2011
581
It's not as simple as connecting the RXD/TXD pins, is it?
That is how mikroelektronika do it....

Download the schematic here: http://www.mikroe.com/downloads/get/1892/ready_for_pic_dip28_sch.pdf

Note that a completely different PIC is used here. Note the use of jumpers on Tx and Rx lines, which is a VERY good idea.

You MIGHT want to put a 10k pull-up resistor on PIC Rx pin to prevent garbage data reception when Rx link is open.

EDIT: or maybe this obsolete board is closer to to the kind of board you want. http://www.mikroe.com/downloads/get/1367/pic_ready2_manual_v100.pdf

EDIT2: .... and by chance - PICready2 is being sold off cheap here: http://www.mcustore.com/clearance/pic-special-offers-clearance.html
Don't know what postage to USA costs though...

EDIT3: Can't find a bootloader for PIC18F1330 when I google - but maybe you know of one?
 
Last edited:

OBW0549

Joined Mar 2, 2015
3,566
My question right now is hardware-based: How to connect the USB to the PIC itself. I expect I need a USB/Serial converter IC such as the FT232 but I'm not sure how to connect it. Connecting the FT232 to the USB connector isn't an issue, it's just connecting it to the PIC. It's not as simple as connecting the RXD/TXD pins, is it?
It might be that simple; worst case, you might have to take care of RTS and CTS as well as TXD and RXD.

FTDI shows the schematic for the FT232R board used in their USB-to-TTL Serial cables, here:

http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232R_CABLES.pdf
 

ErnieM

Joined Apr 24, 2011
8,377
Of course one could always pick a PIC that already has a USB interface on it and leave the translator chip out of the bill of materials.

Not an item for a one off personal build but something to seriously do for any commercial application.

It's not as simple as connecting the RXD/TXD pins, is it?
Well for the most part yes that is all.

The details are you need some way to inform the code to read the data and store it as program; oft a button is checked at power on for this function.

And of course you need the bootloading code, plus the custom link scripts to build the bootloader and application code in separate areas of program memory.
 

Thread Starter

DerStrom8

Joined Feb 20, 2011
2,390
Thanks everyone,

I am aware of the bootloader and all. I want to use a pic with 2 I/O ports (due to space constraints) and any pics with native USB capabilities have at least 3. That's why I'm thinking of using a translator chip.
 

Thread Starter

DerStrom8

Joined Feb 20, 2011
2,390
I'm looking for a device with 16 I/O pins (2 8-bit ports) with USB capability. I am not finding such a device with the part selector.
 

ErnieM

Joined Apr 24, 2011
8,377
You need contigious ports rather than pins? Otherwise something like the PIC18F46J50 (28-Pin SPDIP/SOIC/SSOP) would fit your bill.
 

Thread Starter

DerStrom8

Joined Feb 20, 2011
2,390
Sorry to be so difficult. Yes, I would like to have two ports with 8 pins each so that it can fit neatly on a breadboard. I really think a translator chip is the way to go.
 

Thread Starter

DerStrom8

Joined Feb 20, 2011
2,390
Hi guys,

This is the schematic I have drawn:

FT232+PIC.png

Does that look about right? I expect I'll need to do some breadboarding before I can have this PCB manufactured, just to be sure. I'm just hoping for verification from someone who has done this before.

Thanks all!
Matt
 
Top