Chapter 370 MCU trolley

readx;

Hearing Zhou Tong's words, Lin Hong smiled apologetically and said:

"The software part, for the time being, is mainly operating system development. Pen × fun × Pavilion www. biquge。 info”

"Operating system?"

Not only Zhou Tong, but everyone else who was doing it was surprised by the news.

They originally thought that the initial software development should be application software and the like, but they did not expect that the development of the operating system would be carried out at the beginning.

They have all been in their posts for so long, and as IT practitioners, even if they are not technicians, they have made up some knowledge in their spare time, after all, their jobs have to deal with computers, and if they don't even understand some basic things, it is too incompetent.

Basically, everyone probably knows the concept of operating system, and also knows that this thing is a very complex software, as if this part is currently being done abroad, and there are companies involved in the DOS system in China, but I have not heard of anything else.

Zhou Tong still has a certain amount of research on this part, and he couldn't help but say: "Mr. Lin, we just started to directly enter the development of the operating system, is it too fast?" ”

The operating system is indeed a good project, but at the same time it is a big hole, a bottomless pit, and not just anyone can jump into it. There are many companies that want to make operating systems, but only a handful can really do a good job.

He worries that the company has invested a lot of manpower and material resources in this area, but in the end it will not achieve any results. This is not unfounded, after all, the development of operating systems is too technical, and as a start-up, it is really unwise to venture into this field.

"The operating system I'm talking about is not a general-purpose commercial operating system, but an embedded one that's specifically for industrial control." Lin Hong explained, "Actually, I have already started development in this area, the first kernel version has come out, and the technical aspect should not be a problem, I have developed experience in this area before." ”

The main purpose of this meeting was to summarize some of the achievements of the company's early development, and then made a plan for the company's future development direction.

The wholesale business of compatible machines continued, and the focus shifted to providing complete solutions to businesses or individuals in order to avoid direct price competition with others.

The newly established department was personally led by Lin Hong to work on hardware and software together, and both aspects were grasped.

Lin Hong's return to the company still has a very great effect on morale. Originally, there was already a slack mood in the company, but now with the return of Lin Hong, this mood has been swept away, replaced by a new and energetic spiritual outlook.

Other people don't know much about technology, Lin Hong thinks that he can do an operating system, so let's do it, according to past experience, the boss will definitely not do something that he is not sure of, just follow him and rush forward.

Zhou Tong was very aware of the difficulty of writing an operating system, and after the meeting ended, he followed behind Lin Hong and strongly asked to see the first kernel version of the operating system that Lin Hong had said before

Lin Hong did not refuse his request, after all, this system needs them to participate in the development together, Zhou Tong is the technical director, and he will have to carry out the overall scheduling planning at that time.

"It's a real-time operating system, primarily for embedded devices, which I call INX."

As he spoke, Lin Hong started his computer and called up the source code.

Zhou Tong couldn't wait to open the source file directory and look at it for a while, although he didn't see anything at all, just looked at the general file directory structure, but he couldn't help but ask excitedly in his heart:

"Is Linx7 a fork of Unix, or a fork of Linux?"

The file directory shows that this is indeed a relatively complete operating system source code directory. Seeing this, Zhou Tong completely believed that Lin Hong was not talking about it, but had really made something.

When Zhou Tong heard the name, he immediately remembered Unix and Inux, and both systems have a lot of open source code, and they are the best choice for many operating system development companies to develop based on any of these two.

"Neither. This is a brand-new real-time operating system, which was initially developed for military use and to obtain orders from the military. ”

Zhou Tong turned his head to look at Lin Hong in surprise, and saw that he didn't seem to be joking, so he seriously thought about his words.

"In some ways, a real-time operating system is more demanding than a general-purpose system, can we do it?"

Lin Hongdao: "Take your time, the system is from simple to complex.

I use a microkernel architecture, but I also want to inherit the programming ideas of Unix, simplicity is beauty. ”

Taking the army route, Zhou Tong knew that it must be the domestic army.

However, before this, there seemed to be no such precedent, Zhou Tong originally wanted to continue to ask, but seeing Lin Hong's confident face, he put his worries down. He knew that this boss, who he couldn't see through at all, must have channels in this regard and considered the difficulty of this aspect.

Zhou Tong no longer paid attention to the situation outside the code, and continued to ask: "What hardware device can this 00q version of the kernel run on?" ”

Hearing his words, Lin Hong was a little embarrassed this time.

"I haven't designed the hardware platform yet, but the code is basically the same, according to my design, different hardware, as long as it is slightly adjusted, it can be adapted. That's the purpose of the hardware department, and now we do the hardware and software together, make the prototype first, and then take it to the military to demonstrate, and get some resources from them to develop. ”

According to Lin Hong's plan, it is still necessary to borrow the "momentum" of the military, so that the speed of research and development can be increased extremely quickly.

The current situation of the military is that there is a lot of talent, but there is very little that can be made, and it would be great if we could poach some people from them.

Zhou Tong didn't say anything about it, he didn't read the code at all, and he didn't know what functions Lin Hong had completed, so he didn't have the right to speak.

Next, Sansehuo Technology was reorganized internally, and many personnel from the previous technical department were absorbed into a new department-R&D department. Only some basic personnel who do supporting services for the sales department are left, and most of these people are just graduates or even in college

The first thing to do is to build a hardware platform for 1inx to install on it and run successfully.

The chip decided to be used in the initial test is the BC51 chip in the MC1 series, which is the most common single-chip chip on the market.

A microcontroller is a microcomputer. This is an integrated circuit chip, using ultra-large-scale integrated circuit technology, which integrates the functions of central processing unit, CPU, random access memory, RAM, read-only memory, ROM, a variety of IO ports and interrupt systems, timers, and T timers into a silicon wafer to form a small and perfect microcomputer system.

This may also include display drive circuits, pulse width modulation circuits, analog multiplexers, AXD converters and other circuits.

In layman's terms, a chip is a computer, which has some common functions of a computer. Its earliest use was in the field of industrial control.

Normally, the industrial control system is very simple, for example, an elevator, the simplest may only have three states: "up", "down" and "stop", if you use a computer to control, it is completely unnecessary. Therefore, some engineers have designed special microcomputers for these scenarios, that is, single-chip microcomputers.

In the field of single-chip microcomputer, the best thing to do at present is naturally the famous Intel company, they specially produced a MC1 series of single-chip microcomputer, including many varieties, such as 8031, BC51, 8751, 8032, BC52, 8752, etc., of which 8nd is the earliest and most typical product, other models of single-chip microcomputer are based on 8051 and increase or decrease instructions and generated.

The choice of 8051 chip as the control chip is also considered, because this is basically the most common chip cluster in China, Intel has licensed MCSB1 to many chip manufacturers for production, which has derived many series of single-chip microcomputers. As long as this chip is done, other derivative chips can basically be matched as long as the code is slightly modified, and the adaptation driver will be written out when the time comes, and the special code will be used to detect and match the driver, and the user does not even need to repair the code

The INX system is burned into the ROM of the 8051 microcontroller, and then the external hardware is controlled by the pins of the 851.

In fact, the principle of this aspect is the same as the principle of the previous game console. It's just that the chip of the game console controls the display, and the input signal is the controller. And if this system is used for automatic artillery control, the input is the coordinates, and the output is the elevation angle of the gun.

Of course, this is the simplest situation, and the more complicated one is the control of missiles, even rockets and spaceships, which basically have the same functions as general systems, and even involve artificial intelligence judgments, such as determining whether a moving object is a vehicle or an organism, and what measures to take in the face of this situation.

Everything starts with the simplest.

The R&D department of Sansehuo was the first to build a hardware test platform, which was modified from a remote-controlled car.

Lin Hong already had a draft of this, mainly influenced by the toy cars of Arthur's uncle Mark at the beginning.

The control of the remote control trolley is very simple, the main control part is the ESC, which receives the signal of the radio, so as to generate an on-off signal, and controls the trolley forward, backward and turning.

Lin Hong and the others first designed a small motherboard, soldered the BC51 single-chip microcomputer on it, and then drew various circuits from the motherboard. Then remove the ESC and replace the ESC with the motherboard to control the car.

In addition, there are other external I/O devices connected to the motherboard, such as sensors such as infrared transmitters and receivers, step counters, temperature sensors, and a small scientific calculator that includes an LCD display and character input buttons.