Protocol to coffeemaker

Aus Protocoljura

Wechseln zu: Navigation, Suche

[bearbeiten] UART parameters

Uart parameters are 9600 8 N 1

[bearbeiten] Bit encoding

The information is only encoded in bits 2 and 5 of the individual UART bytes sent to and from the machine. All other bits have fixed values (Bit 0 is value 0, all other bitshave value 1).

4 UART bytes (byte number 0-3) make up one result byte.


UART byte number 0
0
1
1
2
2
3
3
Bit number in UART byte 2
5
2
5
2
5
2
5
Bit number in result 0
1
2
3
4
5
6
7


Please not that in the documentation on this page the LSB (bit 0) ist on the left of the tables. This is because UARTs send the lsb first. So don't get confused with this reversed bit order when looking at the binary representations of the ASCII chars, they are represented here reverse from normal.


The four UART bytes that make up a real byte are determined by timing. The four bytes are sent end to end, and then there is allways a break of about 8ms between these four-byte-groups.

Example: Switching on the mashine:
The binary data (only data bits shown, LSB is left):
01011111 01011011 01011011 01011111 <8ms break> 01111011 01111111 01011011 01011111 <8ms break>
01111011 01111011 01111111 01011011 <8ms break> 01011011 01011011 01111111 01011011 <8ms break>
01011111 01011011 01111111 01011011 <8ms break> 01011111 01111111 01011011 01011011 <8ms break>
01111011 01111011 01011011 01011011 <min 8ms break>

Here the first four columns as an example:


Bit number 0 1 2 3 4 5 6 7
Bit value 0 1 0 1 1 1 1 1
used bits value

0

1

01

Bit number 0 1 2 3 4 5 6 7
Bit value 0 1 0 1 1 0 1 1
used bits value

0

0

01

Bit number 0 1 2 3 4 5 6 7
Bit value 0 1 0 1 1 0 1 1
used bits value

0

0

00



Bit number 0 1 2 3 4 5 6 7
Bit value 0 1 0 1 1 1 1 1
used bits value

0

1

01

Ergo the result is
01000001


which is the ASCII representation of the Letter 'A'.
Decoding all of the data gives the following command:
AN:01
To which the machine normally answers:
ok:
but this answere is not shown here in the data.


Example for character A

Image:Protokollbeispiele_A.jpg


Two examples:
Turn machine on

ASCII A N  : 0 1 CR LF
HEX 41 4E 3A 30 31 0D 0A
Binary (LSB left) 10000010 01110010 01011100 00001100 10001100 10110000 01010000
machine language (LSB left) 01011111 01011011 01011011 01011111 01111011 01111111 01011011 01011111 01111011 01111011 01111111 01011011 01011011 01011011 01111111 01011011 01011111 01011011 01111111 01011011 01011111 01111111 01011011 01011011 01111011 01111011 01011011 01011011


Turn machine off

ASCII A N  : 0 2 CR LF
HEX 41 4E 3A 30  32  0D 0A
Binary (LSB left) 10000010 01110010 01011100 00001100  01001100  10110000 01010000
machine language (LSB left) 01011111 01011011 01011011 01011111 01111011 01111111 01011011 01011111 01111011 01111011 01111111 01011011 01011011 01011011 01111111 01011011 11111010 11011010 11111110 11011010 01011111 01111111 01011011 01011011 01111011 01111011 01011011 01011011

Persönliche Werkzeuge

sl
דומיין בעברית  דומיין  דומין  תוכנה לניהול  קשרי לקוחות  CRM, ניהול קשרי לקוחות  דומין בעברית  פורומים  ספרדית  גיבוי