Using SPI with 74HC595 and TPIC6B595

thank you for your reply. I test the code with Arduino Nano and it runs very well, but I have same problemwith Mini: The Nano programs very well my end-device using SPI. If I "clone" nano hex firmware using ICSP in a different Arduino Nano it runs. If I do it with an Arduino MINI, it seems to run but it does not program my end device using SPI.
Between arduino nano and arduino Mini, the only difference is in atmega socket?

thank you