при попытке откомпилить код
Код
void init (void) // настройка TMR2 на 100 Hz.
{
INTCON.GIE = 1; // разрешены все немаскированные прерывания
T2CON.TOUTPS3 = 1; // выбор коэф. выходного делителя TMR2
T2CON.TOUTPS2 = 1; // выбор коэф. выходного делителя TMR2
T2CON.TOUTPS1 = 1; // выбор коэф. выходного делителя TMR2
T2CON.TOUTPS0 = 1; // выбор коэф. выходного делителя TMR2
T2CON.T2CKPS1 = 1; // выбор коэф. предделителя TMR2
T2CON.T2CKPS0 = 0; // выбор коэф. предделителя TMR2
PR2 = 195; // предустановка TMR2
T2CON.TMR2ON = 1; // включение TMR2
}
{
INTCON.GIE = 1; // разрешены все немаскированные прерывания
T2CON.TOUTPS3 = 1; // выбор коэф. выходного делителя TMR2
T2CON.TOUTPS2 = 1; // выбор коэф. выходного делителя TMR2
T2CON.TOUTPS1 = 1; // выбор коэф. выходного делителя TMR2
T2CON.TOUTPS0 = 1; // выбор коэф. выходного делителя TMR2
T2CON.T2CKPS1 = 1; // выбор коэф. предделителя TMR2
T2CON.T2CKPS0 = 0; // выбор коэф. предделителя TMR2
PR2 = 195; // предустановка TMR2
T2CON.TMR2ON = 1; // включение TMR2
}
PICC 8.05pl2 выдает ошибки на всех битах настройки:
Error [196] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 55.12 struct/union required
Error [182] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 55.15 illegal conversion between types
Error [196] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 56.15 struct/union required
Error [182] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 56.18 illegal conversion between types
Error [196] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 57.15 struct/union required
Error [182] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 57.18 illegal conversion between types
Error [196] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 58.15 struct/union required
Error [182] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 58.18 illegal conversion between types
Error [196] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 59.15 struct/union required
Error [182] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 59.18 illegal conversion between types
Error [196] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 60.15 struct/union required
Error [182] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 60.18 illegal conversion between types
Error [196] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 61.15 struct/union required
Error [182] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 61.18 illegal conversion between types
Error [196] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 63.14 struct/union required
Error [182] D:\!!!!!!!!!!\Books_TXT_2\book_program\PIC_CI\My_program\work_program_timer_dima\1.c; 63.17 illegal conversion between types
что ему не так?!