BGX1: Unterschied zwischen den Versionen
Zeile 55: | Zeile 55: | ||
0x0d: '''LineTo''' (uint8_t x, uint8_t y) -> () | 0x0d: '''LineTo''' (uint8_t x, uint8_t y) -> () | ||
+ | |||
+ | Terminal: | ||
+ | |||
+ | 0x20: '''TermClear''' () -> () | ||
+ | |||
+ | 0x21: '''TermGoto''' (uint8_t col, uint8_t row) -> () | ||
+ | |||
+ | 0x22: '''TermScroll''' (uint8_t lines) -> () | ||
+ | |||
+ | 0x23: '''TermPrint''' (char text[]) -> () | ||
Portfunktionen: | Portfunktionen: | ||
− | + | 0x30: '''SyncPort''' (uint8_t ddr, uint8_t port) -> (uint8_t pin) | |
− | + | 0x31: '''GetAnalog''' (uint8_t idx) -> (uint16_t value) | |
Tasten, LEDs, etc: | Tasten, LEDs, etc: | ||
− | + | 0x40: '''SyncInterface''' (uint8_t leds) -> (uint8_t keys) | |
− | + | 0x41: '''SetIllumination''' (uint16_t value) -> () | |
[[Category:NIBObee]] | [[Category:NIBObee]] | ||
[[Category:BGX1]] | [[Category:BGX1]] |
Version vom 2. April 2010, 19:49 Uhr
Die BGX1 (niboBee Graphics eXtension 1) ist eine Erweiterung die den NIBObee um ein Grafikdisplay mit 4 Eingabetastern und 4 LEDs erweitert. Die Erweiterung verfügt über einen ATmega8 in dem Routinen zur Grafikausgabe fertig implementiert sind.
Protokoll
Jeder Zugriff über den I²C Bus beinhaltet einen Schreib- und einen Lesezugriff und ist nach folgendem Schema aufgebaut:
Address | Write | Command | W-Data | Address | Read | R-Data |
---|---|---|---|---|---|---|
7 Bit | 1 Bit | 8 Bit | [m Byte] | 7 Bit | 1 Bit | [n Byte] |
Falls Keine Daten zurück übertragen werden entfällt das zweite Datenpaket.
Im folgenden Abschnitt werden die verschiedenen Befehle nach folgendem Muster aufgelistet:
Command: Name (W-Data) -> (R-Data)
Kommandos
Display:
0x00: Reset () -> ()
0x01: Move (uint8_t x, uint8_t y) -> ()
0x02: Mode (uint8_t mode) -> ()
0x03: FillAll (uint8_t pattern) -> ()
0x04: Print (char text[]) -> (uint8_t x, uint8_t y)
0x05: TextWidth (char text[]) -> (uint8_t width)
0x06: PrintProp (char text[]) -> (uint8_t x, uint8_t y)
0x07: TextWidthProp (char text[]) -> (uint8_t width)
0x08: HLine (uint8_t length) -> (uint8_t x, uint8_t y)
0x09: VLine (uint8_t length) -> (uint8_t x, uint8_t y)
0x0a: Box (uint8_t width, uint8_t height) -> (uint8_t x, uint8_t y)
0x0b: Bitmap (uint8_t width, uint8_t height, uint8_t bitmap[]) -> (uint8_t x, uint8_t y)
0x0c: EmbeddedImage (uint8_t id) -> (uint8_t x, uint8_t y)
0x0d: LineTo (uint8_t x, uint8_t y) -> ()
Terminal:
0x20: TermClear () -> ()
0x21: TermGoto (uint8_t col, uint8_t row) -> ()
0x22: TermScroll (uint8_t lines) -> ()
0x23: TermPrint (char text[]) -> ()
Portfunktionen:
0x30: SyncPort (uint8_t ddr, uint8_t port) -> (uint8_t pin)
0x31: GetAnalog (uint8_t idx) -> (uint16_t value)
Tasten, LEDs, etc:
0x40: SyncInterface (uint8_t leds) -> (uint8_t keys)
0x41: SetIllumination (uint16_t value) -> ()