PIC I/O Board Pin Layout ver 2.3 6/04/01 The I/O configuration of the PIC chip is generally: RA -- digital and analog inputs RB -- digital outputs RC -- digital inputs and Locator signal I/O PIC name & pin -- header pins Inputs: 1 battery level; (analog x01) RA0/AN0 2 R1 (- opamp) R2 (+ opamp) 1 battery charge; (analog x02) RA1/AN1 3 R3 (- opamp) R4 (+ opamp) 1 PIR heat/motion detector (digital x04) RA2 4 L1 1 locator signal strength; (analog x08) RA3/AN3 5 L2 1 sonar ping pulse; (digital x80) RB7 28 L8 1 serial locator data; (capture x02) RC1/CCP2 12 L4 4 bumper switches; RF (digital x01) RC0 11 L14 LF (digital x08) RC3 14 L16 RR (digital x10) RC4 15 L20 LR (digital x20) RC5 16 L18 Total: 6 binary bits, 1 serial data bit, 3 8-bit analog. Outputs: 2 bits steering -- Left (digital x01) RB0 21 R8 (740x buf) Right (digital x02) RB1 22 R6 (740x buf) 4 bits drive motor -- Fwd low (digital x04) RB2 23 R10 (740x buf) Fwd med (digital x08) RB3 24 R12 (740x buf) Bkw low (digital x10) RB4 25 R14 (740x buf) Bkw med (digital x20) RB5 26 R16 (740x buf) 1 serial locator signal; (compare x04) RC2/CCP1 13 L3 Total: 6 binary bits, 1 serial data bit. TINI Communication pins: 2 serial RX/TX to TINI host (serial) RC6/TX 17 -- RC7/RX 18 -- Total: 2 serial data bits. This uses 19 of the 22 available I/O pins on the PIC, leaving 3 digital I/O bits available for expansion: 1 digital I/O or counter; RA4/TOC1 6 L12 1 digital I/O; RA5 7 R2 1 digital I/O with interrupt RB6 27 L10 The remaining pins are: MCLR(+V) 1 OSC1,2 9,10 L6 (clock out) Vss(gnd) 8,19 odd pins Vdd(+5) 20 Note: R9 and R11 to Power Card are connected to steering switch. Host Communication Packet layout Status Input (PIC to HOST), 8 bytes -- B0 -- 1 byte of stream syncronization pattern data; B1 -- 1 byte of binary switch status; b0 -- (available) b1 -- (available) b2 -- RF collision b3 -- LF collision b4 -- RR collision b5 -- LR collision b6 -- PIR sensor b7 -- (available) B2 -- 1 byte of locator signal data; As received from CCP2 input. B3 -- 1 byte of locator signal strength; From AN3 A->D convertor. B4 -- 1 byte of battery level data; As received from AN0 A->D convertor. B5 -- 1 byte of battery charge data; As received from AN1 A->D convertor. B6 -- 1 byte sonar ping pulse time; Counted from RB7 input. B7 -- auxiliary; For expansion. Control Output (HOST to PIC), 5 bytes -- B0 -- 1 byte of stream syncronization pattern data (not stored in PIC buffer); B1 -- 1 byte of binary control signal; b0 -- steer left b1 -- steer right b2 -- drive FF b3 -- drive FS b4 -- drive BF b5 -- drive BS b6 -- (reserved) b7 -- (reserved) B2 -- 1 byte of locator signal data; To be transmitted via the CCP1 output. B3,4 -- 2 byte auxiliary; For expansion.