1
\$\begingroup\$

I might be mislead by some pictures of circuits i've seen, but is it possible to program a microcontroller (e.g. pic18) from a computer without a kit (e.g. pickit), but just with a self build circuit and software?

EDIT1: If it is possible, it would be great if point me in a direction where I can look for instructions on how it's done.

\$\endgroup\$
  • \$\begingroup\$ If you "self build" a programmer - yes. \$\endgroup\$ – Eugene Sh. Aug 12 '15 at 17:01
  • \$\begingroup\$ I'm obviously kinda new to it - so a programmer is a hardware that let's say has an usb port and converts incoming data to wires by which a microcontroller is essentially programmed? Isn't pickit a programmer in that case? \$\endgroup\$ – SugarOnBacon Aug 12 '15 at 17:06
  • 1
    \$\begingroup\$ Then just buy a programmer. Hint: You can find some cheap clones of the OEM programmers around the internets. \$\endgroup\$ – Eugene Sh. Aug 12 '15 at 17:07
  • \$\begingroup\$ I know many people who have built JDM programmers (instructables.com/id/Simple-JDM-PIC-Programmer) or the Junebug (robotshop.com/media/files/pdf/junebug-assembly-instructions.pdf). In my experience, though, it's easier to simply buy a PICkit on ebay for $25-$35 \$\endgroup\$ – DerStrom8 Aug 12 '15 at 17:11
  • \$\begingroup\$ Ok i feel like i'm learning. Now what is this bootloader here doing? entesla.com/blog/… \$\endgroup\$ – SugarOnBacon Aug 12 '15 at 17:17
2
\$\begingroup\$

Just to program a PIC, many devices can be used. The official Microchip Programmers section of their website lists quite a few devices, most aimed at the professional market. The PICKit3 can program and also do hardware debugging for many PIC IC's, which will save you countless hours of frustration. For more serious work, an ICD3 in-circuit debugger does all of the previous, is faster, supports more devices, and is considered a "production-level" programmer. For really serious work, a RealICE in-circuit emulator does all of the previous plus emulation of most PICs, allowing you ultimate freedom. Of course, that comes with a steep price tag.

As for non-Microchip offerings, there are many. My first programmer was a PICAll parallel-port kit. @Wouter Van Oijen next tempted me with his Wisp programmer, but time was limited and computer failures halted it. Then I used a usbpicprog from @Frans Schreuder for awhile after a new computer build excluded the parallel port. I finally was "forced" to get an ICD3 for fast debugging and that has remained the tool of choice.

There are likely many more, and simply googling "PIC Programmer" returned 1.9 million hits.

As others have said, one of these programmers are needed for programming a blank PIC. Many PICs can be initially programmed with bootloader code however, which makes them no longer require the initial programmer. Instead, once initially programmed with the bootloader, they are connected to either a serial or USB port, and software sends the .hex code to the PIC over that connection. The bootloader's job is to receive that data, and program it into the remaining code space.

There are many links to PIC bootloader info and tools at the Microchip Forum, including AN851 which discusses the nitty-gritty details of how the bootloader works and the serial method for communication.

\$\endgroup\$
1
\$\begingroup\$

You could use a development board that has a built in programmer, such as "curiosity".

The Microchip Curiosity cost $20, and allows you to program a bunch of different devices. www.microchip.com/curiosity.

\$\endgroup\$
1
\$\begingroup\$

There are two ways to done this

  1. You use proton-IDE development software which come with boot loader firmware file for each PIC controller.You have to program boot-loader in target PIC using original programmer after that you can program PIC using USART TX and RX pin directly through serial port.But using this method you do not able to use the option of hardware serial communication...Not to worry Proton IDE provide you software serial option from which you can use any pin for serial communication.
  2. There is a programmer PCB available on internet brenner8 you can can make your own programmer.
\$\endgroup\$
0
\$\begingroup\$

To burn HEX files(Program) on PIC18 you need another PIC MCU which takes data from USB/Serial Port and translates it for the Target MCU.

To enter programming mode on target MCU certain voltage is required on reset pin Though low voltage programming is now a norm

As mentioned before, you need another PIC MCU - hence the bootloader.

There are lot of DIY PICkit clones tutorials. But you need to program a PIC for it.

So, it is a deadlock if you don't have a PIC programmer kit on hand. Maybe borrow it

\$\endgroup\$
  • \$\begingroup\$ That's not true. The first custom programmers were connected to the parallel port. Their most advanced parts were some logic gates, but no MCUs. Today, there's no parallel port any more, just USB. For USB, you need a controller like a MCU, and once you know PICs, you'll use them. Microchip publishes schematics of its programmers, so people build modified versions running with the original software. But if you want, you can build a PIC programmer using an Atmel or other MCU. \$\endgroup\$ – sweber Oct 26 '15 at 7:25
  • \$\begingroup\$ Yes. But IF you had a Parallel Port and as far i know the middle man is just a USB to TTL converter. \$\endgroup\$ – ammar.cma Oct 26 '15 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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