CS 179: Project in Architecture/Embedded Systems

CS 179J: Project in Architecture / Embedded Systems


eBlock Protocol Defenition

  1. Due to power restrictions an eBlock cannot constantly send the current status of the block. Thus to communicate between blocks we send packets. There are 3 types of packets : YES, NO, and ERROR. There is a constant.h file which specifies the numerical values associated with these packets
  2. To transmit the packets we use the built in UART, set at 1200 baud. There are built in functions found in the sci.h and sci.c files which enable a designer to specify the value to transmit and the process is automatically taken care of.
  3. An eBlock keeps track of its current state. Upon power, the state is set to ERROR. In the case of a button (or other sensor eBlocks) it will quickly sense if the button is pressed or not pressed and this internal state will be updated. In the case of an LED eBlock (or other output or intermediate eBlock) it must wait until another eBlock is plugged in and sends a packet updating its internal state.
  4. Every eBlock which has a transmit (tx) line must send a packet every 3 seconds. If the eBlock has a change of state (i.e. a button goes from NO to YES), this update is immediately sent and the 3 second timeout is reset.
  5. Every eBlock which has a recieve (rx) line must recieve a packet every 5 seconds to indicate the state of that input. This will give the transmitting block a chance to send a packet even if their timeouts are slightly misaligned. If a packet is not recieved within the 5 seconds it assumes the connected eBlock has failed and will generate an ERROR.