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.

[PIC] Why can't we program the PIC uC using Ltd rs232-usb converters?

Status
Not open for further replies.

Issak Sdu

Member level 1
Joined
Nov 7, 2014
Messages
37
Helped
4
Reputation
8
Reaction score
4
Trophy points
8
Activity points
229
why we can't program PIC uC using ftdi rs232-usb converters ?

hello

i'm just wondering why we can't use an ftdi usb-rs232 converter cable to directly program a PIC ??

is this valid even in low voltage mode ?

waiting your answers
 

Re: why we can't program PIC uC using ftdi rs232-usb converters ?

You can if the PIC has a bootloader and can be programmed through it's serial port and you have an RS232 to PIC voltage level converter.

No PIC can be programmed directly by RS232 or any USB-RS232 converter. The signals and voltages are both wrong.

Brian.
 

Re: why we can't program PIC uC using ftdi rs232-usb converters ?

Horace1, I fail to see what that has to do with bootloading. It is just a variation on the ancient 'JDM' style programmer using more modern parts. It certainly will not work on PIC10 processors and I suspect most of the others it quotes. I probably will work - but not using the bootloading principle.

The concept is to pre-load the 'bootloader' code into the processor so it can accept new programming directly, without additional circuitry to provide the programming signals. The bootloader code typically takes charge of the UART so new programs can be downloaded into it serially. In most cases, the bootloader is protected so it can be re-used but as it must run when power is applied, it typically sits at the reset vector and has to either relocate itself or the program when loading has taken place.

It can be done with processors with self write capability but describing it as a bootloader, especially in PIC10 devices where there is no self write feature and probably not enough memory to hold a bootloader, let alone the program it is loading, is being somewhat artistic in definition.

Brian.
 

Re: why we can't program PIC uC using ftdi rs232-usb converters ?

hello,

hello
i'm just wondering why we can't use an ftdi usb-rs232 converter cable to directly program a PIC ??

if you buy a StartUSB PIC18F2550 mini card ( or equivalent by other suppliers)
you can donwload your application program through the existing USB connection
with the MikroEbootloader executable window program...
because a bootloader is allready installed into the PIC..
so ready to use, without special hardware programmateur like JDM or Pickit .. even you can do also load the Hex
via an ICSP connection.
 

Re: why we can't program PIC uC using ftdi rs232-usb converters ?

Again - that only applies to a select few parts, the StartUSB has a bootloader already programmed in to it by MikroeElectronica. If you purchased a generic 18F2550 it would not work.

The original question asked why we cannot use a USB-RS232 converter cable to directly program a PIC. My answer is still the same. The PIC does not have an RS232 programming interface, in fact RS232 voltages would permanently damage the PIC even if the signal protocols could be produced, and they can't!

Brian.
 

Re: why we can't program PIC uC using ftdi rs232-usb converters ?

thank you guys for the replies.

i'm not talking about using a bootloader, because i know it will work with usb-rs232 converters, but as you know, this requires that the bootloader has been previously loaded into the PIC using JDM like programmers (on rs232) or a usb programmer.

what i'm talking about, is using a usb-rs232 converter to load a bootloader into an empty PIC.

i'm wondering how the ftdi chips can't provide the necessary signals to emulate a real rs232 port.

i read that the problem is not in voltage levels but in signal timing.

i wanna know what that means !!!!!!!!!!!!!!!!!
 

Re: why we can't program PIC uC using ftdi rs232-usb converters ?

hello,


I used a very old programmateur POK508
dedicated first for a 16F84 **broken link removed**
in 16F877 or 18F252
with a normal RS232 COM
and ICProg105d programm.

and also with a converter cable TREND TU-59
USB / DB9M RS232 level
but i was oblige to cross Pin2 and Pin3 to use it on my programmer POK508...
(cross TX and RX)
I use TeraTerm COM12 .. as a normal COM port

I load also bootloader on 18F4550,18F4865.. trough ICSP connections and Pickit programmer..
and after use them with USB/RS232 cable. NO problemo.
 

Re: why we can't program PIC uC using ftdi rs232-usb converters ?

just like i said before, paulfjujo, using a real com port to load a bootloader is easy.
same for using usb-rs232 to program a PIC preloaded with a bootloader.

but this is not what i'm talking about

thatns anyway
 

Re: why we can't program PIC uC using ftdi rs232-usb converters ?

If you use circuitry to convert the RS232 signal voltages to PIC VDD level you CAN use a USB converter. You can treat the resulting RS232 interface just like a 'real' serial port in most circumstances. The problem arises because a 'real' serial port normally gets it's power from a dedicated power supply in the PC while an adapter cable can only be powered fron the 5V available at the USB socket. They have to employ a circuit to boost the 5V up to the higher voltages needed to perform the programming. For serial comms they can utilize a MAX232 or equivalent which is fine for data comms but has insufficient current available to power a PIC and generate the VPP it needs for programming.

I have several USB powered PIC programmers and some of them use FTDI serial converters but they also contain an intermediate procesor and a regulated power unit. The intermediate processor accepts serial data from the PC and converts it to the format needed to program the PIC. Without it, the data format and voltages would be unsuitable.

Brian.
 

Re: why we can't program PIC uC using ftdi rs232-usb converters ?

@betwixt
-----------
now i'm getting confused, because some people said that the usb-rs232 converters cant respect programming signals timing, but you say it is a problem a voltage level.

if you are right, i think that a suitable simple analog circuit could be built to deliver the current/voltage levels needed.
 

Re: why we can't program PIC uC using ftdi rs232-usb converters ?

What I am saying is there are two problems, one is the availability of stable voltages at the levels needed to program the PIC, the other is the format of the data used for serial communication is (quite rightly) different to that needed by a PIC. The normal way around the voltage problems is to use an external source of power, either from an independant PSU or from the USB socket directly and convert/stabilize it with suitable circuits. For normal serial communications, the voltages at the RS232 interface will typically be around +10V/-10V but with only 1 or 2mA available before the voltage starts to drop. That is perfectly adequate for data communication but not enough to program a PIC.

The programming format is different from one PIC to another, they are programmed serially (except the very old types) but using various different bit stream lengths and requiring a clock signal to load the bits in sequence. All the serial formats are available as "programming specifications" on Microchip's web site. A USB derived RS232 port can only handle bit streams of 7, 8 or 9 bits and normally only in asynchronous mode (no clock available), they also have a fixed start and stop bit format which does not match that needed by a PIC. In contrast, a direct PC RS232 port is driven from a UART to produce the serial data but the handshaking signals are produced by a parallel port. It means that under software control, the bits of a directly driven port can be controlled individually and this is how simple serial port programmers produce the signals they need.

All commercially available USB PIC programming units use an on-board microcontroller. The Pickit2 for example uses an 18F2550 and most of the "Kxxx" ones use a 16F628. These contain the code to receive the data in standard serial format from the PC and convert it to the format needed by the PIC being programmed. Often (Pickit is an exception because it uses USB directly) they utilize a USB to serial converter such as the FTDI range but it is only there to let the PC and on-board processor talk to each other it does not connect directly to the PIC being programmed.

Brian.
 

Re: why we can't program PIC uC using ftdi rs232-usb converters ?

i think that this problem isn't easy.

maybe if microchip changes the programming protocol in order to make possible the use of ftdi chips.

anyway thanks guys for sharing what you know
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top