BGX1: Unterschied zwischen den Versionen
Zeile 47: | Zeile 47: | ||
0x0a: '''Box''' (uint8_t width, uint8_t height) -> (uint8_t x, uint8_t y) | 0x0a: '''Box''' (uint8_t width, uint8_t height) -> (uint8_t x, uint8_t y) | ||
+ | |||
+ | 0x0b: '''DrawBitmap''' (uint8_t width, uint8_t height, uint8_t bitmap[]) -> (uint8_t x, uint8_t y) | ||
Portfunktionen: | Portfunktionen: | ||
− | 0x10: ''' | + | 0x10: '''SyncPort''' (uint8_t ddr, uint8_t port) -> (uint8_t pin) |
0x11: '''GetAnalog''' (uint8_t idx) -> (uint16_t value) | 0x11: '''GetAnalog''' (uint8_t idx) -> (uint16_t value) | ||
Zeile 58: | Zeile 60: | ||
Tasten, LEDs, etc: | Tasten, LEDs, etc: | ||
− | 0x20: ''' | + | 0x20: '''SyncInterface''' (uint8_t leds) -> (uint8_t keys) |
− | |||
− | |||
0x21: '''SetIllumination''' (uint16_t value) -> () | 0x21: '''SetIllumination''' (uint16_t value) -> () | ||
[[Category:NIBObee]] | [[Category:NIBObee]] |
Version vom 2. April 2010, 10:06 Uhr
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: DrawBitmap (uint8_t width, uint8_t height, uint8_t bitmap[]) -> (uint8_t x, uint8_t y)
Portfunktionen:
0x10: SyncPort (uint8_t ddr, uint8_t port) -> (uint8_t pin)
0x11: GetAnalog (uint8_t idx) -> (uint16_t value)
Tasten, LEDs, etc:
0x20: SyncInterface (uint8_t leds) -> (uint8_t keys)
0x21: SetIllumination (uint16_t value) -> ()