In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
We have finished the second lesson of lighting LED lights, that is, let LED = 0. The procedure for extinguishing small lights is also very complicated, that is, LED = 1. If we light up and extinguish the city, then if we add a delay between the on and off, repeatedly lighting and extinguishing the small lights, it will be shining.
Let's start by reviewing the process of writing programs in Keil, setting up projects-- > keeping projects-- > setting up files-- > adding files to projects-- > writing programs-- > compiling-- > downloading programs.
LED shining program is very complicated for students with C background, so I'll write it first and everyone can read it first. Students who do not have the foundation of C language can also copy it again. In the next class, I will make up for some common sense of C language, so that you can copy it first, and then follow the time when you read the basic common sense of C language.
# include sbit LED = P0 ^ 0; sbit ADDR0 = P1 ^ 0; sbit ADDR1 = P1 ^ 1; sbit ADDR2 = P1 ^ 2; sbit ADDR3 = P1 ^ 3; sbit ENLED = P1 ^ 4; void main () {/ / void is the function type / / below is the declaration statement local unsigned int i = 0; / / define an unsigned integer variable I and assign the initial value 0 / / below to the fulfillment statement local ENLED = 0; / U3, U4 two pieces of 74HC138 always enable ADDR3 = 1; / enable U3 to make it normal input ADDR2 = 1 / / turn on the transistor Q16 ADDR1 = 1; ADDR0 = 0; while (1) {LED = 0; / / turn on the small lamp for (iTuno; I) via the Y6 input of U3.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.