当前位置:网站首页>How big the program development of single chip microcomputer project can be, it represents your level of knocking code
How big the program development of single chip microcomputer project can be, it represents your level of knocking code
2022-04-23 02:32:00 【Mr. Lin teaches MCU】
How big can you do the program development of single chip microcomputer project , The level of your code
It doesn't have to be good , But at least it can reach the corresponding level at the corresponding time .
Novices do projects and write code in the early stage to realize functions , especially 51 Single chip microcomputer , When your code is written, the memory may not be enough for you .

When you haven't been involved in large project program development , You have no idea how good the code is , What's the difference in function ,
It works anyway, right ?
/// Insert a : At the beginning of this year, I recorded a set of systematic introductory single chip microcomputer tutorial , If you want, just ask me for it. It's free , You can find me by sending me a private letter or reading my profile ~ You can also get it by clicking my avatar in black font and adding my earth . I've been relatively idle recently , Take me to finish the design , Take students to provincial or above competitions ///
When you really come across some big projects , If your code level is not good , You can't do it .
A lot of code, you Hold Unable to live , I don't know how to integrate , After integration, there are also conflicts between functions .
Finally, it was finally integrated , It was found that the portability was too poor , The scalability is too poor , In case the project manager asks you to add or change a function , You hang up .
It's time for you to think about how to write better code .
Because you know where the pain is , Looking for a solution to this pain point .
The best way is still to refer to , Someone who writes programs better than you .
You can learn from it , For example, look at the program architecture tutorial I recorded .
My tutorial is the problem I have encountered in product development for so many years , Then learn to solve , The essence of the final conclusion .
The number of words in the article may be more , Open the avatar and follow me , After that, it will be easier to find , If you have special needs, you can enter the password “ Miss Lin ” Check the dry goods .
How to make infrared remote control produce 38K Carrier of , In fact, it controls the time of its on and off , On when the low level is low , Off when the high level is on , Let it go on and off, and then it will come true 38K 了 , And then cycle , Let it go on and off 560 Microseconds , Then turn it off , At this time, bits are generated 0.

If the current bits are taken out of here , Now this is 1, If the outgoing bit is 1 Words , It still produces 560 A microsecond infrared pulse , That is to say, keep flashing , produce 38K The twinkle of 560 Microseconds , Then put it out , The time of extinction and our transmission bits 0 The time is different , It's going to go out 1.685 Milliseconds , We should pay attention to this , The transmission bit here 0 And transmission bits 1 It refers to the time control of on and off , Be sure to note that the light is on, not the light is on , Is the blinking time of this light , The flashing frequency is 38K, position 1 No infrared light is 1.685 Milliseconds , position 0 No infrared light is 0.56 Milliseconds .
In this way, bits can be transmitted 0 And bits 1, Then you can launch in this way , First, an infrared pulse is generated , That is to produce 38K9 millisecond , Then there is no 4.5 millisecond , This represents the boot code , Then the user code is transmitted , Then take out every bit of the user code , After taking it out, judge whether the current bit is 0 still 1, In this case, it will be launched , Then send the command code for the same reason , If the current position in the command code is 0, That's Tong 38K560 Microseconds .

Then the difference is to disconnect , Don't let it produce infrared light 560 Microseconds , If you look at the code and refer to this figure, it's easy to understand ,NEC The encoding format and decoding are done according to this , The coding format is the first step to send the boot code first , Carrier transmission 9 Millisecond loading wave does not emit 4.5 millisecond , As soon as the carrier wave is transmitted, this tube generates 9 ms 38K The twinkle of , This is what this carrier means , Then send the inverse code of the lower eight digit low user code and the higher eight digit user code , The data of the following eight digits is the data of the inverse code , The data in these bits should be taken out , Its current bit is 0 Or one , Then transmit in this way 0 And transmission 1, The last is the end code , The end code is the transmission bit 0.

The next issue will explain how to realize 38K Carrier of , And how to use this protocol to write code , Our course will use software to introduce how to realize the coding function of infrared remote control , If you are interested, you can pay attention to , You can take a look at the figure above and briefly introduce 38K How to realize the carrier wave , actually 38K The carrier wave is generally used for 1 : 3 Of , In other words, the infrared duty cycle of the transmitted carrier is generally 1 : 3.
Friends interested in MCU can come to me , I recorded some introductory tutorials about MCU , If you need children's shoes, ask me for them. It's like , Free of charge , Private confidence in me “ Miss Lin ” You can take ~ Click to open my avatar to receive
版权声明
本文为[Mr. Lin teaches MCU]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230231090845.html
边栏推荐
- 010_ StringRedisTemplate
- Push data from onenet cloud platform to database
- 从开源爱好者到 Apache 董事,一共分几步?
- Consider defining a bean of type 'com netflix. discovery. AbstractDiscoveryClientOptionalArgs‘
- Target narak
- Applet canvas canvas half ring
- C # import details
- New book recommendation - IPv6 technology and application (Ruijie version)
- PTA: praise the crazy devil
- 一个国产图像分割项目重磅开源!
猜你喜欢

定了,今日起,本号粉丝可免费参与网易数据分析培训营!

010_StringRedisTemplate

全局、独享、局部路由守卫

【无标题】
![[xjtu Computer Network Security and Management] session 2 Cryptographic Technology](/img/b0/263e8dcbfeb2ce9f504a9c8eb76b07.png)
[xjtu Computer Network Security and Management] session 2 Cryptographic Technology

Understanding process (multithreading primary)

SQL server2019 cannot download the required files, which may indicate that the version of the installer is no longer supported. What should I do

SO库依赖问题

Wechat public platform test number application, authorized login function and single sign on using hbuilder X and wechat developer tools

Real math problems in 1958 college entrance examination
随机推荐
IAR嵌入式開發STM32f103c8t6之點亮LED燈
一个国产图像分割项目重磅开源!
Synchronized锁及其膨胀
Deploying sbert model based on torchserve < semantic similarity task >
【Chrome扩展程序】content_script的跨域问题
【2019-CVPR-3D人体姿态估计】Fast and Robust Multi-Person 3D Pose Estimation from Multiple Views
The 16th day of sprint to the big factory, noip popularization Group Three Kingdoms game
C语言中*与&的用法与区别 以及关键字static和volatile 的含义
【无标题】
Yes, from today on, our fans can participate in Netease data analysis training camp for free!
Using go language to build web server
Open3d point cloud processing
每日一题冲刺大厂第十六天 NOIP普及组 三国游戏
006_ redis_ Sortedset type
Develop a chrome plug-in from 0 (2)
013_基于Session实现短信验证码登录流程分析
How to prevent leakage of operation and maintenance data
After idea is successfully connected to H2 database, there are no sub files
How to recognize products from the perspective of Dialectics
Applet reads files