Support M487 board

Dependencies:   Modbus nvt_rs485

Committer:
wclin
Date:
Fri Oct 06 02:28:18 2017 +0000
Revision:
0:69a9b661c0ca
1. Support M487 board.; 2. Disable get value from Dip switch, if  def-rs485-port value is 1 in mbed_app.json file.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wclin 0:69a9b661c0ca 1 # Getting started sample with modbus-RS485 on mbed OS
wclin 0:69a9b661c0ca 2
wclin 0:69a9b661c0ca 3
wclin 0:69a9b661c0ca 4 ### Import NuMaker-mbed-modbus-sample from on-line IDE
wclin 0:69a9b661c0ca 5 1. Please choose Nuvoton NuMaker-PFM-XXX as your target platform.
wclin 0:69a9b661c0ca 6 2. Please press the left-up icon "New", then choose "NuMaker Modbus-RS485" from the template list.
wclin 0:69a9b661c0ca 7 3. Your NuMaker-mbed-modbus-sample program is existed.
wclin 0:69a9b661c0ca 8
wclin 0:69a9b661c0ca 9 #### Now compile
wclin 0:69a9b661c0ca 10 Please press compile icon.
wclin 0:69a9b661c0ca 11
wclin 0:69a9b661c0ca 12 #### Burn Code & Execute
wclin 0:69a9b661c0ca 13 1. Connect the board NuMaker-PFM-XXX with your PC by USB cable, then there will be one "mbed" disk.
wclin 0:69a9b661c0ca 14 2. Copy the built binary file into "mbed" disk on you PC.
wclin 0:69a9b661c0ca 15 3. Press device's reset button to execute, and you could get the below log by uart console.
wclin 0:69a9b661c0ca 16 And LED1, LED2 and LED3 will flash.
wclin 0:69a9b661c0ca 17 -------------------------------------------------------------------------------
wclin 0:69a9b661c0ca 18 We will set modbus slave ID-61(0x3d) for the device.
wclin 0:69a9b661c0ca 19
wclin 0:69a9b661c0ca 20 --------------------------------------------------------------------------