红外NEC编码发射程序_C语言(国外英文资料)
红外NEC编码发射程序_C语言(国外英文资料)
* * * * * * *
Hardware platform: homemade infrared device
Program function: the NEC code is fired according to the key of the matrix keyboard
* * * * * * * * * * * * * * *
I can't tell you how much you want to be
Self-made infrared device: P3 ^ 3 (INT1) by tapping the button grounding. P1 is the matrix keyboard
P0 ^ 7 through s9015 TSAL6200, low-level conduction. P3 HS0038B ^ 2 (INT0).
P0 ^ 6 after the green light, low level conduction. P2 ^ 5 red indicator light, low level conduction.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
# include < reg52. H >
# include < intrins. H >
I can't tell you how much you want to be
Port definitions
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sbit zaibo = P0 ^ 7;
Sbit lvdeng = P0 ^ 6;
I can't tell you how much you want to be
Global variable declaration
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Bit panduan01; / / panduan01 is used to determine whether an nec code corresponds to a binary digit of 0 or 1
Int key = 16; / / key temporary storage key for keyscan ()
Unsigned int temp. / / temp scan the mediation variable for keyscan ()
I can't tell you how much you want to be
Yindao () gene

被折叠的 条评论
为什么被折叠?



