0
\$\begingroup\$

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.

PIC16F54

\$\endgroup\$
3
  • \$\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
  • 3
    \$\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

3 Answers 3

8
\$\begingroup\$

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.

\$\endgroup\$
3
\$\begingroup\$

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.

\$\endgroup\$
0
\$\begingroup\$
  • 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.

The best and confident way is using a pic programmer, which is dedicated for such PICs. The pin layout has its own hardware protocol and has been used by USB interface. If I were you, I wouldn't waste time if you are in hurry for programming.

pinout

New contributor
cell is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
\$\endgroup\$
2
  • \$\begingroup\$ In contrast to the accepted answer, this does not answer Which pin of USB cable does transfer the clock signal?. Please review How do I write a Good Answer?. (Your answer looks a colourful version of Velvet's comment. See the one following that, too.) \$\endgroup\$
    – greybeard
    May 18 at 6:50
  • \$\begingroup\$ @greybeard I have edited my answer. TY for reminding. \$\endgroup\$
    – cell
    May 18 at 7:01

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.