Hi Marco,
It’s great that the 16 keys are controlled via HA—that’s excellent! And you’re right about the 100 kΩ resistors; with PhotoMOS relays, a floating pin can’t trigger the LED. The issue was specific to the CD4066 setup (using spare parts I had lying around
) in my V1.
The good news is that we’re using the same protocol. Your A5 F4 / A5 F6 corresponds exactly to my A5 7C / A5 7E; this represents writing to position p5 of the display RAM, where bit 0x02 toggles every 500 ms (the flashing separator).
I suspect that 17th bit is a capture artifact, or perhaps you’re counting one extra edge (likely the final WR edge after CS goes high, or the CS edge itself). If you don’t see the LED or the padlock icon change, it’s probably because those updates occur in bursts mixing 1-byte and 2-byte transactions—which your analyzer might miss if it’s expecting fixed-length frames.
A transaction encompasses everything that happens between the CS line going low and then high again. I only read DIO when CS is low, and I reset everything on every CS edge.
DIO is read on the rising edge of WR, assembled LSB first. I also read DIO on the falling edge, which is essential for distinguishing between a 3 and a 9 in the ones digit.
1 byte = command (39 at the start of a burst, 89 at the end, plus 09, A1, C1, 01, etc.).
2 bytes = write operation (address followed by data). Address decoding (bit-reversed): 05=p0, 85=p1, 45=p2, C5=p3, 25=p4, A5=p5, 65=p6, E5=p7, 15=p8, 95=p9, 55=p10, D5=p11, 35=p12, B5=p13, 75=p14, F5=p15.
What works for me to identify the bits is keeping a copy of the p0–p15 RAM and logging every change. I turn each piece of equipment on and off from the panel and note which position and bit change. You can do the same for the locked/unlocked padlock state.
On my spa, it’s:
heater = p0 bit 0x10, blower = p8, panel = p12, pumps = p13, pump 3 = p14 bit 7, LED = p7 (read on the falling edge). Since our panels are identical, the settings might be the same for you.
The displayed number: tens in p4, units in p3. Tables (rising edge masked by 0xFC):
Tens: 7C=0, 0C=1, F8=2, BC=3, 8C=4
Units: 7C=0, 0C=1, F8=2, BC=3 or 9, 8C=4, B4=5, F4=6, 1C=7, FC=8. For BC, check the byte read on the falling edge: 5F = 3, DF = 9.
As for the repository, I’ve closed it. But here are the essentials of the protocol so you can move forward.
Francki