Nifty Car: Embedded System: Core |
Updated 2000-1-10 |
| Item | Peripheral | Function |
|
Computer Display devices |
SCI / USART | Sends acquired vehicle data via asynchronous serial. A computer may listen in along with other microcontrollers that operate displays. I would like the speed to be 19.2kbps to maintain speediness while not requiring really fast microcontrollers. |
| Computer | SCI / USART | Receives command to display a string to provide additional information. Maybe something else, too. |
| GPS | Timer0 | Counts the passage of seconds by counting pulses from the pulse per second output on the GPS. This is used to signal the need to send a new time to all devices after a minute. |
| Timer2 | Used for interrupt based software asynchronous serial. | |
| Speed indicators | Timer1 | Counts something with a regular period, although I don't know which of the three options for Timer1 will be used. Timer1 will time the interval between pulses. |
| CCP1 | Captures the Timer1 value at the time of the vehicle speed pulse, or the vehicle speed and engine speed pulses. | |
| CCP2 | Captures the Timer1 value at the time of the engine speed pulse, or is unused if Timer1 uses its own oscillator connected to the PIC. | |
| Security status | External interrupt | Alerts the microcontroller to a change in status of the car, activities around it, or other events that require the microcontroller to awaken from sleep mode. It will primarily be a security interrupt. |
| Keypad status | Interrupt on change | Notifies the microcontroller to a key press on a keypad. |
| Name | PIC16F877 | Connection to | I/O | Function |
| Port A | ||||
| Sync serial clock | RA0 | Various devices |
|
Communications over synchronous serial data bus. |
| Sync serial data | RA1 | Various devices |
|
Communications over synchronous serial data bus. |
| Sync serial control | RA2 | 74HC595 shift register clock |
|
The 74HC595 outputs the slave select lines. This part could be replaced with some decoder or augmented with an additional 74HC595. |
| Sync serial control | RA3 | 74HC595 output register clock |
|
The 74HC595 outputs the slave select lines. This part could be replaced with some decoder or augmented with an additional 74HC595. |
| Time counter | RA4 | One pulse per second on GPS |
|
Triggers an interrupt at a regular interval to update the time, and maybe position, with new GPS data. This will only be functional while the car is running and may not function for a few minutes after the car starts. This could be done by some other polling scheme, but I like this better for now. |
| Security status serial input | RA5 | 74HC165 data output |
|
The 74HC165 is used to serialize input for eight security inputs:
|
| Port B | ||||
| Security interrupt | RB0 (INT) | An OR or NOR gate system |
|
The security interrupt is used to inform the controller of an insecure state registered by one of the eight security inputs:
|
| Serial I/O enable | RB1 | MAX222 (?) !Shutdown input |
|
Enables or disables RS-232 I/O from the MAX222. Disabling the I/O is done to save power while only the security system is active. |
| Key hit | RB4 to RB7 | 74C922s data available output |
|
Informs the controller that user input is available from a keypad interface. |
| Port C | ||||
| Engine speed pulse input | RC1 (CCP2) | Conditioned tachometer pulse |
|
Capture 2 is used to measure the interval between tachometer pulses. The information will be used to calculate engine speed for VDAS. |
| Vehicle speed pulse input | RC2 (CCP1) | Conditioned speed pulse |
|
Capture 1 is used to measure the interval between speedometer pulses. The information will be used to calculate vehicle speed for VDAS. |
| Voice system input / SPI input | RC3 | ISD4002 serial data output |
|
The ISD4002 uses the SPI protocol for serial data transfer. Since this requires separate lines for input and output, the ISD4002's output line could not be connected to the regular serial data bus data line. The SPI hardware of the PIC might not be used to avoid the extra complexity of using two serial I/O schemes internally and having to mess with the SPI hardware when switching between SPI and 3-wire. |
| GPS connection | RC4 | GPS asynchronous RX line |
|
Link to send commands and data to the GPS. Software implemented asynchronous serial is used. |
| GPS connection | RC5 | GPS asynchronous TX line |
|
Link to receive data from the GPS. Software implemented asynchronous serial is used. |
| Real-time data feed | RC6 (TX) | Various devices |
|
The real-time data feed includes current information from VDAS. The information is contained in packets such that other microcontrollers can easily get information relevant to their purpose and ignore the rest. |
| Computer input | RC7 (RX) | RS-232 TX from computer |
|
The computer, or other external device, can issue three commands to the controller:
|
| Port D | ||||
| Keypad input | RD0 to RD3 | 74C922s data outputs |
|
Reads the 4-bit output of one 74C922. Up to 4 74C922s may be connected. |
| Keypad select | RD4 to RD7 | 74C922s data enable |
|
Selects one of the 74C922s to read data from. The 74C922 puts its data output lines in a high impedance state when not selected. |
| Port E | ||||
| Interior siren | RE0 | ??? |
|
Used to activate the interior siren. |
| Exterior siren | RE1 | ??? |
|
Used to activate the exterior siren. |
| Ignition enable | RE3 | ??? |
|
Used to enable and disable the car's ignition. It should also kill the engine if already running. |