How did I improve my MCU programming ability?

My interest in programming stemmed from hacking...

Unexpectedly, I finally took the route of single-chip microcomputer development. Maybe the reality does not allow me to have dreams.

The growth of hacking is too long, and my first priority is to find a job to support myself.

I'm not a computer major, and I don't know anything about programming when I'm approaching graduation.

The first time I taught myself was java. After learning the basic grammar, I seemed to understand it, but I didn’t seem to understand anything.

In layman's terms, it means that there is no idea to do a project.

Later, I came into contact with single-chip microcomputers, and after in-depth understanding, I found that this programming is simple, and learning C language with java basics is also very fast.

It's just that the circuit is more complicated, especially the analog circuit. Fortunately, I found out later that I don't need too deep analog circuit knowledge.

I decisively bought a development board, followed the tutorial and followed through, and basically implemented all the functions on the development board in more than a month.

The history is always surprisingly similar. Although the functions of individual peripherals can be used, they are confused when they start a project.

Later, I made a smart car project, bought accessories, and there were no video tutorials, so I just watched the tutorials provided by the merchants.

In the end, I wrote it independently again, and after finishing it, I obviously felt that my level had improved.

There are several improvements:

1. Learn to read other people's project code

This ability is very important . Although the process of reading is more painful than writing by yourself, in actual work, you often have to read the code written by others.

At the beginning, the company will not let you develop products, but will let you maintain old products and change codes.

If you want to improve later, you also need to have this ability.

2. Programming thinking

That is, the thinking of realizing functions is also very important.

If you have never done this kind of function, the best way is to learn other people's implementation ideas.

Generally, if you have done a certain function, you will understand it next time.

This can only be accumulated through projects, and cannot be learned on the development board.

3. Programming level

Understanding the idea of ​​​​implementation and being able to write it in code are two different things.

My method is to imitate other people's code first, and then analyze the benefits of writing it like this.

The process is also quite painful, but as you accumulate experience, it will become easier and easier later, and finally reach the height of hopelessness.

Not long after finishing the smart car, I found a job.

The most contacted at the beginning are STC51 and NXP microcontrollers.

After working for about 2 or 3 years, I can write codes for most single-chip microcomputer products independently.

At that time, I felt that I was already very powerful, and the programming of single-chip microcomputer was too simple to satisfy myself.

Until later, I went to a navigation company, which involved functions such as GPS, menus, and radar detection.

Only then did I know how scumbag my level was, and only then did I realize that the products I made before were too simple.

This company has also improved my level a lot. I didn't know how to make a multi-level menu before, but I know it since then.

It is mainly learned from the code of old engineers. It is very important to master the ability to understand other people's code , which can run through your entire career.

It can be said that less than one year was worth the 2 or 3 years before me.

Sometimes it doesn't mean that the longer you do it, the better your level. The key is to see if there are any masters around you who can learn from it.

You have been working in the company for one year, and you are basically familiar with the company's products. They are all of the same type. Maybe changing the circuit and changing the code is a new product.

If you stay for a long time, it will basically be repetitive work for you, and your level will improve slowly.

This is the first time that my level has been greatly improved, and I have refreshed my understanding of microcontroller programming, which is not as simple as I thought.

The second time was when I switched to a company that was an IoT gateway, with voice, menu, wireless data soft decoding, OTA, 4G, Wifi and other functions.

This is probably the most complicated product I have ever come across.

It is similar to the third project in our endless microcontroller programming practical course.

 

Just so that many students with poor foundation can get started quickly, I simplified some product functions and tried to keep the most commonly used and core things.

Although I have been doing it for so many years, it is still very difficult for me to make this product independently.

The main reason is that there are too many functions, and the mind is easily confused, and I don't know how to integrate them.

Before doing this project, I also re-studied the codes of the old engineers who went to work to see if there was anything that could be used.

In this way, we put together a little bit in one place, and finally slowly digested and innovated to form our own things.

I worked on this project for about a whole year, but in the end it was still not stable, because the third-party cloud platform was not mature at that time.

The main reason is that there are loopholes in the underlying protocol, and the app is not very powerful, resulting in a poor user experience.

For example, with the offline push function, there are always many models of mobile phones that cannot push.

Therefore, it is difficult to make stable products for the Internet of Things for this reason.

There are too many things involved, it doesn't matter if the hardware is stable, it depends on whether the cloud platform and app experience are rich enough.

In addition, the joint debugging is all remote communication, and many details are difficult to understand in place, and the development cycle is also long.

This project is the biggest for my growth, but it is a bit expensive for Red Bull.

As long as there is nothing special, I am basically the first to arrive at the company every morning, and the company is also a start-up company.

The boss is very moved every time he sees me. There are not many employees who are so motivated.

In fact, I am very interested in this project. I have always wanted to do this kind of medium and large-scale projects, but I have no chance.

In fact, I and everyone have the same idea, that is, I want to equip myself with the ability to do projects independently as soon as possible, no matter how big or small the project is.

Sometimes, I often think that if the first job is 2 years old, I can get in touch with this kind of project and be led by someone.

Maybe I can reach the level of others in 5 years or more in 2 years.

Later, I came into contact with the development of the Bluetooth protocol stack. After the previous precipitation, it is much easier to study.

The Bluetooth protocol stack system is considered to be the best non-RTOS I have come into contact with so far.

So, I decided to simplify it and port it to STM32 for my future use.

Although I have written a batch-verified program architecture before, it is still a bit crude after all.

For example, the queue function can only enqueue and dequeue byte data. If it can transmit any data type, it will be more flexible.

This architecture is also open source, and I recorded a set of videos casually in 2019. If you are interested, you can go and watch it. It is still very helpful to improve the programming level.

The tutorial has been uploaded to all major platforms, and you can directly find the Wuji MCU programming, the same name on the whole network.

The final summary: If you want to quickly improve your programming ability, you still have to accumulate through projects, but there is a shortcut, that is, to do projects with senior engineers, which is also accumulation, and the efficiency is very different.

Guess you like

Origin blog.csdn.net/weixin_43982452/article/details/123237374