Specifications
109
and allow the user to get access to the vehicle. If the system has passed these
requirements then the system will load in the last state which is idle state. In the
Idle state the system will have all the information needed and will be able to
either allow the vehicle to be started. The requirements have been set and since
they have been set the software should be able to handle the procedures. The
routines that will be used for control box unit software will be strictly integer
based functions. Every data that will be passed in will be considered to be an
integer. Since the routine will be used quite often, the application will be saved in
flash memory. The software will handle the messages from the hand held unit by
a message pump. The messages will be stored into a message handler routine.
The message will post to itself and then invoke the correct routine that will allow
the device to be used. Figure 4.4-1 illustrates the flow chart for the design.
Figure 4.4-1: Diagram illustrating the flow chart control box unit.
The control box unit code will involve setting LED’s high or low, setting the relay
to high or low. This will be taken care of in the beginning of the code. In order to
do this, the code must set different ports to outputs so that it can be utilized as an
output. These ports will also be used for headlights, motor relay, red status led,
and green status led. Port four pin four will be used for the motor relay, port four
pin three will be used for the green status led, port four pin five will be used for
the red status led, and port four pin six will be used for the headlight LEDs.
These declarations will be made in the beginning so that the car will not drive. In
order to utilize the control box unit as a access point, there are certain states that
should be created to manage the data that is coming from the end point. The
data will be transferred from the end point (Hand Held Unit) will be character.
This character will determine transition to the different sates listed below states.










