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.

USB D- D+ Input/Output Control

Status
Not open for further replies.

secretstep

Newbie level 5
Newbie level 5
Joined
Jul 17, 2008
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,359
I'm trying to program PIC16F microcontroller using the USB port from my laptop.

Since we have D- and D+, my idea is that one of the signal become the programming clock, and the other signal becomes the programming data.

As long as I can control each of D- and D+ signal, I can adjust the range of the voltage so that it will fall within the programmable voltage.

So I'm looking for a way to control D- and D+ on the USB port for output the data and reading the data.

Does anyone know about how to do that? Maybe a library that supports it?

I can use VB and C++ but haven't used in that level. It will be fun.

Thank you!
 

For program a PIC with USB, first u need to create a USB node with any controllers(PIC18F4550 is a USB supporting uC). U can't program it directly from the USB
 
Thanks for the reply.
I have seen the usbpicprog which uses USB and PIC18F2550 (another USB supporting uC) to make a programmer, but it doesn't tell the details about how to create the USB node.
So how do we create USB node?
and also, why controlling D- and D+ of USB individually to program other PIC uC's won't work? As long as I follow the programming procedure, I think it should work.
 

Most USB hosts do not allow you to control D+ and D- individually or to slow the USB clock down slow enough to program a PIC. They are not individually controllable I/O lines, the signals in and out of them are differential and controlled by the USB hardware. What sreepss is telling you is you need to go through a middle stage - use the USB host (PC or whatever) to transfer data to another device (the 'node') which in turn provides the signals needed to do the programming.

Brian.
 
I see.
Sad to hear that using USB won't work.
I guess I'll use serial port for programming then.

Thanks!
 

You certainly can use USB but not by direct connection to the PIC. Using a serial port to program a PIC directly is possible but will rarely, if ever, meet full programming specification, however, it does work in most cases.

To use USB, you have to use another device, which may be another PIC with built in USB, as a link between the PC and target device. For example, the PicKit2 links between a PC and most PIC ICs and uses an 18F2550 as the USB node.

Brian.
 
Since we have D- and D+, my idea is that one of the signal become the programming clock, and the other signal becomes the programming data.

The best way would be to use the serial port

Regards
 
Thanks for the info. I'll take a look into 18F2550 and a way to establish a USB node with it.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top