Since the embedded system is a relatively broad concept, this article uses the HCS12 as the main control chip to debug the camera group trolley as an example to introduce the debugging method.
(1) Connect the external circuit to the CRT display
Lead out the three leads of power, ground, and signal from the analog camera to supply power to the camera, and then connect the video signal line to the video input interface of the TV box. The VGA-OUT of the TV box is connected to the CRT monitor, so that the CRT can display the digitized camera vision.
This method is a complete hardware-level display, providing a display effect exactly the same as human vision, which is of great help to the installation of the camera and the correction of its own physical parameters.
(2) Extend LCD liquid crystal outside the chip
The HCS12 series MCU contains a serial peripheral interface SPI (Serial Peripheral Interface), which can realize data transmission between MCUs, and its speed is faster than through serial asynchronous communication (SCI). The SPI module also supports two-way, synchronous, and serial communication between the MCU and peripheral devices to realize the peripheral expansion of the MCU.
The Nokia 3310 LCD is cheap on the market. The imaging is based on a binary dot matrix. The display module is 48*84 dot columns. The display of related information is expressed by writing data to the corresponding dots to show different colors.
1. When the system is running, the displayed characters will prompt the relevant operating parameters of the system in the form of characters. Each character occupies 8*6 points and requires 6 bytes of data. To complete the character display, you only need to write the corresponding data to the specified position in the programming. Since the liquid crystal module itself does not have a font library, it is necessary to define the liquid crystal display dot matrix data of the ASCⅡ table characters at the beginning of the program, that is, a two-dimensional array with a size of N*6 bytes.
2. After the video signal collected by the analog camera is digitized by the A/D of the MCU, the information is stored in a 40*70 two-dimensional array, and then the array is binarized, and it can be used in a 48*84 resolution LCD module In the display, developers can observe the camera machine vision in real time.
This method is a display method that combines hardware and software, which can track and display camera-related information in real time, without interrupting the system operation process during display.
