0

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.

Michi
  • 1
  • How do you know the .hex file was compiled for that specific processor? – Ron Beyer Mar 27 '22 at 21:03
  • 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. – glen_geek Mar 27 '22 at 22:46
  • @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. – Michi Mar 28 '22 at 12:52
  • @glen_geek Yes I guess it is a virgin chip. It comes directly from the manufacturer. – Michi Mar 28 '22 at 12:53

1 Answers1

2

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.

SamGibson
  • 17,231
  • 5
  • 37
  • 58
Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842