You are on page 1of 5

AUTONOMOUS AIRPLANE PROJECT

IOIO Protocol Specifications


[Type the document subtitle]
Moheb Mofied Ragheb 18-Nov-11

[Type the abstract of the document here. The abstract is typically a short summary of the contents of the document. Type the abstract of the document here. The abstract is typically a short summary of the contents of the document.]

Message length and contents:


Assuming that the length of the message doesnt affect on the performance or the efficiency of sending/receiving . The message consists of three parts: 1. Message Recipient 2. Command 3. Message Data Message Data bits is partitioned between the Mobile internal devices and IOIO based on some conditions mentioned later in this document.

Message Recipients:
1 2 3 4 5 6 7 8 Figure Byte1

0: IOIO board will receive the message 1: Internal devices will receive the message

Message Recipient Using this approach the message could be sent to one of the two recipients.

Commands:

Command Parameters Message Recipients Commands

IOIO Commands: Commands used to control the IOIO: 1. 2. 3. 4. 5. 6. 7. 8. 9. Define Analog Port Define Digital Port Define PWM Port Get Digital Port Get Port Voltage Release Port Set Digital Port Set Pulse Width Soft Reset

Mobile Internal devices Control Messages: Commands used to control the mobile internal devices (camera, gyroscope sensor, accelerometer, and gps) like initializing them, reset them, testingetc.

(Commands and tests are not decided yet)

Message Data:

52

Message Recipients

Commands

Message Data bytes (48 bytes)

Message Data bits are used for passing the parameter for the IOIO commands and mobile internal devices commands. The IOIO consists of 48 pins; each pin will be represented in one byte. We will need 48 bytes for message data. Those 48 bytes can also be used for Internal Devices data.

IOIO Pin Byte Description: 1 2 3 4 5 6 7 8

Control bit

Data bits

Control bit=0: The pin isnt selected to execute the command on it. Control bit=1: The pin is selected to execute the command on it. Data bits are used for analog, digital, or PWM output data.

IOIO Commands:
Command Message[1] IOIO/Internal Device Soft Reset () 0 Message[2] Message[3] Command Number 0 Command Parameter Message[4] Command Parameter Message[552] Message Data

No parameters for this command.

Define Analog Port(PortNum


ber)

Set the corresponding byte of the pin to be analog by 128 (control bit=1)(Ex: Pin3 Message[7]=128) Set the corresponding byte of the pin to be digital by 128

Define Digital Port(PortNum


ber,PortDire ction,PortMo de)

Port Direction

Port Mode

Define PWM Port(PortNum


ber, PortMode)

Port Mode

Set the corresponding byte of the pin to be PWM by 128 Set the corresponding byte of the pin to be get digital value from by 128 Set the corresponding byte of the pin to be get port voltage from by 128 Set the corresponding byte of the pin to be released by 128 Set the corresponding byte of the pin to set by digital value by 128 + Digital value Set the corresponding byte of the pin to set by pulse width value by 128 + Pulse Width value

Get Digital Port(PortNum


ber,PortValu e)

Get Port Voltage(Port


Number)

Release Port(PortNum
ber)

Set Digital Port(PortNum


ber,PortValu e)

Set Pulse Width(PortNu


mber,PulseWi dth)

You might also like