Yeah, after reading and cewding something that dosen:t work. I read som kewd in the "Tellstick" project.
After that, i came up with this facts:
The signal is computed as "Manchester", like:
a "1", is actually represented by a "10", and
a "0", is actually represented by a "01".
Whith that clear, we going to show the structure of the package sent(Without the manchester):
b0 b1
+----------+
| Startbit | --- This is quite special, we digg in to this later. OBS: Read the timing for this
+----------+
b1 b27
+-----------+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+---------------+
| Device ID | This is a 26bit long transmitter ID, uniq to all Transmitters | End Device ID |
+-----------+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+---------------+
b27 b28
+---------------------------+
| Group action, Default "1" | --- Like, apply on all recivers in the group, to not do that, set it "1".
+---------------------------+
b28 b29
+----------------------------------------+
| Method, On("10"), Off("01"), Dim("00") |
+----------------------------------------+
b29 b31 b33
+-------------------+-----------+
| Channel/Group ID | Button ID |
+-------------------+-----------+
b32 b35
+---------------------------------------+
| This is the 4bit (16levels) dim value |
+---------------------------------------+
b36 b36
+-----------------------------------------+
| This is just an manchester "0", End bit |
+-----------------------------------------+
After computing, this 33bit:s is computed to 66 manchester bit:s.
After that, the signal is ready for the antenna.
Here is the timings:
NOTE this is the timings AFTER the manchester computing, so atually a unprocessed(before manchester)
1 or 0 is represented by two of the following timings:
'0' bit:
_______
| |
| |
| |_______
|<----->|<----->|
240µs 240µs
'1' bit:
_______
| |
| |
| |__________________________________________
|<----->|<---------------------------------------->|
240µs 1270µs
NOTE
Startbit(b0-1):
This is the start bit, like a wakeup bit, just to show that "Hello, i am transmitting".
The special about this, is that the timing is quite special:
REMEMBER: 240µs up, 2550µs down
Device ID(b1-27):
This is a 26bit long ID that is diffrent to all remote:s. The reason why you have this, is the abillty
to use several buttons on diffrent transmitters. Adding this later on
Group action(b27-28):
Default is just a "1". Not sure, but i thik that if you use a "0", the method is applyed on all the
recivers programmed in the specified group.
Method(b28-29):
NOTE: This is actually ONE bit, the specified numbers is in manchester.
01 - OFF
10 - ON
00 - DIM
00: This may see werry strange, and this is the reason why a chose to represent this in manchester.
This is two manchester zero:s.
Group ID(b29-31):
00 = 1
01 = 2
10 = 3
11 = 4
Button ID(b31-33):
00 = 1
01 = 2
10 = 3
11 = 4
Dim value(b32-35):
This is just an normal binary number, 1-16 on wich dim level to chose.
NOTE: if you use a method like, ON, OFF, exclude this from the package
End bit(b36):
This is just an manchester "0". End bit.
NOTE: Not an ordinary "0", a manchester "0".
----
In my code, this package is sent 4 time:s, whith 10ms delay.
Written by me, oskvadd, 120422.