ACV XBee PIC State Machines
The PIC that interfaces with the XBee communicates with the XBee radio and Motor Driver PICs over UART, and with the Security Controller PIC over SPI. When the Security Controller PIC sends it new scan data, the XBee PIC interprets the scan and sends out team finding or atoll capturing messages as needed. When the XBee PIC receives data from the radio, it passes along the motor commands to the Motor Driver PICs.
ACV XBee PIC State Machine Hierarchy
ACV XBee PIC Main State Machine
ACV XBee PIC Transmit State Machine
ACV XBee PIC Receive State Machine
ACV XBee PIC SPI State Machine
Security Controller PIC State Machine
The PIC that interfaces with the Security Controller communicates with the RFID PIC and the Xbee PIC over SPI, and with the Security Controller over UART. When the RFID PIC sets a signal line high to indicate that it has new data, this PIC begins the cycle of extracting the serial number from the RFID PIC, obtaining a security key from the Security Controller (if the serial number belonged to an atoll), and sending the serial number and security key to the Xbee PIC.
RFID PIC State Machine
The PIC that interfaces with the RFID Reader communicates with the Security Controller PIC over SPI. When a new scan is received, the RFID PIC interprets the ASCII bytes, converts them to hex values, and sends them to the Security Controller PIC.