During the measurement process, when the echo reflected by the obstacle is not received, "CCC" is output, and when the measurement is lower than the lower limit (within the blind area), "- - -" is displayed. The measurement results are output from the output port on the module, and the output method is RS485 output. The measurement results can be displayed on a computer. The module uses the RS485 interface for communication. The measurement results are transmitted over a long distance. Data can be collected through a computer, and it is very convenient to write communication programs.
#include
#include
#define uchar unsigned char
#define uint unsigned int
#define LED P0
#define LED1 P2_6
#define LED2 P2_4
#define LED3 P2_5
#define sx P2_3
uchar s,i,pd,jsh,ml[3]={0,0,0},zj,xm0,xm1,xm2,xm3,buffer[3];//Variables used in the program
uchar convert[10]={0xA0,0xBD,0x64,0x34,0x39,0x32,0x22,0xBC,0x20,0x30};////0~9 segment code MCU port P0x.0-P0.7 respectively connects to the A, B, F, D, E, H, C, G segments of the digital tube
void delay(i);
void scanLED();
void timeToBuffer();
void offmsd();
void main()
{
}
void delay(i)
{
}
void scanLED()
{
}
void offmsd()
{
}
void serial() interrupt 4 using 3
{
}
void timeToBuffer()
{
}
Previous article:Working principle of 8051 microcontroller I/O pins
Next article:51 single chip microcomputer uses C language to realize traffic lights
Recommended ReadingLatest update time:2024-11-15 13:39
- Popular Resources
- Popular amplifiers
- Switched-Capacitor Amplifiers Other Integrated Filters
- Requirements and concepts of future automotive electronic architecture from a comprehensive safety perspective
- Application Specific Integrated Circuit Design Topic 3 - Verification and Test
- Application Specific Integrated Circuit Design Topic 2 - FPGA Design with Verilog
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Targeted GaN R&D
- 【Silicon Labs BG22-EK4108A Bluetooth Development Review】+Create a Bluetooth program from scratch
- 【mmWave Studio】Several experiences in problem solving
- Pin constraints are lost in Gaoyun Yunyuan software
- I need a schematic diagram and test program for controlling a four-wire brushless motor with a 51 microcontroller and A4988
- 【GD32F310G-START】Hardware SPI driver ST7735
- [Mil MYD-YA15XC-T review] + oled screen display
- My EZ-cube is broken. The wrong HEX was burned when I upgraded the software. How can I burn the correct HEX back to D78F0730?
- 【TI recommended course】#What is I2C design tool? #
- How to enhance the anti-interference capability of the microcontroller reset pin?