RC-04
Software
Demo application
This demo illustrates unidirectional non-networking communication between the RC-04 controller and the CK-USB-04
kit equipped with the TR-52B module connected to PC with the IQRF IDE Terminal running. The
RC04_simple.c
program is intended for the controller and the
E02-RX
(one of basic IQRF examples) for the TR module in the CK kit.
Both are available on IQRF CD and IQRF website. To upload the
RC04_simple.hex
to the RC-04 via RF – see
Application note AN009 – IQRF wireless upload. Switching to RF PGM mode after reset is enabled by default.
In idle state the controller stays in Sleep mode allowing wake-up by any pushbutton. After wake-up the battery
voltage is checked and LEDs flashing indicates pressing the button and accumulator condition. Then respective
command is sent to CK-USB-04 and the controller gets to sleep again.
Buttons
Function
•
S1
text sent: "S1x"
x=0 if battery O.K. otherwise x=1
•
S2
text sent: "S2x" -"-
•
S3
text sent: "S3x" -"-
•
S4
text sent: "S4x" -"-
•
S3 + S4 for more than 5 s
enter RF PGM mode
•
S2 for more than 0.7 s
leave RF PGM mode
LED indication
•
button S1 to S4
1 x flash green (battery O.K.) / red (battery exhausted).
•
RF PGM indication
See the Application note AN009 – IQRF wireless upload.
Caution
: Select the proper version of Demo according to IQRF OS version (2.11 or 3.xx) implemented in RC-04.
To distinguish OS version, catch Module Info which is always sent by this Demo application just before switching to
RF PGM mode in IQRF IDE Terminal. Show hexa checkbox should be checked. OS version is in buffer
moduleINFO[4]
. See the picture above and IQRF OS User's guide.
Example:
moduleINFO[0–7]:
[0] [1] [2] [3] [4] [5] [6] [7]
3C 5D 00 01
30
03 39 11
moduleINFO[4] = 30
means OS v3.00
moduleINFO[4] = 2B
means OS v2.11
© 2011 MICRORISC s.r.o.
www.iqrf.org
MNRC04_110926
Page 4