Microchip LoRa Mote broken

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!

LoRa Mote User’s Guide

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” :wink:

Let’s grab some stuff together:
1 First the source code for the Mote. LoRa Technology Mote (LCD version)

  1. 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 :wink:
    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…:wink:

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 :wink:

3 Likes

The warnings indicate something is not quite right… In this case you are programming a pic18 LF 45k50 (3.3V) device while setting MPLAB to the pic18 F 45k50 (5V) version. Might be better to use the right device, with the right voltage, next time to prevent damage to the controller.

Definitely, this is a important message! I forgot to tell but of course I’ve adapted it first before proceeding.
As you can see in the screenshot, MPLAB tells you exactly how and where to do that.

1 Like

Hi @IOT_Marco,

I have currently acquired 2 Microchip Motes as the one you posted here.
http://www.microchip.com/DevelopmentTools/ProductDetails.aspx?PartNO=dm164138

I intend to implement a tracking and monitoring system based on LoRaWAN. But first I am testing out a P2P communication between the two motes. I succedded in using Termite to send commands for radio transmission but what I am looking for is a way to program the mote in order to introduce a loop that sends the temperature info from one mote to another.

I am really at loss on how to code the motes. I dwelled into the source code provided using MPLAB X but I couldn’t figure out where I can implement the looping .

Could you point me in the right way to program these motes?

Thank you.

Nesan

Hi Nesan25,

Sorry for the late response, I overlooked your question. Your idea is very interesting, you can’t program the module I mean, build that loop with these configuration commands.
The only thing I can think of is change the firmware of the onboard microcontroller PIC18LF25K50 or PIC18LF45K50

You guys are awesome.

Another question, is it possible to modify the existing code using this method ?
For example, the start menu shows Microchip Mote / LoRa demo / V 1.0.1 Code, then is this possible to be modified, like Microchip Mote / Daffy Duck / V 1.0.1 Code ?
Might be a bit ridiculous but I’d like to know and make it sure for me :slight_smile:

Thanks !