Table of Contents
A Dweet (http://dweet.io) and Freeboard (http://freeboard.io) cloud connector for Renesas 8- and 16-bit microcontrollers. This code turns a compatible evaluation board into a real-time internet enabled device. Once the connector is deployed to a device, the device will automatically connect to the cloud platforms and share it's peripherals using a standardized API. This enables developers to create applications for the evaluation board in a wide variety of languages, without needing to download an SDK or physical access to the device.
- RL78/G14 Demonstration Kit
- Built-in WiFi Connectivity via Gainspan GS1011-MIPS module
- Support for GPS PMOD (beta)
- Support for cellular connectivity via Nimbelink PMOD (beta)
- Support for additional PMODs (in development)
The current firmware code uses the IAR RL78 Workbench development environment. Future code releases will support additonal IDEs including the CubeSuite+ environment and Applilet3 driver generation tool. Notable features include:
- Dweet credentials are automatically generated based on the device mac address, no user intervention required
- Wifi access point can be set using the web provisioning feature of the gainspan module
- A single firmware can be used for all RL78G14 development boards.
-
Connect the RDK board to a USB power source using a USB-Mini cable.
-
The RDK board now needs to be configured for an active wireless access point with an internet connection. Hold down
Switch 2
, Press and release theReset
button, and then release theSwitch 2
button. See this video for a demonstration: Enter Wifi Provisioning Mode. -
Using a smartphone, tablet, or laptop, connect to the wireless access point indicated on the LCD screen.
-
Open a web browser and go to the URL indicated on the LCD screen. Click on the
Wireless and Network Configuration
link. -
To scan for an access point to connect to, click on
Select an Existing Network
-
Pick a wireless AP from the list and click on it's
Select
button: -
Enter the wireless password, leaving the other fields at default values. Click on
next
: -
Click on
Save And Apply
to confirm the selection. -
You should see the following message displayed on the LCD screen. Press the
RESET
button. -
After rebooting, the device will automatically connect and begin producing data. Note the
ID:
field on the third line, and keep an eye on the screen for any errors. -
You will need to re-connect to a wireless access point with an internet connection. Navigate to renesas.freeboard.io. In the "Thing Name" field, enter the thing name displayed on the RL78 LCD and click "SET" [Note: To change the thing name after clicking SET, please refresh the page).
-
You should now see live data from your Renesas device.
-
Download and install the Renesas Flash Programmer V2 from http://am.renesas.com/products/tools/flash_prom_programming/rfp/downloads.jsp#
-
Locate SW5 in the middle of the RL78G14 RDK board. Move Switch 2 of SW5 in the Off position, or towards the green square in this photo:
-
Connect the RDK board to the PC using a USB-Mini cable.
-
The PC should detect a new device. If you see the following message, the driver was installed successfully and you can continue. Otherwise, you must click the following link to Install the Driver.
-
Open
Renesas Flash Programmer V2.00
from the start menu. Click on Next to create a new workspace for the RL78G14. -
Select
RL78
from the Microcontroller dropdown. Then select theR5F104PJ
MCU from the Device Name Column. Finally, enterYRDKRL78G14
as the worksapce and project name, then click Next. -
In the next dialog, open the Tool dropdown list, and select the lowermost COM port. This should correspond to the COM port listed when the device was first added to the system. Then click Next.
-
Click next through the following two dialog boxes, leaving the default values intact.
-
Select
Erase
from the Microcontroller drop down menu, then click the large Start button. If successful, thePASS
text should be visible in green. -
Select
Program
from the Microcontroller drop down menu. -
Download the newest software release from this link. Each release is a snapshot of the entire repository. Extract the downloaded zip file to the PC, then click on the
Browse
button on the Renesas Flash Progreammer, and select the .mot file that corresponds to the software release you would like to deploy: -
Click on the large Start button. The firmware will be deployed to the device, displaying a progress bar and percentage readout. If successful, the
PASS
text should be visible in green. -
Move Switch 2 of SW5 in the On position, or towards the green square in this photo:
-
The new software should begin running on the device, see the user guide above. Repeat the Erase and Program steps for each board to be programmed.
Follow these instructions to install the Virtual USB Com Port driver, required ONLY to deploy firmware to the board. This is not required to use the board.
-
After following the programming instructions above, and after plugging in the RL78 board to your PC, you may have seen the following error:
-
Download the following ZIP file and extract it to a known location (like the Desktop) Renesas USB Drivers
-
Open the Device Manager on your PC. If you are unsure of how to do this, see this tutorial
-
Find the RL78 board in your list of devices. It should appear with a small yellow exclaimation point under the heading
Other Devices
orUSB Devices
. Right click on theUnknown Device
and clickUpdate Driver Software...
-
On the next screen, direct Windows to install the driver manually by clicking on the
Browse my computer for driver software
button. -
Click on the
Browse
button and navigate to the folder in which you extracted the USB Drivers earlier. In this case, they were extracted to the Desktop. Then clickNext
. -
Windows will now install the drivers. You should be greeted by the following success screen:
-
You can now delete the driver files you extracted earlier. If you open up the Device Manager again, you will see the RL78 board correctly installed. Note the COM Port number:
Pseudocode for the firmware:
- Check status of switches. If SW1 and SW3 are held down, enter Gainspan web demo. If SW2 is held down, enter web provisioning mode
- Initialize hardware and read wireless AP data from nonvolatile storage. If no SSID has been saved, enter web provisioning mode
- Read wifi MAC address and execute API call to Dweet server. Dweet credentials will be created if the device is new, and then returned.
- If Dweet credentials could not be retreived from server, use default ID.
- Enter production loop, in which each sensor on the board is sampled and transmitted to the server, every second.
- The watchdog timer has not been enabled in the beta release, adding this will improve reliability when the module is suddenly disconnected from the internet.
- Serial debugging occurs over UART0 (at 115200 baud) which is used by the debugger. We haven't been able to use the USB debugger tool to read this data, we instead used a seperate USB->Serial converter connected to pins 54 and 55.
- Some boards come pre-loaded with an older version of firmware. Please follow the procedure detailed in programming instructions to update to the latest firmware.
- In order to enable the buzzer, please make sure the jumper on JP3 covers the top two pins, which moves the speaker output from the DAC to the PWM.
- If multiple development boards are online at the same time, you may experience connection issues. All RL78 boards share the same resource, which may cause failures in bi-directional communication.
- Upon disconnection, your board should re-connect itself after 10 minutes. You may hit the reset button to speed this up.
- By default, the LED status on the RDKnext website is static. Please click on the 1 or 0 under any LED number to initiate. To turn LEDs on or off, click on the 0 or 1 under the LED number. If webpage is reset, or board ID is switched, LED status will show last configuration used until engaged.
- Rebooting your device will often solve connection issues, please try this first.
- If an error is printed to the LCD screen on line 4 or line 8, and the error does not go away for a few minutes, try manually resetting the board.
- If the RDK board never appears on the web portal, use a smartphone or laptop to verify that the selected wireless access point has an internet connection, particularly to dweet.io and freeboard.io.
- Visit http://dweet.io/follow and input your device's Thing Name to verify successful connection to the Dweet messaging service.
- Please use the most up-to-date browsers when connecting to http://renesas.freeboard.io/ (IE8 or lower will not work, and older versions of Safari, Firefox and Chrome may have difficulty displaying data). The latest version of Firefox has shown to be the most robust.
- Conference center hotspots often have trouble sustaining a connection. Some hotspots do not work well with the Gainspan WiFi chipset. Please try a clean hotspot with little traffic if you experience connection issues (Verizon jetpack hotspots have been tested to work).
- For further support on either Dweet or Freeboard, email [email protected]
- Simple RL78 Dashboard - http://renesas.freeboard.io/
- Expanded RL78 Dashboard (w/ GPS) - http://rl78.freeboard.io/
- RL78 Refrigeratior Demo - http://refrigeration.freeboard.io/
- Distillery Dashboard
- City Air Quality Dashboard
- Humidor Dashboard
- Dweet Homepage & Documentation
- Freeboard Homepage
- YRDKRL78G14 Main Page (With Quick Start Guide)