Difference between revisions of "BemixOS"

From SlugWiki
Jump to: navigation, search
Line 4: Line 4:
 
BemixOS will interrupt on a timer in order to perform IO and other tasks.
 
BemixOS will interrupt on a timer in order to perform IO and other tasks.
  
In general, a call to a BemixOS output function simply sets the appropriate interrupt flag and the interrupt handler does the real work of transferring the output buffer. BemixOS input functions simply read from a buffer. It is the responsiblility of the interrupt handler to fill the buffer, usually on each timer interrupt.
+
In general, a call to a BemixOS output function simply sets the appropriate interrupt flag and the interrupt handler does the real work of transferring the output buffer. BemixOS input functions simply read from a buffer. It is the responsiblility of the interrupt handler to fill the buffer, usually on each timer interrupt. This applies to the 4E Network and IO Buffer.
  
 
==4E Network==
 
==4E Network==
Line 21: Line 21:
 
* automatic software debouncing of inputs
 
* automatic software debouncing of inputs
 
* provide functions such as getButton(buttonAddress) and readButton(buttonAddress) that wait for a button push and simply read the IO Buffer, respectively.
 
* provide functions such as getButton(buttonAddress) and readButton(buttonAddress) that wait for a button push and simply read the IO Buffer, respectively.
 +
 +
==LCD Display==
 +
This will be based on sample code for a standard text LCD display.
 +
 +
==See Also==
 +
*[[Bemix]]
 +
*[[4E Network]]

Revision as of 17:37, 28 April 2006

BemixOS is an attempt to standardize all the microcontrollers used in Bemix through a uniform software layer. The user will be able to send and recieve packets on the 4E network in the same way, regardless of what type of PIC is used or whether it is in the Bemis bathroom or the Walcott bathroom. Also, all the general purpose IO will appear to be the same even if it is multiplexed. There may also be built in support for devices such as LCD displays, seven segment displays, and matrix keypads.

Interrupts

BemixOS will interrupt on a timer in order to perform IO and other tasks.

In general, a call to a BemixOS output function simply sets the appropriate interrupt flag and the interrupt handler does the real work of transferring the output buffer. BemixOS input functions simply read from a buffer. It is the responsiblility of the interrupt handler to fill the buffer, usually on each timer interrupt. This applies to the 4E Network and IO Buffer.

4E Network

This be version 1.0 of the curruent version of the 4E network code. Improvements will include:

  • fix collision bug where new packets overwrite old ones even if the new one has the wrong address
  • fully interrupt driven reception and transmission
  • imporved collision avoidence
  • write in a way such that it is portable between PICs
  • add error handling

EEPROM

BemixOS will provide support for reading and writing to the PIC's EEPROM. This will be used for storing the PIC's address, timer calibration values, passwords, and other user defined data that should not be hardcoded.

IO Buffer

  • buffer all general purpose IO, even if it goes directly to an IO port without multiplexing.
  • automatic software debouncing of inputs
  • provide functions such as getButton(buttonAddress) and readButton(buttonAddress) that wait for a button push and simply read the IO Buffer, respectively.

LCD Display

This will be based on sample code for a standard text LCD display.

See Also