The PIC programmer circuit below is from the PIC16F54 datasheet.

The programming stage can be reached when the pins RB6 and RB7 are set low and the VPP pin gets more voltage than the power supply in this controller. The idea is about making out a PIC programmer with these given conditions. Normally, a USB cable should be enough to code this PIC. USB cable has four pins. Pinout of USB plug is the following one; pin-1 power, pin-2 data (-), pin-3 data (+) and pin-4 GND.

When I would try to get a connection between microcontroller and computer then I would solder pin-1 (+5V) with VDD and pin-4 with VSS (0V). VPP will be supported by an external power supply with 13.5V. The pins of clock signal and data signal of controller can be with either pin-2 (data -) or pin-3 (data +) on USB soldered, I think so.

My question is about this. Which pin of USB cable does transfer the clock signal? I have already a programming IDE for this code transfer. All I need is the right pinout.


  • \$\begingroup\$ I am aware of a discussion about 3 years ago. https://electronics.stackexchange.com/questions/469548/how-to-establish-communication-between-microcontroller-on-a-bread-board-and-lapt?rq=1 As mentioned there, i do not want to buy a bootloader for this transfering. \$\endgroup\$
    – lastime
    May 16, 2023 at 1:26
  • 2
    \$\begingroup\$ "Normally, a USB cable should be enough to code this PIC." This is wrong. You'll need an In-Circuit Serial Programmer to do this task. Standard-USB doesn't provide this functionality. I'd opt for the easy route and and buy a PIC programmer (you can find some fairly cheap ones). \$\endgroup\$
    – Velvet
    May 16, 2023 at 6:31
  • 1
    \$\begingroup\$ @maxim - Hi, Please remember the site rule for content copied into a post from elsewhere. In order to help, I found what I believe to be the missing source PDF link in this case and added it for you. For the future, please remember it's your responsibility to do that :) Thanks. \$\endgroup\$
    – SamGibson
    May 16, 2023 at 11:47

2 Answers 2


USB uses a differential transmission format on the two data lines. It cannot be used to send a clock on one line and data on the other.

You may be able to use a USB to serial/uart interface to do what you want.


You are asking how to connect USB wires to program a PIC.

There is no way because it is impossible to connect and program a PIC16F54 with direct wires of USB interface. They are not in any way compatible and you don't have a programming IDE for code transfer with USB to PIC16F54 because it is impossible to exist.

You need a PIC programmer which is a device that converts USB interface to ICSP.

Or another MCU which can be directly connected and programmed with USB.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.