Arduino Nano and Arduino Mini both have the same processor - '328P.
Suggests a miswiring between the boards.
You also have a lot of extra stuff in your sketch that the SPI library takes of for you.
I've taken a shot at cleaning it up & left you some notes
#include <SPI.h>
// commented out a bunch of redundant code that SPI.h takes care of for you
// see comments also
//int pll_d=11; //piedino data
//int pll_c=13; //piedino clock
int pll_l=10; //piedino latch
//#define DATAOUT 11//MOSI
//#define DATAIN 12//MISO
//#define SPICLOCK 13//SCK
void setup () {
//missing for - add:
pinMode(8, OUTPUT);
// pinMode(DATAOUT, OUTPUT);
// pinMode(DATAIN, INPUT);
// pinMode(SPICLOCK,OUTPUT);
pinMode(pll_l, OUTPUT);
digitalWrite (pll_l, HIGH); // may not be needed - SPI.begin may do this for you
Serial.print("latch enable up");
SPI.begin(); // move to end of setup?
Serial.begin(9600);
Serial.print("spi begin");
//SPI.setDataMode(SPI_MODE0); // default - don't need
//SPI.setBitOrder(MSBFIRST); // default - don't neeed
SPI.setClockDivider(SPI_CLOCK_DIV128); // why so slow? might as well use shiftout()
// HC595 and TPIC6B595 work just fine at default speed (4 MHz)
// digitalWrite(pll_l,LOW);
// delayMicroseconds(1000);
//Serial.print("latch enable down");
//}
//void loop(){
// digitalWrite(pll_l,HIGH);
WriteADF(0x00, 0x58, 0x00, 0x05); //Reg5
delayMicroseconds(2500); // not needed - make sure shift registers have 0.1uF cap from Vcc pin to Gnd.
WriteADF(0x00, 0x8c, 0x80, 0x3c); //Reg4
delayMicroseconds(2500); // not needed
WriteADF(0x00, 0x00 ,0x04, 0xb3); //Reg3
delayMicroseconds(2500); // not needed
WriteADF(0x00, 0x00, 0x4e, 0x42); //Reg2
delayMicroseconds(2500); // not needed
WriteADF(0x08, 0x00, 0x80, 0x09); //Reg1
delayMicroseconds(2500); // not needed
WriteADF(0x00, 0x3c, 0x00, 0x00); //Reg0
// SPI.end(); // don't need this unless you want to free D11-12-13 for other uses
} // end of setup
int WriteADF(byte a1, byte a2,byte a3,byte a4) {
SPI.transfer(a1);
SPI.transfer(a2);
SPI.transfer(a3);
SPI.transfer(a4);
Toggle();
return 0; // not needed
}
void Toggle() {
digitalWrite(pll_l,HIGH);
delayMicroseconds(1);
digitalWrite(pll_l,LOW); // this leaves SS pin low - normally it is left high after SPI.transfer
// try swapping these around
}
void loop(){
digitalWrite(8,HIGH);
delay(2000);
digitalWrite(8,LOW);
delay(2000);
}