реклама на сайте
подробности

 
 
> Проблемы с TMR2
loghir
сообщение May 9 2011, 07:28
Сообщение #1


Участник
*

Группа: Участник
Сообщений: 63
Регистрация: 13-03-11
Пользователь №: 63 577



Доброго времени суток!
при попытке откомпилить код
Код
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
}

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

что ему не так?!
Go to the top of the page
 
+Quote Post



Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 25th July 2025 - 21:21
Рейтинг@Mail.ru


Страница сгенерированна за 0.01373 секунд с 7
ELECTRONIX ©2004-2016