Vous êtes sur la page 1sur 5

/*

Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
#define U digitalWrite(13, HIGH);
#define C digitalWrite(13, LOW);
#define T delayMicroseconds(104);
void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);
delay(2000);
//RESET
//RESET
30H | SrtBit
dBit | StopBit |
//RESET
30H | SrtBit
dBit | StopBit |
C T
T
U T
//CHK
30H | SrtBit
dBit | StopBit |
//CHK
30H | SrtBit
dBit | StopBit |
C T
T
U T
delay(350);
//ENEABLE SEQUENCE
//Stacker 36H | SrtBit
it | StopBit |
//Stacker 36H | SrtBit
it | StopBit |
C T
U T
//CHK
36H | SrtBit
it | StopBit |
//CHK
36H | SrtBit
it | StopBit |
C T
U T
delay(3);

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mo
| 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | Mo
C T

C T

C T

C T

U T

U T

C T

C T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mo
| 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | Mo
C T

C T

C T

C T

U T

U T

C T

C T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
| 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | ModB
C T

U T

U T

C T

U T

U T

C T

C T

U T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
| 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | ModB
C T

U T

U T

C T

U T

U T

C T

C T

C T

//ACK
00H | SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
it | StopBit |
//ACK
00H | SrtBit | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ModB
it | StopBit |
C T
C T C T C T C T C T C T C T C T
C T
U T
delay(350);
//BILLTYP 34H | SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
it | StopBit |
//BILLTYP 34H | SrtBit | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | ModB
it | StopBit |
C T
C T C T U T C T U T U T C T C T
U T
U T

//BILLEN1 FFH | SrtBit


it | StopBit |
C T
U T
//BILLEN2 FFH | SrtBit
it | StopBit |
C T
U T
//BILLSC1 FFH | SrtBit
it | StopBit |
C T
U T
//BILLSC2 FFH | SrtBit
it | StopBit |
C T
U T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
U T

U T

U T

U T

U T

U T

U T

U T

C T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
U T

U T

U T

U T

U T

U T

U T

U T

C T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
U T

U T

U T

U T

U T

U T

U T

U T

C T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
U T

U T

U T

U T

U T

U T

U T

U T

C T

//CHK
30H | SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
it | StopBit |
//CHK
30H | SrtBit | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | ModB
it | StopBit |
C T
U T U T C T C T U T U T C T C T
C T
U T
delay(350);
//DISABLE SEQUENCE
//BILLTYP 34H | SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
it | StopBit |
//BILLTYP 34H | SrtBit | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | ModB
it | StopBit |
C T
C T C T U T C T U T U T C T C T
U T
U T
//BILLEN1 00H | SrtBit
it | StopBit |
C T
U T
//BILLEN2 00H | SrtBit
it | StopBit |
C T
U T
//BILLSC1 00H | SrtBit
it | StopBit |
C T
U T
//BILLSC2 00H | SrtBit
it | StopBit |
C T
U T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
C T

C T

C T

C T

C T

C T

C T

C T

C T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
C T

C T

C T

C T

C T

C T

C T

C T

C T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
C T

C T

C T

C T

C T

C T

C T

C T

C T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
C T

C T

C T

C T

C T

C T

C T

C T

C T

//CHK
34H | SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
it | StopBit |
//CHK
34H | SrtBit | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | ModB
it | StopBit |
C T
C T C T U T C T U T U T C T C T
C T
U T
delay(350);
//ENEABLE SEQUENCE

//Stacker 36H | SrtBit


it | StopBit |
//Stacker 36H | SrtBit
it | StopBit |
C T
U T
//CHK
36H | SrtBit
it | StopBit |
//CHK
36H | SrtBit
it | StopBit |
C T
U T
delay(3);

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
| 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | ModB
C T

U T

U T

C T

U T

U T

C T

C T

U T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
| 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | ModB
C T

U T

U T

C T

U T

U T

C T

C T

C T

//ACK
00H | SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
it | StopBit |
//ACK
00H | SrtBit | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ModB
it | StopBit |
C T
C T C T C T C T C T C T C T C T
C T
U T
delay(350);
//BILLTYP 34H | SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
it | StopBit |
//BILLTYP 34H | SrtBit | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | ModB
it | StopBit |
C T
C T C T U T C T U T U T C T C T
U T
U T
//BILLEN1 FFH | SrtBit
it | StopBit |
C T
U T
//BILLEN2 FFH | SrtBit
it | StopBit |
C T
U T
//BILLSC1 FFH | SrtBit
it | StopBit |
C T
U T
//BILLSC2 FFH | SrtBit
it | StopBit |
C T
U T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
U T

U T

U T

U T

U T

U T

U T

U T

C T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
U T

U T

U T

U T

U T

U T

U T

U T

C T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
U T

U T

U T

U T

U T

U T

U T

U T

C T

| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
U T

U T

U T

U T

U T

U T

U T

U T

C T

//CHK
30H | SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ModB
it | StopBit |
//CHK
30H | SrtBit | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | ModB
it | StopBit |
C T
U T U T C T C T U T U T C T C T
C T
U T
delay(1000);
}
void loop() {

// //Stacker 36H
dBit | StopBit |
// //Stacker 36H
dBit | StopBit |
//
T
U T
// //CHK
36H
dBit | StopBit |
// //CHK
36H
dBit | StopBit |
//
T
U T
//
delay(5);
//
// //ACK
00H
dBit | StopBit |
// //ACK
00H
dBit | StopBit |
//
T
U T
//
//
delay(5);

| SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mo
| SrtBit | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | Mo
C T

C T

U T

U T

C T

U T

U T

C T

C T

| SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mo
| SrtBit | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | Mo
C T

C T

U T

U T

C T

U T

U T

C T

C T

| SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mo
| SrtBit | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Mo
C T

//ACCEPT SEQUENCE //POLL


//POLL
33H | SrtBit |
Bit | StopBit |
//POLL
33H | SrtBit |
Bit | StopBit |
C T
T
U T
//CHK
33H | SrtBit |
Bit | StopBit |
//CHK
33H | SrtBit |
Bit | StopBit |
C T
T
U T
delay(350);
//ACCEPT SEQUENCE //ESCROW
//ESCROW 35H | SrtBit |
Bit | StopBit |
//ESCROW 35H | SrtBit |
Bit | StopBit |
C T
T
U T
//ESCROW ST BYTE(Y1)
//Y1
80H | SrtBit |
Bit | StopBit |
//Y1
80H | SrtBit |
Bit | StopBit |
C T
T
U T

C T

C T

C T

C T

C T

C T

C T

C T

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mod
1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | Mod
U T

U T

C T

C T

U T

U T

C T

C T

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mod
1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | Mod
U T

U T

C T

C T

U T

U T

C T

C T

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mod
1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | Mod
U T

C T

U T

C T

U T

U T

C T

C T

0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mod
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | Mod
C T

C T

C T

C T

C T

C T

C T

U T

//CHK
B5H | SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | Mod
Bit | StopBit |
//CHK
B5H | SrtBit | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | Mod
Bit | StopBit |
C T
C T C T C T C T U T U T C T U T
C
T
U T

////RESET
// //RESET
30H
ModBit | StopBit |
// //RESET
30H
ModBit | StopBit |
//
U T
U T
// //CHK
30H
ModBit | StopBit |
// //CHK
30H
ModBit | StopBit |
//
C T
U T
////SETUP
// //SETUP
30H
ModBit | StopBit |
// //SETUP
30H
ModBit | StopBit |
//
U T
U T
// //CHK
31H
ModBit | StopBit |
// //CHK
31H
ModBit | StopBit |
//
C T
U T
delay(2000);
}

| SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| SrtBit | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
C T

C T

C T

C T

C T

U T

U T

C T

C T

| SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| SrtBit | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
C T

C T

C T

C T

C T

U T

U T

C T

C T

| SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| SrtBit | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
C T

U T

C T

C T

C T

U T

U T

C T

C T

| SrtBit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| SrtBit | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
C T

U T

C T

C T

C T

U T

U T

C T

C T