[an error occurred while processing this directive]
|
Что-то в трех соснах потерялся. Вроде всё правильно, но не работает, не чего не шлет в uart. Всё началось с того что не мог получить байт, теперь вообще не чего не шлет...
E-mail:
info@telesys.ru
#include "iom8535.my"
#include "io8535.h"
#include "ina90.h"
unsigned char ch;
unsigned int q1=0;
unsigned int q2=0;
//-------------------------------------------------------------------
interrupt [UART_RX_vect] void UART_RX_interupt(void)
{ ch = UDR; UDR=ch;
}
//------------------------------------------------------------------
interrupt [SPI_STC_vect] void SPI_interupt (void)
{ SPDR = 0xAA; if (q1++>100) {q1=0;UDR = '3';}
}
//------------------------------------------------------------------
void main(void)
{ UBRR = 10000000 / 9600 / 16 - 1; // set the baud rate
UCR |= (1<
//----------------- Init SPI ----------------------
DDRB = ((1<<5)|(1<<7)|(1<<4)); //Set MOSI and SCK output,all others input
SPCR = (1<
while(1) { if (q2++>10000) {q2=0;UDR = '2';} _WDR();}
}
Ответы
Перейти к списку ответов
|||
Конференция
|||
Архив
|||
Главная страница
|||
Содержание