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.

Why Doesn't USB Work

Status
Not open for further replies.

Solderbox

Newbie level 6
Newbie level 6
Joined
Jan 2, 2015
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Florida
Visit site
Activity points
96
Hello all,

I am new to this forum and electronic engineering in general. I have been doing a lot of research on microcontrollers and I am adamant to build a programmer myself. My laptop does not have a D9 port so I want to make a USB ported programmer for my PIC 18F4550. I have looked EVERYWHERE on the internet trying to find help in building one. I have come to the understanding that I will need to program a microcontroller to be able to utilize a USB port to program other microcontrollers. If I want to build my own USB programmer I will then need to build a Serial programmer (JDM Style). I'm ok with all of that.

My REAL question is WHY do you need to have a programmed micro controller to have a USB ported programmer but you don't need a programmed micro-controller to program a micro controller through a D9 (JDM style) programmer? Why can you directly send a signal through RS232 wires but not through USB?

Thanks!
 

Hello,

In the old legacy programmers (parallel or serial port driven), the timing required to drive the programming pins was generated on the PC in software.

The USB ones usually generate the timing on the controller connected to the USB port, whi9ch in turn drives the microcontroller to be programmed.

You mention you couldnt find help in building a USB programmer; just do a search for Pickit2 clone and you'll get tons of hits.

Regards.
 

I am confused what you mean by "the timing required to drive the programming pins was generated on the PC in software". I am new to this and I only know basic circuitry and I am trying to pick up on terminology. Could you please translate what you said to more basic (lay) terms? I apologize in advance for my ignorance.
 

I don't completely agree with the answer in post #2. It's true the Microchip originated PIC programmers PICkit 2 or 3 are using programmed microcontrollers, but it's basically possible to make a programmer based on an USB-bridge chip like FT2232, running the device specific software on the PC. Programming speed might be considerably lower.
 

All recent PICs are serial programmed, there is a command and data sequence sent to certain pins (PGC, PGD and PGM) that make the PIC switch from 'normal' to programming mode. In the case of high-voltage programming, there is also the VPP signal to switch at the right time. The relative timing of these signals has to be accurate or it will either fail to program or place wrong data in the PICs memory.

On legacy serial ('D25/D9') ports, the pins on the port were programmable from the PC software so it was fairly easy to manipulate them in the required order. These days it is rare to find a PC with a standard serial port, they have all moved over to using USB. A USB port does not have individual control pins like the old ones, all the signals are embeded in a single data stream.

If follows that USB cannot directly program a PIC, what it takes is another device to interpret the commands and data from the USB data and convert them back to the signal sequences needed by the PIC. That is what the embedded PIC on most programmers (like the Pickit) does.

Although it may seem like a backward step to make the additional USB to PIC conversion, it does make the programmer more versatile and portable. Incidentally, PICs have never been programmable using RS232, the serial port programmers like JDM and hundreds of variations, only used the +/-12V RS232 pin voltages to derive the VPP needed by the PIC, that is why they are notoriously unreliable on PCs with 'weak' RS232 drive levels.

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top