In the process of understanding PIC microcontrollers, I learned a lot about RISC instruction sets. For example, memory paging and soft interrupt management. Since PIC instructions are fixed length, one instruction cannot contain many addressing bits. This limits the memory address range that instructions can access. There are two ways to access a larger address space: one is to use indirect addressing; the other is to use memory paging (or segmentation); so there is a strange paging register in the PIC microcontroller. The same instruction may operate on different memory addresses. There is no vector interrupt and priority management mechanism in PIC. There is only one interrupt in the system, and a bunch of SWITCH codes must be written in the interrupt to distinguish the interrupt source and manage the priority. In addition, the pin settings of the PIC microcontroller are more complicated than those of the 51. Output, input type, pull-up, pull-down resistors, digital input, analog input, comparator input, etc., all of which must be set in the programmer and cannot be changed at will in the program. It is really unaccustomed to engineers who switch from 51 to pic microcontrollers. Because of the complexity of the PIC microcontroller, many engineers who do complex control do not know how to use it. Although the electrical anti-interference performance of PIC microcontroller is more stable than that of 51 microcontroller. PIC 8-bit microcontroller is not suitable for control applications with complex logic. I need to emphasize: it is PIC 8-bit machine. At present, there are still many applications of PIC microcontrollers in many instrument industries, just because PIC microcontrollers work stably! However, microcontrollers have reached the 32-bit era, and I think the use of 8-bit machines is also limited. Thanks again to Microchip for designing such a sophisticated microcontroller. In addition to studying PIC microcontroller technology. I am also trying to understand USB interface technology. At that time, it was believed that USB interface might become a widespread interface technology. It might even replace UART interface. However, due to the abnormally high complexity of this shared bus technology based on time division multiple access, it led to unstable work in actual applications! Before I learned about USB, I could write some simple Windows drivers and Linux/Unix drivers. But it was not until I learned about USB technology that I really "opened my eyes" and realized that the driver technology was so complicated that it made people mentally collapse. I even doubted my life! At that time, I applied for a PIC18F4455 DIP40 packaged microcontroller. I also soldered a development board with a universal board. At that time, there was very little information about USB. The information on hand was scattered, and there was a "USB standard" information. After a long period of research, the Windows development machine blue screened countless times, and I didn't completely understand the USB driver! ! I only knew that the USB driver was a "second-layer driver", that is, a driver that works under the first-level driver (main driver, USB bus driver). USB devices are "interface" type devices, and the devices connected to its endpoints may be other types of devices, such as: U disk, mouse, network card, printer and other devices. It can also be said that USB is a "bridge device", and this kind of "blocked at both ends" device is very complicated to manage. Many of Windows' plug-and-play device management mechanisms are not very transparent, which is also an obstacle. Although Linux is open source, its simple architecture has caused complex device management problems. Linux drivers are actually more difficult to write than Windows drivers. It was not until later that I used USB to serial port or standard HID devices in my own design.
|