Ouch…last week I ruined my Microchip LoRa Mote (LCD version), something went wrong during a firmware upgrade. There was no communication possible via USB, the LCD didn’t light up anymore, no response on commands in Termite (terminal emulation application) or from HIDBootloader. Damn, this thing is dead! What to do now?
Guess there is a problem with the on-board PIC, let’s see what I can find in the LoRa Mote Users’s Guide, and read some other documents!
Beware, some links will start downloading!
2.2.1 When the Mote board is connected to the host via USB, the device will operate
automatically in USB mode. The on-board PIC18LF25K50 MCU will become a
USB-to-UART bridge device. The host can run a simple terminal emulator application << Aah, I guess this is the problem, that bridge isn’t working anymore and yes, the LCD versions has a PIC18LF45K50 but that’s no problem!
1.2 Features
7. Module ICSP™ Programming Pads
8. Mote ICSP Programming Through Hole << that’s what I need, another way to program the PIC. ICSP gives you a convenient way of programming the PIC, without removing the chip from the development or production board.
also:
2.3 HARDWARE DESCRIPTION
The on-board PIC18LF25K50 MCU is programmable via ICSP™ through connector J2. << I have to open “The Box”
Let’s grab some stuff together:
1 First the source code for the Mote. LoRa Technology Mote (LCD version)
- PICkit3, the hardware programmer/debugger for PIC microcontrollers
3.[MPLAB X IDE](http://www.microchip.com/mplabx-ide-windows-installer Microchip microcontroller Development Enviroment)… (already installed on my pc
4.MPLAB XC8 Compiler v1.38
Alright, I will try to program the PIC18LF45K50 using the "\Lora_Mote_Firmware\Precompiled HEX\LoRaMote.hex file.
Unfortunately the PICkit3 Programmer software does not support the PIC18LF45K50 so, first I have to switch the PICkit3 to the “MPLAB mode”
Start the PICKit 3 Programmer > Tools > Revert to MPLAB mode. Close the programmer.
Let’s start MPLAB X IDE and create a new Prebuild project (File > New Project > Prebuild (Hex, Loadable Image) Project
MPLAB X IDE with the loaded hex file. If everything is connected I can run the “Make and Program Device Main Project” button
PICkit3 connected to ICSP, and programming the PIC18LF45K50.
…a few warnings and …
Output:
Currently loaded firmware on PICkit 3
Firmware Suite Version…01.44.26
Firmware type…PIC18F
Target voltage detected
Target Device ID (0x5c80) is a valid Device ID but does not match the expected Device ID (0x5c00) as selected.
Device Erased…
Programming…
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x7fff
configuration memory
Programming/Verify complete
Yes, he’s back again…
The Microchip LoRa Mote connected via USB, I’m using Termite to communicate using the ASCII commands.
I love the internet, all these software, guide’s and tools are freely available. Thank you guy’s for sharing this!
Perhaps this also helped another