EasyManuals Logo

IDEC OpenNet series User Manual

IDEC OpenNet series
427 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #380 background imageLoading...
Page #380 background image
26: LONWORKS INTERFACE MODULE
OPENNET CONTROLLER USERS MANUAL 26-19
27. Main Program
28. *********************************************************/
29. when(reset){
30. initialize();
31. /* Insert other commands here to execute within when(reset), if required. */
32. }
Header File (fc3asx5l.h)
1. //Header File: fc3asx5l.h
2. /*************************************/
3. /* Common Definition */
4. /*************************************/
5. #define LED_OFF 1
6. #define LED_ON 0
7. #define OK 1
8. #define NG 0
9. #define HIGH 1
10. #define LOW 0
11. /* Timer Value */
12. #define DTm_5sec 5000
13. /*************************************/
14. /* Memory Mapped I/O Definition */
15. /*************************************/
16. #define IO_GA_BASE 0xc000 // I/O Base Address
17. /*************************************/
18. /* Digital I/O Register Address */
19. /*************************************/
20. #define GA_FCDR (IO_GA_BASE + 0x00) // Data Register
21. #define GA_CSR_ERR (IO_GA_BASE + 0x12) // Error Register
22. #define GA_FVER (IO_GA_BASE + 0x18) // I/O Version Register
23. #define GA_EMID (IO_GA_BASE + 0x19) // Expansion Module ID Register
24. #define GA_BCTL (IO_GA_BASE + 0x1a)
25. /*************************************/
26. /* I/O Register Bit Definition */
27. /*************************************/
28. #define BCTL_CENABLE 0x10
29. #define BCTL_NWR_REQ 0x04
30. #define BCTL_NENABLE 0x01
31. #define MAX_FCDR_DATA_LEN 16
32. /* Define Neuron Chip IO pins as follows. */
33. IO_0 output bit PO_RUN_LED = HIGH;
34. IO_1 output bit PO_ERR_LED = HIGH;
35. IO_2 output bit PO_IO_LED = HIGH;
36. IO_3 input bit PI_ODE;
37. IO_4 input bit PI_RUN;
38. IO_6 output bit PO_F_ERR = LOW;
39. /*************************************/
40. /* Prototype */
41. /*************************************/
42. void initialize(void);
43. void init_internal_io(void);
44. void init_external_io(void);
45. void init_gate_array(void);
46.
47. /*************************************/
48. /* Global Variable */
49. /*************************************/
50. mtimer io_check_timer;
51. unsigned char csr_error_data; // CSR_ERROR Reg. data save area
52.
53. void initialize(void){
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IDEC OpenNet series and is the answer not in the manual?

IDEC OpenNet series Specifications

General IconGeneral
BrandIDEC
ModelOpenNet series
CategoryController
LanguageEnglish

Related product manuals