Section 24: Independent button control of the start and pause of the marquee

Publisher:JFETLatest update time:2016-03-14 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Opening remarks:
In the previous section, we talked about how to control the speed of the marquee with an independent button. This section will continue to teach you a knowledge point: how to effectively associate the button with the start and pause of the marquee through an intermediate variable.
For details, please see the source code explanation.

(1) Hardware platform: Based on Zhu Zhaoqi's 51 single-chip microcomputer learning board. Based on the previous section, add a start and pause button, and use the S13 key in the matrix keyboard as the start and pause independent button. Remember to keep the output line P0.4 output low level to simulate the trigger ground GND of the independent button.

(2) Function realization:
Based on the previous section, the 1st to 8th LED lights are always off. From the 9th to the 16th LED lights, they light up one by one and only one light can be lit at a time. Each time the independent button S13 is pressed, the running marquee will pause and the paused marquee will run. The rest is the same as the previous section. Use S1 to change the direction and use S5 and S9 to change the speed.

(3)The source code is explained as follows:
#include "REG52.H"

#define const_voice_short 40 //Duration of the buzzer short call

#define const_key_time1 20 //Debounce delay time of the key
#define const_key_time2 20 //Debounce delay time of the key
#define const_key_time3 20 //Debounce delay time of the key
#define const_key_time4 20 //Debounce delay time of the key

void initial_myself();    
void initial_peripheral();
void delay_short(unsigned int uiDelayShort); 
void delay_long(unsigned int uiDelaylong);

void led_flicker_09_16(); //The 9th to 16th LED marquee program, light up one by one and only one can be lit at a time.
void hc595_drive(unsigned char ucLedStatusTemp16_09,unsigned char ucLedStatusTemp08_01);
void led_update(); //LED update function
void T0_time(); //Timer interrupt function

void key_service(); //Key service application
void key_scan(); //Key scan function is placed in the timer interrupt

sbit hc595_sh_dr=P2^3;    
sbit hc595_st_dr=P2^4;  
sbit hc595_ds_dr=P2^5;  

sbit beep_dr=P2^7; //Buzzer driver IO port
sbit key_sr1=P0^0; //Corresponding to the S1 key of Zhu Zhaoqi learning board
sbit key_sr2=P0^1; //Corresponding to the S5 key of Zhu Zhaoqi learning board
sbit key_sr3=P0^2; //Corresponding to the S9 key of Zhu Zhaoqi learning board sbit key_sr4=P0^3; //Corresponding to the
S13 key of Zhu Zhaoqi learning board

key_gnd_dr=P0^4; //Simulate the ground GND of the independent button, so it must always output a low levelunsigned

char ucKeySec=0; //The number of the triggered buttonunsigned

int uiKeyTimeCnt1=0; //Key debounce delay
counterunsigned char ucKeyLock1=0; //The variable flag that self-locks after the button is triggeredunsigned

int uiKeyTimeCnt2=0; //Key debounce delay
counterunsigned char ucKeyLock2=0; //The variable flag that self-locks after the button is

triggeredunsigned int uiKeyTimeCnt3=0; //Key debounce delay counterunsigned
char ucKeyLock3=0; //The variable flag that self-locks after the button is


triggeredunsigned int uiKeyTimeCnt4=0; //Key debounce delay
counterunsigned char ucKeyLock4=0; //The variable flag that self-locks after the button is triggeredunsigned

int uiVoiceCnt=0; //Buzzer beeping duration counter

unsigned char ucLed_dr1=0; //Represents the on and off status of the 16 lights, 0 represents off, 1 represents on
unsigned char ucLed_dr2=0;
unsigned char ucLed_dr3=0;
unsigned char ucLed_dr4=0;
unsigned char ucLed_dr5=0;
unsigned char ucLed_dr6=0;
unsigned char ucLed_dr7=0;
unsigned char ucLed_dr8=0;
unsigned char ucLed_dr9=0;
unsigned char ucLed_dr10=0;
unsigned char ucLed_dr11=0;
unsigned char ucLed_dr12=0;
unsigned char ucLed_dr13=0;
unsigned char ucLed_dr14=0;
unsigned char ucLed_dr15=0;
unsigned char ucLed_dr16=0;

unsigned char ucLed_update=0; //Refresh variables. Update once every time the state of the LED light is changed.


unsigned char ucLedStep_09_16=0; //Step variable for the 9th to 16th LED marqueeunsigned
int uiTimeCnt_09_16=0; //Delay counter for counting the number of timer interrupts for the 9th to 16th LED marqueeunsigned

char ucLedStatus16_09=0; //Intermediate variable representing the output status of the underlying 74HC595unsigned
char ucLedStatus08_01=0; //Intermediate variable representing the output status of the underlying 74HC595unsigned

char ucLedDirFlag=0; //Direction variable, the core variable that associates the button with the marquee, 0 represents the positive direction, 1 represents the reverse directionunsigned
int uiSetTimeLevel_09_16=300; //Speed ​​variable, the larger the value, the slower the speed, the smaller the value, the faster the speed.
unsigned char ucLedStartFlag=1; //Variables for starting and pausing, 0 represents pausing, 1 represents starting

void main() 
  {
   initial_myself();  
   delay_long(100);   
   initial_peripheral(); 
   while(1)   
   {
      led_flicker_09_16(); //The marquee program for the 9th to 16th LEDs, lighting up one by one and only one at a time.
          led_update(); //LED update function
      key_service(); //Application program for key service
   }

}


void key_scan()//The key scanning function is placed in the timer interrupt
{  

  if(key_sr1==1)//IO is high level, indicating that the key is not pressed. At this time, some flag bits should be cleared in time
  {
     ucKeyLock1=0; //Clear the key self-locking flag
     uiKeyTimeCnt1=0;//Clear the key de-bounce delay counter. This line is very clever. I figured it out in actual combat.      
  }
  else if(ucKeyLock1==0)//A key is pressed, and it is the first time it is pressed
  {
     uiKeyTimeCnt1++; //Accumulate the number of timer interruptsif
     (uiKeyTimeCnt1>const_key_time1)
     {
        uiKeyTimeCnt1=0; 
        ucKeyLock1=1; //Set the self-locking key to avoid continuous triggeringucKeySec
        =1; //Trigger key No. 1
     }
  }

  if(key_sr2==1)//IO is high, indicating that the key is not pressed. At this time, some flags should be cleared in time
  {
     ucKeyLock2=0; //Clear the key self-locking
     flaguiKeyTimeCnt2=0;//Clear the key de-bouncing delay counter. This line is very clever. I figured it out in actual combat.      
  }
  else if(ucKeyLock2==0)//A key is pressed, and it is the first time it is pressed
  {
     uiKeyTimeCnt2++; //Accumulate the number of timer interruptsif
     (uiKeyTimeCnt2>const_key_time2)
     {
        uiKeyTimeCnt2=0; 
        ucKeyLock2=1; //Set the self-locking key to avoid continuous triggeringucKeySec
        =2; //Trigger key 2
     }
  }

  if(key_sr3==1)//IO is high, indicating that the key is not pressed. At this time, some flags should be cleared in time
  {
     ucKeyLock3=0; //Clear the key self-locking flaguiKeyTimeCnt3
     =0;//Clear the key de-bouncing delay counter. This line is very clever and I figured it out in actual combat.      
  }
  else if(ucKeyLock3==0)//A key is pressed, and it is the first time it is pressed
  {
     uiKeyTimeCnt3++; //Accumulate the number of timer interruptsif
     (uiKeyTimeCnt3>const_key_time3)
     {
        uiKeyTimeCnt3=0; 
        ucKeyLock3=1; //Set the self-locking key to avoid continuous triggeringucKeySec
        =3; //Trigger key 3
     }
  }

  if(key_sr4==1)//IO is high, indicating that the key is not pressed. At this time, some flags should be cleared in time
  {
     ucKeyLock4=0; //Clear the key self-locking
     flaguiKeyTimeCnt4=0;//Clear the key de-jitter delay counter. This line is very clever. I figured it out in actual combat.      
  }
  else if(ucKeyLock4==0)//A key is pressed, and it is the first time it is pressed
  {
     uiKeyTimeCnt4++; //Accumulate the number of timer interruptsif
     (uiKeyTimeCnt4>const_key_time4)
     {
        uiKeyTimeCnt4=0; 
        ucKeyLock4=1; //Set the self-locking button to avoid continuous triggeringucKeySec
        =4; //Trigger key 4
     }
  }

}


void key_service() //Application of key service
{
  switch(ucKeySec) //Key service status switch
  {
    case 1:// The button that changes the direction of the marquee corresponds to the S1 key of Zhu Zhaoqi learning boardif 

          (ucLedDirFlag==0) //Change the direction of the marquee through the intermediate variable
                  {
                     ucLedDirFlag=1;
                  }
                  else
                  {
                           ucLedDirFlag=0;
                  }

          uiVoiceCnt=const_voice_short; //Key sound trigger, stop after one beep.
          ucKeySec=0; //After responding to the key service handler, the key number is cleared to avoid consistent triggering of
          break;    
    
    case 2:// The acceleration key corresponds to the S5 key of Zhu Zhaoqi learning board. The smaller the uiSetTimeLevel_09_16, the faster the speed.
          uiSetTimeLevel_09_16=uiSetTimeLevel_09_16-10;
                  if(uiSetTimeLevel_09_16<50) //The fastest speed is limited to 50
                  {
                      uiSetTimeLevel_09_16=50;
                  }

          uiVoiceCnt=const_voice_short; //The key sound is triggered and stops after one beep.
          ucKeySec=0; //After responding to the key service handler, the key number is cleared to avoid consistent triggering of
          break;  

    case 3:// The deceleration key corresponds to the S9 key of Zhu Zhaoqi learning board. The larger the uiSetTimeLevel_09_16, the slower the speed
          uiSetTimeLevel_09_16=uiSetTimeLevel_09_16+10;
                  if(uiSetTimeLevel_09_16>550) //The slowest speed is limited to 550
                  {
                      uiSetTimeLevel_09_16=550;
                  }

          uiVoiceCnt=const_voice_short; //The key sound is triggered and stops after one beep.
          ucKeySec=0; //After responding to the key service handler, the key number is cleared to avoid consistent triggering of
          break;         
         
    case 4:// The start and pause keys correspond to the S13 key of Zhu Zhaoqi's learning board. When ucLedStartFlag is 0, it means pause, and when it is 1, it means start

              if(ucLedStartFlag==1) //Switch between the start and pause states in a loop
                  {
                     ucLedStartFlag=0;
                  }
                  else //Switch between the start and pause states in a loop
                  {
                           ucLedStartFlag=1;
                  }

          uiVoiceCnt=const_voice_short; //The key sound is triggered, and it stops after one beep.
          ucKeySec=0; //After responding to the key service handler, the key number is cleared to avoid consistent triggering of
          break;    
  }                
}




void led_update() //LED update function
{

   if(ucLed_update==1)
   {
       ucLed_update=0; //Clear in time to make it update only once to avoid continuous updating.

       if(ucLed_dr1==1)
           {
              ucLedStatus08_01=ucLedStatus08_01|0x01;
           }
           else
           {
              ucLedStatus08_01=ucLedStatus08_01&0xfe;
           }

       if(ucLed_dr2==1)
           {
              ucLedStatus08_01=ucLedStatus08_01|0x02;
           }
           else
           {
              ucLedStatus08_01=ucLedStatus08_01&0xfd;
           }

       if(ucLed_dr3==1)
           {
              ucLedStatus08_01=ucLedStatus08_01|0x04;
           }
           else
           {
              ucLedStatus08_01=ucLedStatus08_01&0xfb;
           }

       if(ucLed_dr4==1)
           {
              ucLedStatus08_01=ucLedStatus08_01|0x08;
           }
           else
           {
              ucLedStatus08_01=ucLedStatus08_01&0xf7;
           }


       if(ucLed_dr5==1)
           {
              ucLedStatus08_01=ucLedStatus08_01|0x10;
           }
           else
           {
              ucLedStatus08_01=ucLedStatus08_01&0xef;
           }


       if(ucLed_dr6==1)
           { uc LedStatus08_01
              =ucLedStatus08_01|0x20;
           }
           else
           {
              ucLedStatus08_01=ucLedStatus08_01&0xdf;
           }


       if (ucLed_dr7==1)
           {
              ucLedStatus08_01=ucLedStatus08_01|0x40;
           }
           else
           {
              ucLedStatus08_01=ucLedStatus08_01&0xbf;
           }


       if(ucLed_dr8==1)
           {
              ucLedStatus08_01=ucLedStatus08_01|0x80;
           }
           else
           {
              ucLedStatus08_01=ucLedStatus08_01&0x7f;
           }

       if(ucLed_dr9==1)
           {
              ucLedStatus16_09=ucLedStatus16_09|0x01;
           }
           else
           {
              ucLedStatus16_09=ucLedStatus16_09&0xfe;
           }

       if (ucLed_dr10==1)
           {
              ucLedStatus16_09=ucLedStatus16_09|0x02;
           }
           else
           {
              ucLedStatus16_09=ucLedStatus16_09&0xfd;
           }

       if(ucLed_dr11==1)
           {
              ucLedStatus16_09=ucLedStatus16_09|0x04;
           }
           else
           {
              ucLedStatus16_09=ucLedStatus16_09&0xfb;
           }

       if(ucLed_dr12==1)
           {
              ucLedStatus16_09=ucLedStatus16_09|0x08;
           }
           else
           {
              ucLedStatus16_ 09=ucLedStatus16_09&0xf7;
           }


       if(ucLed_dr13==1)
           {
              ucLedStatus16_09=ucLedStatus16_09|0x10;
           }
           else
           {
              ucLedStatus16_09=ucLedStatus16_09&0xef;
           }


       if(ucLed_dr14==1)
           {
              ucLedStatus16_09=ucLedStatus16_09|0x20;
           }
           else
           {
              ucLedStatus16_09=ucLedStatus16_09&0xdf;
           }


       if(ucLed_dr15==1)
           {
              ucLedStatus16_09=ucLedStatus16_09|0x40;
           }
           else
           {
              ucLedStatus16_ 09=ucLedStatus16_09&0xbf;
           }


       if(ucLed_dr16==1)
           {
              ucLedStatus16_09=ucLedStatus16_09|0x80;
           }
           else
           {
              ucLedStatus16_09=ucLedStatus16_09&0x7f;
           }

       hc595_drive(ucLedStatus16_09,ucLedStatus08_01); //74HC595 bottom-level driver function

   }
}

void hc595_drive(unsigned char ucLedStatusTemp16_09,unsigned char ucLedStatusTemp08_01)
{
   unsigned char i;
   unsigned char ucTempData;
   hc595_sh_dr=0;
   hc595_st_dr=0;

   ucTempData=ucLedStatusTemp16_09; //Send high 8 bits first
   for(i =0;i<8;i++)
   { 
         if(ucTempData>=0x80)hc595_ds_dr=1;
         else hc595_ds_dr=0;

         hc595_sh_dr=0; //The rising edge of SH pin sends data to register
         delay_short(15); 
         hc595_sh_dr= 1;
         delay_short(15); 

         ucTempData=ucTempData<<1;
   }

   ucTempData=ucLedStatusTemp08_01; //Send the lower 8 bits first
   for(i=0;i<8;i++)
   { 
         if(ucTempData>=0x80)hc595_ds_dr=1;
         else hc595_ds_dr=0;

         hc595_sh_dr =0; //The rising edge of SH pin sends data to register
         delay_short(15); 
         hc595_sh_dr=1;
         delay_short(15); 

         ucTempData=ucTempData<<1;
   }

   hc595_st_dr=0; //ST pin updates the data of the two registers and outputs them to the output pin of 74HC595 and latches them
   delay_short(15); 
   hc595_st_dr=1;
   delay_short(15); 

   hc595_sh_dr=0; //Pull low to enhance anti-interference
   hc595_st_dr=0;
   hc595_ds_dr=0;

}

/* Note 1:
* For the following program, you need to learn how to associate the key and the task of the marquee through the intermediate variable
*/

void led_flicker_09_16() //The marquee program for the 9th to 16th LEDs, light up one by one and only one at a time.
{
  if(ucLedStartFlag==1) //When this variable is 1, it means start
  {
     switch(ucLedStep_09_16)
     {
     case 0:
           if(uiTimeCnt_09_16>=uiSetTimeLevel_09_16) //Time is up
           {
               uiTimeCnt_09_16=0; //Time counter clearif

                           (ucLedDirFlag==0) //Forward direction
                           {
                  ucLed_dr16=0; //16th offucLed_dr9
                  =1; //9th

                  onucLed_update=1; //Update displayucLedStep_09_16=
                  1; //Switch to the next step
                           }
                           else //Reverse direction
                           {
                  ucLed_dr15=1; //15th onucLed_dr16
                  =0; //16th offucLed_update

                  =1; //Update
                  displayucLedStep_09_16=7; //Return to the previous step
                           }
           }
           break;
     case 1:
           if(uiTimeCnt_09_16>=uiSetTimeLevel_09_16) //Time is up
           {
               uiTimeCnt_09_16=0; //Time counter clear

                           if(ucLedDirFlag==0) //Positive direction
                           {
                  ucLed_dr9=0; //9th offucLed_dr10
                  =1; //10th

                  onucLed_update=1; //Update displayucLedStep_09_16
                  =2; //Switch to the next step
                           }
                           else //Reverse direction
                           {
                  ucLed_dr16=1; //16th onucLed_dr9
                  =0; //9th offucLed_update

                  =1; //Update displayucLedStep_09_16
                  =0; //Return to the previous step
                           }
           }
           break;
     case 2:
           if(uiTimeCnt_09_16>=uiSetTimeLevel_09_16) //Time is up
           {
               uiTimeCnt_09_16=0; //Time counter clear

                           if(ucLedDirFlag==0) //Positive direction
                           {
                  ucLed_dr10=0; //The 10th one is off
                  ucLed_dr11=1; //The 11th one is on

                  ucLed_update=1; //Update
                  displayucLedStep_09_16=3; //Switch to the next step
                           }
                           else //Reverse direction
                           {
                  ucLed_dr9=1; //9th light
                  onucLed_dr10=0; //10th light offucLed_update

                  =1; //Update displayucLedStep_09_16
                  =1; //Return to the previous step
                           }
           }
           break;
     case 3:
           if(uiTimeCnt_09_16>=uiSetTimeLevel_09_16) //Time is up
           {
               uiTimeCnt_09_16=0; //Time counter clearif

                           (ucLedDirFlag==0) //Forward direction
                           {
                  ucLed_dr11=0; //11th
                  light offucLed_dr12=1; //12th light

                  onucLed_update=1; //Update displayucLedStep_09_16
                  =4; //Switch to the next step
                           }
                           else //Reverse direction
                           {
                  ucLed_dr10=1; //The 10th light
                  onucLed_dr11=0; //The 11th light

                  offucLed_update=1; //Update displayucLedStep_09_16
                  =2; //Return to the previous step
                           }
           }
           break;
     case 4:
           if(uiTimeCnt_09_16>=uiSetTimeLevel_09_16) //Time is up
           {
               uiTimeCnt_09_16=0; //Time counter clearif

                           (ucLedDirFlag==0) //Forward direction
                           {
                  ucLed_dr12=0; //The 12th
                  light offucLed_dr13=1; //The 13th light

                  onucLed_update=1; //Update displayucLedStep_09_16
                  =5; //Switch to the next step
                           }
                           else //Reverse direction
                           {
                  ucLed_dr11=1; //The 11th light
                  onucLed_dr12=0; //The 12th one turns off

                  ucLed_update=1; //Update the display
                  ucLedStep_09_16=3; //Return to the previous step
                           }
           }
           break;
     case 5:
           if(uiTimeCnt_09_16>=uiSetTimeLevel_09_16) //Time is up
           {
               uiTimeCnt_09_16=0; //Time counter is cleared

                           if(ucLedDirFlag==0) //Positive direction
                           {
                  ucLed_dr13=0; //The 13th one turns off
                  ucLed_dr14=1; //The 14th one turns on

                  ucLed_update=1; //Update the display
                  ucLedStep_09_16=6; //Switch to the next step
                           }
                           else //Reverse direction
                           {
                  ucLed_dr12=1; //The 12th light is
                  on ucLed_dr13=0; //The 13th light is off

                  ucLed_update=1; //Update display
                  ucLedStep_09_16=4; //Return to the previous step
                           }
           }
           break;
     case 6:
           if(uiTimeCnt_09_16>=uiSetTimeLevel_09_16) //Time is up
           {
               uiTimeCnt_09_16=0; //Time counter is cleared

                           if(ucLedDirFlag==0) //Forward direction
                           {
                  ucLed_dr14=0; //The 14th light is off
                  ucLed_dr15=1; //The 15th light is

                  on ucLed_update=1; //Update display
                  ucLedStep_09_16=7; //Switch to the next step
                           }
                           else //Reverse direction
                           {
                  ucLed_dr13=1; //The 13th light is
                  on ucLed_dr14=0; //The 14th light is off

                  ucLed_update=1; //Update display
                  ucLedStep_09_16=5; //Return to the previous step
                           }
           }
           break;
     case 7:
           if(uiTimeCnt_09_16>=uiSetTimeLevel_09_16) //Time is up
           {
               uiTimeCnt_09_16=0; //Time counter is cleared

                           if(ucLedDirFlag==0) //Forward direction
                           {
                  ucLed_dr15=0; //The 15th light is off
                  ucLed_dr16=1; //The 16th light is

                  on ucLed_update=1; //Update display
                  ucLedStep_09_16=0; //Return to the beginning and start a new cycle
                           }
                           else //Reverse direction
                           {
                  ucLed_dr14=1; //The 14th light is on
                  ucLed_dr15=0; //15th extinguish

                  ucLed_update=1; //Update display
                  ucLedStep_09_16=6; //Return to the previous step
                           }
           }
           break;
    
      }
   }

}


void T0_time() interrupt 1
{
  TF0=0; //Clear interrupt flag
  TR0=0; //Disable interrupt


  if(uiTimeCnt_09_16<0xffff) //Set this condition to prevent uiTimeCnt from exceeding the range.
  {
      if(ucLedStartFlag==1) //When this variable is 1, it means start
          {
         uiTimeCnt_09_16++; //Accumulate the number of timer interrupts,
          }
  }

  key_scan(); //Key scan function

  if(uiVoiceCnt!=0)
  {
     uiVoiceCnt--; //Every time the timer interrupt is entered, it will be decremented by 1 until it is equal to zero. Then it will stop beeping
     beep_dr=0; //The buzzer is controlled by a PNP transistor, and it will start beeping when the level is low .
  }
  else
  {
     ; //Here is an extra empty instruction to maintain the symmetry with the number of if bracket statements, both are two instructions. It is also OK not to add it.
     beep_dr=1; //The buzzer is controlled by a PNP transistor, and it will stop beeping when the level is high.
  }

  TH0=0xf8; //Reload initial value (65535-2000)=63535=0xf82f
  TL0=0x2f;
  TR0=1; //Open interrupt
}

void delay_short(unsigned int uiDelayShort) 
{
   unsigned int i;  
   for(i=0;i    {
     ; //A semicolon is equivalent to executing an empty statement
   }
}

void delay_long(unsigned int uiDelayLong)
{
   unsigned int i;
   unsigned int j;
   for(i=0;i    {
      for(j=0;j<500;j++) //Number of empty instructions in the embedded loop
          {
             ; //A semicolon is equivalent to executing an empty statement
          }
   }
}


void initial_myself() //Initialize the MCU in the first area
{
/* Note 2:
* The matrix keyboard can also be used as an independent key, provided that a common output line is output at a low level.
* To simulate the triggering ground of an independent key, in this program, key_gnd_dr is output at a low level.
* S1 of Zhu Zhaoqi 51 learning board is an independent key used in this program.
*/
  key_gnd_dr=0; //Simulate the ground GND of an independent key, so it must always output a low level

  beep_dr=1; //Use a PNP transistor to control the buzzer, and it will not sound when the output is high level.

  TMOD=0x01; //Set timer 0 to work mode 1


  TH0=0xf8; //Reinstall initial value (65535-2000)=63535=0xf82f
  TL0=0x2f;


}

void initial_peripheral() //Initialize the peripheral in the second area
{
  EA=1; //Open the general interrupt
  ET0=1; //Allow the timer interrupt
  TR0=1; //Start the timer interrupt

}

Conclusion:
These sections have gradually explained the procedures for controlling the various states of the marquee with independent buttons. In many actual industrial control projects, automatic control of motion is often involved, and automatic control of motion will inevitably involve sensors. In the next section, I will talk about the program framework of sensors and motion control. For more details, please listen to the next analysis - using LED lights and buttons to simulate the motion control of industrial automation equipment.
Reference address:Section 24: Independent button control of the start and pause of the marquee

Previous article:Section 23: Independent buttons to control the speed of the marquee
Next article:Section 25: Using LED lights and buttons to simulate motion control of industrial automation equipment

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号