-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoard.h43
139 lines (117 loc) · 6.64 KB
/
Board.h43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
;*********************************************************************************************
;* Board Connections to Other Hardware *
;*-------------------------------------------------------------------------------------------*
;* Board.h43 *
;* Author: eliaschr *
;* Copyright (c) 2019, Elias Chrysocheris *
;* *
;* This program is free software: you can redistribute it and/or modify *
;* it under the terms of the GNU General Public License as published by *
;* the Free Software Foundation, either version 3 of the License, or *
;* (at your option) any later version. *
;* *
;* This program is distributed in the hope that it will be useful, *
;* but WITHOUT ANY WARRANTY; without even the implied warranty of *
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
;* GNU General Public License for more details. *
;* *
;* You should have received a copy of the GNU General Public License *
;* along with this program. If not, see <https://www.gnu.org/licenses/>. *
;*-------------------------------------------------------------------------------------------*
;* In this file all the hardware connections are described. In that way, any change of the *
;* connections on the board is reflected here, in order for the rest of the program to adapt *
;* itself and still function. *
;*********************************************************************************************
;* Note: Correct format of the file is presented when tab space is set to 4
.title "Board Connections and Definitions"
.width 94
.tab 4
.if ($isdefed("__BOARD_DEFS__") == 0)
__BOARD_DEFS__: .equ 1 ;Need to set this in order to avoid double
; inclusions.
;----------------------------------------
; Keyboard Definitions
;========================================
Board_KeyPort: .equ 4 ;Defines the port the keys are connected
Board_Key0: .equ BIT1 ;Abstruct key 0
Board_Key1: .equ BIT2 ;Abstruct key 1
Board_Key2: .equ BIT3 ;Abstruct key 2
Board_Key3: .equ BIT4 ;Abstruct key 3
Board_Key4: .equ BIT7 ;Abstruct key 4
Board_KeyHum: .equ Board_Key4 ;Humidity key
Board_KeyTim: .equ Board_Key0 ;Timer key
Board_KeyPwr: .equ Board_Key1 ;Power key
Board_KeySpd: .equ Board_Key2 ;Speed key
Board_KeyAni: .equ Board_Key3 ;Anion key
;All the keys are active low
;----------------------------------------
; Leds Definitions
;========================================
Board_LedPort: .equ 3 ;Port the led controls are connected
Board_ComCtlPort: .equ 8 ;Port the Common pins are connected
; Displays are common cathode ones
Board_NoScanLedPort: .equ 5 ;Port for the two leds that will not take
; place at the scanning process
Board_Led0: .equ BIT0 ;Abstruct led 0
Board_Led1: .equ BIT1 ;Abstruct led 1
Board_Led2: .equ BIT2 ;Abstruct led 2
Board_Led3: .equ BIT3 ;Abstruct led 3
Board_Led4: .equ BIT4 ;Abstruct led 4
Board_Led5: .equ BIT5 ;Abstruct led 5
Board_Led6: .equ BIT6 ;Abstruct led 6
Board_Led7: .equ BIT7 ;Abstruct led 7
Board_LedNS0: .equ BIT0 ;Abstruct no scanning led 0
Board_LedNS1: .equ BIT1 ;Abstruct no scanning led 1
Board_LedCom: .equ BIT1 ;Common Cathode of Leds
Board_DispCom0: .equ BIT2 ;Common Cathode of 7-segment Display 0
Board_DispCom1: .equ BIT3 ;Common Cathode of 7-segment Display 1
Board_LedPower: .equ Board_Led5 ;Power On led
Board_LedPump: .equ Board_Led3 ;Compresson On led
Board_LedTank: .equ Board_Led2 ;Tank Full led
Board_LedTimer: .equ Board_Led4 ;Timer On led
Board_LedLow: .equ Board_Led0 ;Low Speed Fan led
Board_LedHigh: .equ Board_Led1 ;High Speed Fan led
Board_LedAnion: .equ Board_Led6 ;Anionizer On led
Board_LedNSTank: .equ Board_LedNS1 ;Non scanning led for Tank Full
Board_LedNSAnion: .equ Board_LedNS0 ;Non scanning led for Anionizer
Board_DispA: .equ Board_Led1 ;Display Segment a
Board_DispB: .equ Board_Led0 ;Display Segment b
Board_DispC: .equ Board_Led7 ;Display Segment c
Board_DispD: .equ Board_Led4 ;Display Segment d
Board_DispE: .equ Board_Led6 ;Display Segment e
Board_DispF: .equ Board_Led2 ;Display Segment f
Board_DispG: .equ Board_Led3 ;Display Segment g
Board_DispDp: .equ Board_Led5 ;Display Segment point
;----------------------------------------
; Buzzer Definitions
;========================================
Board_BuzzerPort: .equ 1 ;Port the Buzzer is connected to
Board_BuzzerPin: .equ BIT1 ;Port pin used to drive the buzzer
;----------------------------------------
; Relays Definitions
;========================================
Board_RelPort: .equ 2 ;The port the relays are connected
Board_RelayPump: .equ BIT0 ;Relay that sets the compressor on
Board_RelayFanLow: .equ BIT1 ;Relay that enables the fan at low speed
Board_RelayFanHigh: .equ BIT2 ;Relay that enables the fan at high speed
Board_RelayAnion: .equ BIT3 ;Relay that enables the Anionizer
;----------------------------------------
; Humidity Sensor Definitions
;========================================
Board_THSensorI2CPort: .equ 2 ;I2C Port used for the Humidity and
; Tempertature sensor
;----------------------------------------
; NTC Sensor Definitions
;========================================
Board_NTCPort: .equ 1 ;The port the NTC sensor enable is
; connected to
Board_NTCEnable: .equ BIT4 ;The pin of the port the enable of the NTC
; is connected to
Board_NTCChannel: .equ 5 ;The ADC input channel that will take the
; NTC measurements
;----------------------------------------
; UART RS232 Communication Definitions
;========================================
Board_CommPort: .equ 0 ;The UCAx number to be used for RS232 UART
.include "AutoDefs.h43"
.endif ;__BOARD_DEFS__