- #include "regx52.h"
- #include "lcd1602.h"
- #include "delay.h"
- #include "ir.h"
- unsigned char Num,Address,Command;
- void main()
- {
- LCD_Init();
- LCD_ShowString(1,1,"a");
- IR_Init();
-
- while(1)
- {
- if(IR_GetDataFlag())
- {
- Address=IR_GetAddress();
- Command=IR_GetCommand();
- }
- LCD_ShowHexNum(2,1,Address,2);
- LCD_ShowHexNum(2,5,Command,2);
- }
- }
复制代码 |