Пытаюсь настроить передачу через SSP. Реакция нулевая...
void SSP_Init(void) { PINSEL1 |= 0x88; // configure SPI0 pins SSPCR0 = 0x0007; // 8 bit SSPCR1 = 0x02; // enable, master SSPCPSR = 20; // SCK = 7.5 MHz, counter > 2 and even }
unsigned char SSP_write (unsigned char data) { volatile unsigned char result; result = SSPDR; SSPDR = data; // send next SPI channel 0 data while ((SSPSR & 0x10)) ; // wait for transfer completed return result; }
|