/* Name: button control 8X8LED dot matrix screen display
Graphic
Description: Each time you press K1, it will make 8X8LED
The dot matrix screen displays different graphics.
This example uses both external interrupts and settings.
Interrupted.
*/
#include
#include
#define uchar unsigned char
#define uint unsigned int
/ / Graphic code to be displayed
Uchar code M[][8]=
{
{0x00, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x00}, // Figure 1
{0x00, 0x38, 0x44, 0x54, 0x44, 0x38, 0x00, 0x00}, // Figure 2
{0x00, 0x20, 0x30, 0x38, 0x3c, 0x3e, 0x00, 0x00} // Figure 3
};
Uchar i,j;
/ / Main program
Void main()
{
P0=0xff;
P1=0xff;
TMOD=0x01; //T0 mode 1
TH0=(65536-2000)/256; //2ms timing
TL0=(65536-2000)%256;
IT0=1; //fall edge trigger
IE=0x83; //Allow timer 0, external 0 interrupt
i=0xff; //The initial value of i is set to 0xff, starting with 0 after adding 1
While(1);
}
[1] [2]Tpd Compliant Vapes,Original Onlyrelx Vape,Disposable E-Cigarette Onlyrelx,Vapeorizer Pen
Shenzhen Onlyrelx Technology Co.,Ltd , https://www.onlyrelxtech.com