0
\$\begingroup\$

sorry if the questions seems to be already answered, but I really need some basic information.

I have a PCB with a USB-Mini connection, a PIC16F1459 microcontroller and a precompiled .hex-file. So the question is how do I get this .hex-file on the mircrocontroller. My OS is a Linux Manjaro Qonos 21.2.5. If I connect the the PCB via USB cable I do not see anything in the file manager or in the terminal via dmesg. But the PCB gets power as indicated by the red LED, which is also soldered on the PCB. I tried to understand how to do it with MPLAB software but just don't understand it. I really am a beginner at this and have no idea how to flash my microcontroller. For anyone asking why and how I got the PCB. I get to run this USB-controlled potentiostat. Unfortunately the explanation in the paper does not really help me.

Thanks for any help.

\$\endgroup\$
4
  • \$\begingroup\$ How do you know the .hex file was compiled for that specific processor? \$\endgroup\$
    – Ron Beyer
    Commented Mar 27, 2022 at 21:03
  • \$\begingroup\$ Is this a virgin chip - never programmed before? If so, Spehro's answer applies. Note that this chip has two sets of ICSP pins. You can do low-voltage-programming with one set, or high voltage programming with the other set. You cannot use USB to program a virgin chip. \$\endgroup\$
    – glen_geek
    Commented Mar 27, 2022 at 22:46
  • \$\begingroup\$ @RonBeyer This was written in the paper: 'The microcontroller firmware, including the source code and a compiled .hex image, may be found in the design files under the filename ‘‘firmware.zip”'. So I assumed it is compiled for the processor. \$\endgroup\$
    – Michi
    Commented Mar 28, 2022 at 12:52
  • \$\begingroup\$ @glen_geek Yes I guess it is a virgin chip. It comes directly from the manufacturer. \$\endgroup\$
    – Michi
    Commented Mar 28, 2022 at 12:53

1 Answer 1

2
\$\begingroup\$

I don't see any evidence of a built-in bootloader in the datasheet, so you would use a programmer module such as a PicKit 3 and attach it correctly to the ICSP pins (and reset and power rails) on the microcontroller.

That would be the 6-pin male programming header on the PCB. From the schematic:

enter image description here

You'll also have to download and install the appropriate application from Microchip. The full IDE MPLAB-X will work, but the smaller MPLAB-X IPE is adequate.

PicKit 3 is about the cheapest option (there are clones which may or may not work for you), as well there are more sophisticated devices, which you probably don't need.

\$\endgroup\$

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.