Application Program Examples; Initialization - IDEC LonWorks FC3A-SX5LS1 User Manual

Interface module
Table of Contents

Advertisement

L
W
I
ON
ORKS
NTERFACE

Application Program Examples

This section describes application program examples for initializing the registers in the L
writing receive data to data registers, and reading transmit data from data registers.

Initialization

Before starting L
W
ON
ORKS
have to be initialized. The initialization sequence is illustrated in the chart below:
when(reset) Initialization
Is the register initial-
ization complete?
Start to execute a user program.
The following program is an example of an application program in Neuron C to initialize the L
ule, consisting of initialization codes and a header file. When you modify or create an application program, make sure that
the application program includes the following codes in italics.
Initialization Codes
1.
///////////////////////////////
2.
///
PRAGMA
3.
///////////////////////////////
4.
#pragma scheduler_reset
5.
/********************************************************
6.
Network Variable
7.
********************************************************/
8.
/* Define network variables
9.
/********************************************************
10. Write the software version number to C018h
11. *********************************************************/
12. #define FC3ASX5L_VERSION
13. /********************************************************
14. Write the expansion module ID to C019h
15. *********************************************************/
16. #define EMID_CODE
17. /********************************************************
18. include file
19. *********************************************************/
20. #include
<access.h>
21. #include
<msg_addr.h>
22. #include
<control.h>
23. #include
<status.h>
24. #include
<snvt_lev.h>
25. #include
"fc3asx5l.h"
26. /********************************************************
18
M
ODULE
communication through the network, the data registers in the L
Power up
NO
YES
///
0x10
0x50
/* Refer to the header file shown below */
O
N
C
L
PEN
ET
ONTROLLER
ON
I/O LED goes on.
Initialization is not complete.
*/
W
I
M
U
ORKS
NTERFACE
ODULE
W
interface module,
ON
ORKS
W
interface module
ON
ORKS
W
ON
ORKS
'
M
SER
S
ANUAL
interface mod-

Advertisement

Table of Contents
loading

Table of Contents