I'm quite new to both the IOW24 and the SPI protokol and facing some problems.

Expanding "TTL" outputs using a 74HC595 controlled by the IOW24 SPI is working fine.
Next step was using a 74HC165 for TTL input via SPI.
Setting the inputs on the HC165 to the binary repres. of decimal 00 to 04 give me the right
response within the REPORT $09in.
However, when setting inputs to the next value (05 dec) I'll getting 06 as REPORT9 response.
06,07 and 08 decimal working fine but 09 give 10 as response.
Also quite some other values give weird results I can't explain or even understand ....


I tried all the 4 options for CPOL and CPHA. Selecting 00, 01 and 10 give the results as above.
Setting CPOL=1 CPHA=1 results also in errors like
HC165 in - Report9 result
00 - 00
01 - 02
02 - 04
03 - 06
Data rate is 0.0625Mb/sec
Report $09 out flags byte = 01 (one byte to read, no handshake or SS)
Registerclock of the HC165 is controlled by PA.0 (forcing low for 200ms prior to sending
the Report$09 out and Report$09 in)
SI (pin 15) on HC165 is open
QH (pin 9) connected to SPI-MISO IOW24
CLK(pin 2) connected to SPI-SCK IOW24
Any tips to get me on the right way are appreciated!!

Thankyou in advance
Your's
Willem