diff --git a/extras/Statecharts/NEC.jpg b/extras/Statecharts/NEC.jpg deleted file mode 100644 index 4a0a7fd..0000000 Binary files a/extras/Statecharts/NEC.jpg and /dev/null differ diff --git a/extras/Statecharts/NEC.svg b/extras/Statecharts/NEC.svg new file mode 100644 index 0000000..a2640dd --- /dev/null +++ b/extras/Statecharts/NEC.svg @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 - Standby + + + + + + + + + + 1 - Start Pulse + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + d = duration of the interval between two consecutive falling edges of the IR signal (falling at the IR receiver output); + bc = bitCount; + M0 and M1 are bit 0 and bit 1 marks: + ‣ M0: [d>=M0min && d<=M0max] + ‣ M1: [d>=M1min && d<=M1max] + pbr(b) = push code bits to the right and set code's MSB to b. + + + + + + + + + + 2 - Receiving + + + else / + possiblyHeld=false + + + [duration > GapMin] / + if(d>GapMax) possiblyHeld=false + + + else (pulse duration not OK) + + + [bc==32] + + + Cmd OK / + Save Data, + possiblyHeld=true + + + else (error on Cmd) + + + [protocol==NEC + && bc==16] + + + else (error on Addr) + + + [possiblyHeld && + duration of a + Repetition Mark] + + + [repeatCount < 2] / + repeatCount++ + + + else / keyHeld=true + + + [duration of a + Leading Mark] / + bc=0, repeatCount=0 + + + Addr OK + + + else + + + else + + + M1 / + pbr(1) + bc++ + + + M0 / + pbr(0) + bc++ + + + diff --git a/extras/Statecharts/RC5.jpg b/extras/Statecharts/RC5.jpg deleted file mode 100644 index 2ae7110..0000000 Binary files a/extras/Statecharts/RC5.jpg and /dev/null differ diff --git a/extras/Statecharts/RC5.svg b/extras/Statecharts/RC5.svg new file mode 100644 index 0000000..6df3777 --- /dev/null +++ b/extras/Statecharts/RC5.svg @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 - Rose off Sync + + + + + + + + + + + + + + + + 4 - Fell off Sync + + + + + + + + + + + + + + + + 3 - Fell in Sync + on entry/ + pbl(0), + bc++ + + + + + + + + + + + 1 - Rose in Sync + on entry/ + pbl(1), + bc++ + + + + + + + + + + + 0 - Standby + + + + + + d = duration of the interval between two consecutive changes in the IR signal; + bc = bitCount; + S = short duration (d>=Smin && d<=Smax); + L = long duration (d>=Lmin && d<=Lmax); + pbl(b) = push code bits to the left and set code's LSB to b. + + + + + + If the signal period is OK and toggle bit din't change, then the key was held; + tgl = toggle; + rptCnt = repetitions counter; + rpt = number of repetions to be ignored. + + + + + + + + lastBitTime OK && + tgl == lastTgl + + + + + + + + rptCnt<rpt + + + + + + + + rptCnt++ + + + + + + + + tgl = lastTgl; + lastBitTime = Time; + + + + + + + + keyHeld=true + + + + + + + + get addr and cmd; + keyHeld=false; + rptCnt=0; + + + + + + + + start of + decode() + + + + + + + + end of + decode() + + + + + S + + + S + + + else + + + S + + + L + + + else + + + L + + + S + + + [d>GapMin] / code=0, bc=0 + + + else + + + [bc==13] / + pbl(0), decode() + + + else + + + else + + + [bc==13] / + pbl(1), decode() + + + else + + + Yes + + + Yes + + + + + No + + + + + No + + + + + + + + + diff --git a/extras/Statecharts/SAMSUNG.jpg b/extras/Statecharts/SAMSUNG.jpg deleted file mode 100644 index 97b2e25..0000000 Binary files a/extras/Statecharts/SAMSUNG.jpg and /dev/null differ diff --git a/extras/Statecharts/SAMSUNG.svg b/extras/Statecharts/SAMSUNG.svg new file mode 100644 index 0000000..0747455 --- /dev/null +++ b/extras/Statecharts/SAMSUNG.svg @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + d = duration = interval between two consecutive rising edges of the IR signal (falling at the IR sensor output); + bc = bitCount; + M0 and M1 are bit 0 and bit 1 marks: + ‣ M0: [d>=M0min && d<=M0max] + ‣ M1: [d>=M1min && d<=M1max] + + + + + + + + + + 0 - Standby + + + + + + + + + + 1 - Start Pulse + + + + + + + + + + 2 - Receiving + on exit/ + Shift auxByte bits to the Right, + bc++ + + + + + + + + + + + + + + + + + + + + + + else / + possiblyHeld=false + + + [duration > GapMin] / + if(d>GapMax) possiblyHeld=false + + + else (not a Leading Mark) + + + [duration of a + Leading Mark] / bc=0 + + + else + + + M0 + + + M1 / + set code + MSB to 1 + + + else + + + [bc == 12] / + Shift auxByte 4 bits to the right, + set address high byte to auxByte + + + [bc == 8] / + set address low byte + to auxByte + + + else / + keyHeld=true + + + [repeatCount<2] / + repeatCount++ + + + [bc == 20] / + save auxByte in command + + + [possiblyHeld && + command == previousCommand] + + + else / keyHeld=false, possiblyHeld=true, repeatCount=0 + + + diff --git a/extras/Statecharts/SAMSUNG32.jpg b/extras/Statecharts/SAMSUNG32.jpg deleted file mode 100644 index 89092f6..0000000 Binary files a/extras/Statecharts/SAMSUNG32.jpg and /dev/null differ diff --git a/extras/Statecharts/SAMSUNG32.svg b/extras/Statecharts/SAMSUNG32.svg new file mode 100644 index 0000000..e182e36 --- /dev/null +++ b/extras/Statecharts/SAMSUNG32.svg @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 - Standby + + + + + + + + + + 1 - Start Pulse + + + + + + + + + + 2 - Receiving + on exit/ + Shift signal[byteIndex] bits to the Right, + bc++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + d = duration = interval between two consecutive rising edges of the IR signal (falling at the IR sensor output); + bc = bitCount; + signal is an array of 4 bytes, indexed by byteIndex; + M0 and M1 are bit 0 and bit 1 marks: + ‣ M0: [d>=M0min && d<=M0max] + ‣ M1: [d>=M1min && d<=M1max] + + + else / + possiblyHeld=false + + + [duration > GapMin] / + if(d>GapMax) possiblyHeld=false + + + Not a Leading Mark + + + [duration of a Leading Mark] / + bc=0, byteIndex=0 + + + else + + + M0 + + + M1 / + set signal[byteIndex] + MSB to 1 + + + else + + + [bc==8 || bc==16 || bc==24] / + byteIndex++ + + + else / + keyHeld=true + + + [repeatCount<2] / + repeatCount++ + + + [possiblyHeld && + command == previousCommand] + + + else / keyHeld=false, + possiblyHeld=true, repeatCount=0 + + + [bc==32] + + + else (it's OK) + + + [address not OK || command not OK] + + + diff --git a/extras/Statecharts/SIRC_basic.jpg b/extras/Statecharts/SIRC_basic.jpg deleted file mode 100644 index 210c376..0000000 Binary files a/extras/Statecharts/SIRC_basic.jpg and /dev/null differ diff --git a/extras/Statecharts/SIRC_basic.svg b/extras/Statecharts/SIRC_basic.svg new file mode 100644 index 0000000..055ee8c --- /dev/null +++ b/extras/Statecharts/SIRC_basic.svg @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Standby + + + + + + + + + + Receiving + on exit / + Shift code bits to the Right, + bc++ + + + + + + + + + + + + + d= duration of the interval between two consecutive falling edges of the IR signal (rising at the IR sensor output); + bc = bitCount; + M0 and M1 are bit 0 and bit 1 marks: + ‣ M0: [d>=M0min && d<=M0max] + ‣ M1: [d>=M1min && d<=M1max] + + + [d > GapMin] / bc=0 + + + pulse duration not OK + + + M1 / + set code's + MSB to 1 + + + M0 + + + else + + + [bc == LastBit] / decode() + + + diff --git a/extras/Statecharts/SIRC_multi.jpg b/extras/Statecharts/SIRC_multi.jpg deleted file mode 100644 index cf11b8a..0000000 Binary files a/extras/Statecharts/SIRC_multi.jpg and /dev/null differ diff --git a/extras/Statecharts/SIRC_multi.svg b/extras/Statecharts/SIRC_multi.svg new file mode 100644 index 0000000..88afa69 --- /dev/null +++ b/extras/Statecharts/SIRC_multi.svg @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + Standby + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Receiving + a + b + Note: Exit(a) has priority over Exit(b) + + + + + + + + + + + + d = duration of the interval between two consecutive falling edges of the IR signal (rising at the IR sensor output); + bc = bitCount; firstBC = bitCount of the first frame; firstCode = code received in the first frame; + M0 and M1 are bit 0 and bit 1 marks: + ‣ M0: [d>=M0min && d<=M0max] + ‣ M1: [d>=M1min && d<=M1max] + pbr(b) = push code bits to the right and set code's MSB to b. + + + + + else / possiblyHeld=false + + + else (bit count error) + + + else (code error) + + + [code == firstCode] / decode(), + keyHeld=false, possiblyHeld=true + + + else (code error) + + + [frame==1] + + + [frame==2] + + + [frame==3] + + + [bc == firstBC] + + + + + [d >= GapMin] / + bc=0, code=0, frame=1, + if(d>GapMax) possiblyHeld=false + + + [bc is 12, 15 or 20] / + firstBC=bc, bc=0, + firstCode=code, + code=0, frame=2 + + + [code==firstCode]/ + code=0, bc=0, + frame=3 + + + else + + + [frame==2] + + + [not bitMark && not Gap + && (frame 1 || frame 2)] + + + M1 / + pbr(1) + bc++ + + + M0 / + pbr(0) + bc++ + + + [not bitMark && frame 3] + + + [d >= GapMin && + d <= GapMax] + + + [frame==1] + + + [possiblyHeld && bc == firstBC && code == firstCode] / keyHeld = true + + + else + + +