//32.768kHz PLLon fbus=4.9152MHz
DDRD = 0x0f;
PTD = 0x0f;//k--sclk----cs2
//SPI rising edge
SPCR=0x22;
//baud=(2*4.9152)/(2*2)=2.5MHz<6.5MHz[此处要与MC33594允许频率适应]
//spi(void)
unsigned char i;
SPDR = RCHData;
for(i=0;i<6;)i++;
while(!(SPSCR&SPSCR_SPTE_MASK));
SPDR = LCHData;
for(i=0;i<6;)i++;
while(!(SPSCR&SPSCR_SPTE_MASK));
//end 由GP32控制MC33594 |