Home > other >  Microcontroller programming
Microcontroller programming

Time:12-01

Functional requirements: four buttons, 8 LED lights, according to one of the key, the corresponding LED lights lit rule changes, respectively corresponding to the four buttons: cyclic shift to the left, cycle moves to the right, on both sides to the middle and middle to both sides, 1 s, is realized by using delay keys are using the interrupt method implementation, which bosses can give a program,,,,

CodePudding user response:

Interrupt is a very valuable resource, buttons don't need to use the interrupt, this refers to the button by using interrupt refers to shake or... ?

CodePudding user response:

Is the first key, LED the first conversion rule, according to a second to realize the second transformation rules, and so on

CodePudding user response:

There are regular buttons for reference written

CodePudding user response:

Wow, thanks to the boss

CodePudding user response:

Download sample project

CodePudding user response:

With the scan button to programming, with a switch statement, very simple

CodePudding user response:

CodePudding user response:

Keys and time delay, with the timer and the main function polling write a timing function, the lamp control can use an array to add left shift + +, etc
  • Related