Требуется программист в Зеленограде
- обработка данных с датчиков; ColdFire; 40 тыс. e-mail:jobsmp@pochta.ru |
*pSPORT0_RCR1 = 0x4000;
*pSPORT0_RCR2 = 0x0006;
//*pSPORT0_RCLKDIV = 0x0080;
//*pSPORT0_RFSDIV = 0x0007;
//*pSPORT0_RX16 = 0x55; // Use 16-bit Access Macro to Write Register
*pSPORT0_TCR1 = 0x4E02;
*pSPORT0_TCR2 = 0x0006;
*pSPORT0_TCLKDIV = 0x0080;
*pSPORT0_TFSDIV = 0x0006;
//*pSPORT0_TX16 = 0x00; // Use 16-bit Access Macro to Write Register
*pSPORT0_TCR1 |= TSPEN; // Enable SPORT0 Transmitter
*pSPORT0_RCR1 |= RSPEN; // Enable SPORT0 Transmitter
for(m = 0; m <= 327680; m++) {
for(m = 0; m <= VEC_SIZE-1; m++) {
while(!(*pSPORT0_STAT & TXHRE));
*pSPORT0_TX16 = 0x72;
while(!(*pSPORT0_STAT & RXNE));
spectrum[m] = *pSPORT0_RX16;
}
for(m = 0; m <= VEC_SIZE-1; m++) {
while (!(*pUART_LSR & TEMT)) { };
while (!(*pUART_LSR & THRE)) { };
*pUART_THR = spectrum[m];
}
}