Jozef,
I now believe my problem is electrical. Only some scenarios work ok, with the others giving me a code = 2 on the I2C end transmission. The code means that the address was wrong, but I am using the same address in the successful scenarios and the failure scenarios. I believe the bus signal quality is the problem.
Init the chip works ok:
init PCF8566 1001011 4B
This exchange works ok: It lights up all segments on the 8 digits (except for the DP),
Select Device and Continue 11100000 E0
Load data pointer 1100000 60 // Note: Writing to chip display memory 0.
Send data
11111111 FF
11111111 FF
11111111 FF
11111111 FF
11111111 FF
11111111 FF
11111111 FF
11111111 FF
This produces 2 digits with all segments lit except for DP
Select Device and Continue 11100000 E0
Load data pointer 1100000 60 / Note: Writing to chip display memory 0.
Send data
11111111 FF
11111111 FF
But if I send it twice, I end up with 4 digits lit, which means it is ignoring the data pointer adddress.
This produces no digits or segments lit and the error message.
Select Device and Continue 11100000 E0
Load data pointer 1100001 61 // Note: Writing to chip memory address 1 instead of 0
Send data
11111111 FF
11111111 FF
Error endTransmission() == 2
I believe I need to look at the quality of the I2C signals getting to the chip.
Thanks so much for your quick replies. I will let you know when I get it working.
Best Regards,
Dudley