Electronic – Programming PIC from USB using FT232

bootloaderftdipicusb

I have a PIC18F1330 which does not have native USB capabilities (see datasheet). I am planning to load it with a bootloader using my PICkit the first time and then programming from a USB port after that. I have a Micro-B USB jack and an FT232 (datasheet) to allow me to program it using the RX/TX pins on the PIC (RA3 and RA2 on the 28-pin QFN). However, I am not very familiar with this method of programming micros so I'm looking for some verification. Here's the schematic I have so far:

PIC and FT232

Is it as simple as connecting pins 24 and 25 on the FT232 to pins 7 and 8 on the PIC? Or must I use some of the other connections as well? I have not found much information for programming PICs through an FT232, mostly AVRs.

You can ignore some of the net labels that don't make much sense, they are used for other parts of my project.

EDIT: This post is asking about the connection between the FT232 and the PIC18F1330. I am NOT asking about the bootloader.

Best Answer

You will want to cross-connect the TX lead from the FT32 chip (pin 25) to the RX lead of the PIC (pin 8), and RX lead from the FT32 chip (pin 24) to the TX lead of the PIC (7).

I know you said you are not asking about the bootloader, but I'm going to address that anyway.

I'm a little confused by your question, you seem to know what a bootloader is, but then as Olin says you are asking basic questions about how to wire up the IC's. Are you planning on writing your own bootloader (which is not trivial), or using one that you have found on the net? As you stated in your question, you say you have not found much information re using bootloaders with PICs as they are much more common with AVRs because of the Arduino.

If you are planning on writing your own bootloader, you are going need to write two pieces of firmware -- parsing the contents of the hex file coming from the PC (presumably sent over a virtual COM port using still additional software), and then using the self-programming feature of the PIC (available on some, but certainly not all PICs) to update the portion of the flash not occupied by the bootloader.

Frankly, unless you are completely out of pins on the PIC, I would just include an interface for an ICD or PICkit using the PGEC/PGED pins. Much, much easier.

Related Topic