[an error occurred while processing this directive] [an error occurred while processing this directive]
Такой вопрос -
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)
[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]

Отправлено RadiM 12 января 2002 г. 13:21
В ответ на: Keil C51 & bit's отправлено з_а_С 12 января 2002 г. 12:26

>bdata unsigned char Led_var = 0;
>sbit bit_Led4 = Led_var^4;
>sbit bit_Led5 = Led_var^5;

>sbit Red_Led = P1^4;
>sbit Green_Led = P1^5;

>bit flag_switch = 0;
>/*========================= Int 0 interrupt ====*/
>int_int0() interrupt 0 using 1 {
>EA = 0;
>if (Red_Led){
>bit_Led4 = 0; bit_Led5 = 1;
^^^^^^^^
это в первой версии
>if (Red_Led){
>Red_Led = 0; Green_Led =1;
^^^^^^^^
это во второй версии
Но, Red_Led бит порта
bit_Led4 бит Led_var
Или я чего то не понял???

Хотя если что можно примерно так

#define Red_Led P1^4


Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru