How to burn the bootloader
Ardbox GPRS
5 July, 2019 by
How to burn the bootloader
Serzh Ohanyan

Introduction

Ardbox GPRS and Ardbox WIFI & BLE use the SPI pins MISO and MOSI to communicate with the module GPRS Sim800L and the module WIFI ESP32. For that reason, while using these modules, the SPI communication is disabled for another purpose. 

In order to burn the bootloader, Arduino has established that the way to communicate two Arduinos is by SPI communication. So, it's necessary to disable the modules. For this purpose, we have the Pin2. Connecting Pin2 to the ground we can disable the modules GPRS/WIFI and use SPI communication pins.  

NOTE: This tutorial can be followed for all the IndustrialShields familiy devices except with the Ardbox DALI and Ardbox WiFi (NOT DO IT WITH THESE TWO DEVICES). With the Ardbox GPRS, you have to disable the GPRS module as will be explained. 

Requirements


Our M-Duino or Ardbox PLC


Burning the Bootloader

There are different ways to burn the Bootloader of our Ardbox GPRS/WIFI. The most important thing is to use an Arduino board which has SPI communication. So, it's possible to use M-Duino or Ardbox because they are based on Arduino Mega and Arduino Leonardo respectively. The Arduino board, M-Duino or Ardbox is the burner.  


Burning the Bootloader

In this case, we use an Ardbox as a burner. Ardbox Analog or Relay, it doesn't matter. In the Ardbox burner, we have to upload a program from Arduino. Open Arduino IDE. Go to File -> Examples -> 11.ArduinoISP -> ArduinoISP

 Ardbox as a burner

You have two changes to the two Reset defines.


#define RESET 10 // Use pin 10 to reset the target rather than SS

and 

#define RESET 4


by 


#define RESET 2 // Use pin 10 to reset the target rather than SS

and 

#define RESET 2


Now you are in a position to UPLOAD the program to the Ardbox Burner. 

Once is uploaded make the connections. Connections: 


Ardbox burnerArdbox GPRS/WIFI
MISOMISO
MOSIMOSI
SCKSCK
Pin2RESET
GNDGND
5V5V


Once you have the connections made, disable the GPRS or WIFI module connecting Pin2 from the Ardbox GPRS/WIFI to the ground. Here you have a diagram: 


connecting Pin2 from the Ardbox GPRS/WIFI to the ground

 

Now you can burn the Arduino Leonardo of the Ardbox GPRS/WIFI. For that, having the Ardbox Burner connected to the PC, go to Tools -> Programmer -> Arduino as ISP.   


 Burn the Arduino Leonardo of the Ardbox GPRS/WIFI.

Now burn the Bootloader. Go to Tools -> Burn Bootloader.


Burn the Bootloader 


This process will take some time. If everything went well, you will see a success message. 

Find what you are looking for
Search in our Blog

How to burn the bootloader
Serzh Ohanyan
5 July, 2019
Share this post
Archive

Looking for your ideal Programmable Logic Controller?

Take a look at this product comparison with other industrial controllers Arduino-based. 

We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.


Industrial PLC comparison >>>

Do you want more information?

Just fill the form!

Tell me more!