Running the program is starting
Simply put, the application code is written as follows, from the different creation to the original of the running code:
Embedded input A section of code:
This code is from the line video to visit: <div id= "Anvsoftjavascriptslideshow" style= "width:650px; height:370px; position:relative; " > <script src= "Anvsoftjavascriptslideshow-1.0.0.min.js?xml_path=slides.xml" ></script>
To form a regular link map, we have to get links #include <reg2051 at run time. h> #define K1 p3_4 #define Csbout p3_5//original code sent #define CSBOUT p3_5//New run code received # Define csb-0.034 #define BG p3_3 unsigned char csbds,opto,digit,buffer[3],xm2,xm0,key,jpjs;//display identity unsigned char convert [10]=[0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6fl;//0~9 Segment Code unsigned int s,t,i, xx,j,sj1,sj2,sj3,mqs,sx1;bit Cl;void CSBCJ (); void Delay (j); Delay function void scanled (); Show function void Timetobuffer (); Show conversion function void Keyscan (); void K1cl (); void K2cl (); void K3cl (); void K4cl (); void Offmsd (); void main ()//main function {ea=1; Open interrupt tmod=0x11; Set timer 0 to count, set timer 1 timing eto=1; eto=1;//Timer 0 is count, set timer 1 timing eto=1; Timer 0 interrupt allows et1=1; Timer 1 Interrupt Allowed th0=0x00; tl0=0x9e; th1=0x57; csbds=0; Csbint=1; Csbout=1; cl=0; Opto=0xff; jpjs=0; sjl=45; sj2=200; sj3=400; K4CL (); Tr1=1; while (1) {Keyscan (); if (jpjs<1) {CSBCJ (); if (S>SJ3) {else if (s<sj1) {buffer[2]=0x76; buffer[1]=0x76; buffer[0]=0x76; } else if (s<sj1)} buffer[2]=0x40; buffer[1]=0x40; buffer[0]=0x40; } else Timetobuffer (); } else Timetobuffer (); Convert value to LED code OFFMSD (); Scanled (); Display function if (S<SJ2) bg=0; bg=1; }} void Scanled ()//Display function module {dight=0x04; for (i=0; i=3; i++)//3-digit display { p3=~digit&opto; Show single digit p1=~buffer in turn; Display data to send P1 port delay (20); Delay processing p1=0xff; P1 High level (off) if ((p3&0x10) ==0)//3 digits of the sentence is displayed key=0; digit>>=1; Loop right 1 bit}} void Timetobuffer ()//Conversion code breaker function module
{xm0=s/100; xm1= (S-100*XM0)/10; XM2=S-100*XM0-10*XM1; BUFFER[2]=CONVERT[XM2]; BUFFER[1]=CONVERT[XM1]; BUFFER[0]=CONVERT[XM0]; } void Delay (i) {while (-i); } void Timerlint (void) Interrupt 3 using 2 {th1=0x9e; tl1=0x57; csbds++; if (Csbds) =40) {csbds=0; cl=1; }} void Csbcj () {if (cl==1) {trl=0; th0=0x00; tl0=0x00; i=10; while (i--) {csbout-!csbout; } tro=1; I=mqs; First zone while (i--) {} i=0; WHile (csbint) {i++; if (i>=2450)//upper value csbint=0; } tr0=0; th1=0x9e; tl1=0x57; T=th0; T=t*256+tl0; S=T*CSBC/2; Tr1=1; cl=0; } }
void Keyscan ()//keyboard handling function} xx=0; if (kl!=1)//Determine if the switch is pressed {delay (400); Delay jitter if (kl!=1)//Determine if the switch presses {while (! K1) {delay (30); xx++; } if (xx>2000) {jpjs++; if (jpjs>4) jpjs=0; } xx-0; Switch (JPJS) {Case 1; k1cl (); Brenk; Case 2; K2cl (); Brenk; Case 3; K3cl (); Brenk; Case 4; K4cl (); Brenk; }}}} VoiD k1cl (); {sjl=sj1+5; if (sj1>100) sj1=30; s=sj1; } void K2cl () {sj2=sj2+5; if (sj2>500) sj2=40; S=SJ2; } void K3cl () {sj3=sj3+10; if (sj3>500) sj3=100; } void K4cl () {sx1=sj1-1; SX1=SX1/CSBC; mqs=sx1/4.5; } void Offmsd () {if (buffer[0]==0x3f) buffer[0] = 0x00; }
After linking, the image running system that can display the line is running
<script>anvsoftjavascriptslideshow.init ("Anvsoftjavascriptslideshow");</script> </div>
This article is from the "Huang" blog, make sure to keep this source http://1572091hyl10.blog.51cto.com/1562091/1908607
JAVA SCRIPT Slideshow Embedded development for VOID Run link development