Difference between revisions of "BemixOS"
|Line 31:||Line 31:|
Revision as of 01:53, 8 May 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.
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.
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
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.
- 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.
Novel IO Devices
This will be based on sample code for a standard text LCD display.