Run "IAR Embedded Workbench for ARM".
Click “File-Open-Workspace” in menu.
Open “RQ.eww” located in /IAR/6.20.4 folder.
You can see the below C source template.
Input C source in “void main(void) function”.
=> Send “string” to COM port of PC.
Put double quotation mark(“ “) for string.
null character (‘\0’) is included in last part of string automatically.
=> Send “character” to COM port of PC.
Put single quotation mark (‘ ‘) for character.
- void User_Task_Every_10ms(void)
=> It is called by every 10msec (1/100 sec), such as timer function.
It is normally used for regular operation.
=> \r : Carriage Return (for current line)
=> \n : Line Feed (next line)
puts("\r\n\nHello, RQ World!\r\n"); //Output String to PC
putch('R'); //Output a Character to PC
Compile it by click “Project-Make” in menu, or press F7.
You can see the compile status and result in the below.
(errors : 0, warnings : 0)
Below is connections for each part.
(PC ó USB cable ó smart controller ó Li-Poly battery)
Run “RQC Firmware Upgrade Tool”.
Click “Browse” button to load Firmware file (RQ.bin)
RQ.bin file is selected. Check “Keep RQC Internal Setting”.
This maintains basic configuration of RQ smart controller.
,such as (Zero position setting, IR remote controller…)
“ERROR” message is shown as belowif RQ smart controller is NOT ready for upload firmware.
Firmware is downloaded to RQ smart controller.
Run “Hyper Terminal” software.
Put any name in Name section.
Hyper Terminal available COM port number is shown as Device Manager Ports section is indicated.
In this example, “COM 3” is used for this project.
HyperTerminal COM port configuration
(115200 bps, 8bits, None, 1, None)
You can see “Connected” section in the below section.
Press “P” button of RQ smart controller,
then, it shows strings in Hyper Terminal through COM port.