Specifications
28
The main microcontroller shares the main control unit with two devices requiring
SPI connections, one device requiring an I
2
C connection, and one device
requiring a UART connection. Table 4 shown below shows the pin name, type
and description of the pins that will be utilized to accomplish this interfacing
Pin
Name
Pin Type
Pin Description
SCK1
Input/Output
Synchronous serial clock input/output for SPI1
SDI1
Input
SPI1 data in
SDO1
Output
Spi1 data out
SS1
Input/Output
SPI slave synchronization or frame pulse I/O
SCK2
Input/Output
Synchronous serial clock input/output for SPI2
SDI2
Input
SPI2 data in
SDO2
Output
SPI2 data out
SS2
Input/Output
SPI2 slave synchronization or frame pulse I/O
SCL1
Input/Output
Synchronous serial clock input/output for I2C1
SDA1
Input/Output
Synchronous serial data input/output for I2C1
U1CTS
Input
UART1 clear to send
U1RTS
Output
UART1 ready to send
U1RX
Input
UART1 receive
U1TX
Output
UART1 transmit
Table 4 Pins used for interfacing
2.2.3 Interfacing
The main microcontroller must interface with all of the components in the main
control unit. Along with the dsPIC33FJ256GP710A (main microcontroller) the
main control unit consists of an SHT21 temperature and relative humidity sensor,
an MRF24J40MB ZigBee wireless transceiver, an MRF24WBOMA 802.11b RF
wireless transceiver, and a 7 inch Evervision LCD module.
The interfacing for the relays requires a single wire from the microcontroller I/O
pin, with a darlington array driver in between the microcontroller and the relay.
The array driver is a surface mount chip that contains several internal transistor
circuits. This component ensures the correct current will be delivered to the relay
and that the I/O pin on the microcontroller will not exceed its maximum current