BGX1: Unterschied zwischen den Versionen
(Die Seite wurde neu angelegt: „ ==Protokoll== Jeder Zugriff über den I²C Bus beinhaltet einen Schreib- und einen Lesezugriff und ist nach folgendem Schema aufgebaut: {| {{BlueTable}} ! …“) |
|||
Zeile 1: | Zeile 1: | ||
− | |||
==Protokoll== | ==Protokoll== | ||
Zeile 30: | Zeile 29: | ||
0x00: '''Reset''' () -> () | 0x00: '''Reset''' () -> () | ||
− | 0x01: '''Move''' ( | + | 0x01: '''Move''' (uint8_t x, uint8_t y) -> () |
− | 0x02: '''Mode''' ( | + | 0x02: '''Mode''' (uint8_t mode) -> () |
− | 0x03: '''FillAll''' ( | + | 0x03: '''FillAll''' (uint8_t pattern) -> () |
− | 0x04: '''Print''' (char text[]) -> ( | + | 0x04: '''Print''' (char text[]) -> (uint8_t x, uint8_t y) |
− | 0x05: '''TextWidth''' (char text[]) -> ( | + | 0x05: '''TextWidth''' (char text[]) -> (uint8_t width) |
− | 0x06: '''PrintProp''' (char text[]) -> ( | + | 0x06: '''PrintProp''' (char text[]) -> (uint8_t x, uint8_t y) |
− | 0x07: '''TextWidthProp''' (char text[]) -> ( | + | 0x07: '''TextWidthProp''' (char text[]) -> (uint8_t width) |
− | 0x08: '''HLine''' (uint8_t length) -> ( | + | 0x08: '''HLine''' (uint8_t length) -> (uint8_t x, uint8_t y) |
− | 0x09: '''VLine''' (uint8_t length) -> ( | + | 0x09: '''VLine''' (uint8_t length) -> (uint8_t x, uint8_t y) |
− | 0x0a: '''Box''' (uint8_t width, uint8_t height) -> ( | + | 0x0a: '''Box''' (uint8_t width, uint8_t height) -> (uint8_t x, uint8_t y) |
Version vom 30. März 2010, 19:35 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)
Portfunktionen:
0x10: SetDDR (uint8_t value) -> ()
0x11: SetPort (uint8_t value) -> ()
0x12: GetPin () -> (uint8_t value)
0x13: GetAnalog (uint8_t idx) -> (uint16_t value)
Tasten, LEDs, etc:
0x20: SetLEDs (uint8_t value) -> ()
0x21: GetKeys () -> (uint8_t value)
0x21: SetIllumination (uint16_t value) -> ()