The
reticule commands on the 909 are hokey and fairly complex
All reticule commands
from the AS start with:
0x7, 0x27, 0x3
The next byte is the Duty
Cycle byte (DC)
The next two bytes are the
reticule blink rate (IH, IL)
The next 2 bytes are the
Rate (RH, RL)
The trailing 0 is supplied
by the 909 as an Ack to the AS
So we have
0x7,0x27,0x3,DC,IH,IL,RH,RL,Ack
from 909
There are 3 basic PWM
cycles for the reticule, Intensity imposed on top of DutyCycle imposed on top
of Rate.
The basic Intensity is a
22ms cycle time. This is controlled by a counter with a step size of ~2.5us
(yes, micro seconds)
Each step of Intensity adds 2.2ms to the 'on' time ( or 0x3fc = 1020 counts of
~2.5us)
For 0,1,2,3,,,9
Ontime = 0, 2.2ms, 4.4, 6.6,, 19.8ms (out of the 22ms cycle time)
There is never a full 100% 'on time' ,
you can have from all off to 90% on.
The Intensity is the first PWM cycle, it is superimposed on the next 2.
The second is the rate.
Now it gets hokey.
The basic cycle time of rate is 5.85 seconds, with an 'increment' step = 650ms.
So
Rate = 9 means 1/9 of 5.85 = 650ms cycle time
Rate = 8 = 2/9 of 5.85 = 1300ms cycle time
etc.
Rate = 1 = 5.85seconds cycle time
The duty cycle is the third. It has a basic increment of 1/10'th the current
RATE up to 9/10'ths total
For rate = 9
DC = 1 = on 65ms, off 585ms.
DC = 2 = on 130ms, off 120ms.
...
DC = 9 = on 585ms, off 65ms
For rate = 8
DC = 1 = on 130ms, off 1170ms
...
DC = 9 = on 1170ms, off 130ms
How these all fit
together:
Ok, intensity is based on a 22ms cycle with a 2.2ms
increment time.
Duty cycle is also based on a 22ms 'increment' cycle. The DC count = # of 22ms
intervals 'on' flashing at PWM cycle given by Intensity.
Rate counter is based on a 0.601ms increment (should really shift the bytes
right 3, the 3 LSB are always 0, for closer to 4.8ms)
Looking at a data capture, with rate = 9 and default DC (=1) and Intensity = 0
07 27 03 03 00 0A 04 38 00 3
1080
DC RH RL
byte 3 (counting from zero, always :) = 3 * 22ms = 66ms on
Bytes 6,7 (0x438) = 1080 * 0.601ms =
649ms (the 1/10 rule, or close enough)
The more complex ones show it fully (this next one was actually the Rosetta
stone):
Duty Cycle = 9, RATE = 1 and Intensity = 0
07 27 03 F3 00 0A 04 38 00 243 1080
0xF3 * 22ms = 5.346seconds on
0x438 * .601ms = 65ms off, total time = 5.99seconds
This is 9/10'ths on
Duty cycle = 2, Rate = 1
07 27 03 36 00 0A 21 C0 00 54 8640
0x36 * 22ms = 1.18seconds on, 5.19seconds off, total = 6.37seconds
This is 2/10'ths on
Duty cycle = 1, Rate = 1
07 27 03 1B 00 0A 25 F8 00 27 9720
1B * 22ms = 0.594 on, 5.84 off, total time = 6.425 seconds
And 1/10'th
Raw data from the AS to
the 909 for the reticule
Reticule
(final 0 filled in by 909)
The Rate and
DutyCycle are both default = off for these Intensity xfers
Intensity
= 9
07 27 03
0A 23 03 00 00 00 The Intensity =
0x2303 = 8963 counts * 2.5us/count = 22ms on (full brightness)
=8
07 27 03
0A 1F 07 00 00 00
=7
07 27 03
0A 1B 0B 00 00 00
=6
07 27 03 0A
17 0F 00 00 00
=5
07 27 03
0A 13 13 00 00 00 0x1313 = 4883
counts * 2.5us/count = 12.22ms on 50% brightness
=4
07 27 03
0A 0F 17 00 00 00
=3
07 27 03
0A 0B 1B 00 00 00
=2
07 27 03
0A 07 1F 00 00 00
=1
07 27 03
0A 03 23 00 00 00 0x323 = minimum
brightness
=0
07 27 03
0A 00 0A 00 00 00
ALL the
following have Intensity = 0 and Duty Cycle = default = 1
Rate = 9
07 27 03 03 00 0A 04 38 00
=8
07 27 03 06 00 0A 08 70 00
=7
07 27 03 09 00 0A 0C A8 00
=6
07 27 03 0C 00 0A 10 E0 00
=5
07 27 03 0F
00 0A 15 18 00
=4
07 27 03
12 00 0A 19 50 00
=3
07 27 03
15 00 0A 1D 88 00
=2
07 27 03
18 00 0A 21 C0 00
=1
07 27 03
1B 00 0A 25 F8 00
=0
07 27 03
0A 00 0A 00 00 00 No blink!!!
Duty
cycle, all RATE = 9 and Intensity = 0
=9
07 27 03 1B 00 0A 00 78 00
=8
07 27 03 18 00 0A 00 F0 00
=7
07 27 03 15 00 0A 01 68 00
=6
07 27 03 12 00 0A 01 E0 00
=5
07 27 03 0F 00 0A 02 58 00
=4
07 27 03 0C 00 0A 02 D0 00
=3
07 27 03
09 00 0A 03 48 00
=2
07 27 03 06
00 0A 03 C0 00
=1
Forgot
this one!!!
Duty
Cycle, all RATE = 1 and Intensity = 0
=9
07 27 03 F3 00 0A 04 38 00
=8
07 27 03 D8 00 0A 08 70 00
=7
07 27 03 BD 00 0A 0C A8 00
=6
07 27 03 A2 00 0A 10 E0 00
=5
07 27 03
87 00 0A 15 18 00
=4
07 27 03
6C 00 0A 19 50 00
=3
07 27 03
51 00 0A 1D 88 00
=2
07 27 03
36 00 0A 21 C0 00
=1
07 27 03
1B 00 0A 25 F8 00