Traditional Culture Encyclopedia - Photography and portraiture - Single-chip microcomputer external memory problem, please help.
Single-chip microcomputer external memory problem, please help.
It's really not enough to use 89C52, which has 8K program storage. The price and performance are equivalent to C5 1. Ordinary programmers can burn and write.
803 1 external memory, just connect the EA pin of 803 1 to low level, and the program will start from the external memory address of 0000H. Note: EA is an internal and external memory selection terminal. Please remember to connect it to high level when using 89C5 1.
Automatic parking charge management system based on single chip microcomputer control
Abstract: This paper introduces an automatic charge management system for temporary parking lot based on 89C5 1 single chip microcomputer. This system adopts the infrared detection charging method which is superior to the traditional parking charging method, and can realize the functions of automatic charging, real-time query, displaying the parking lot status, printing data, automatically opening and closing the parking lot door, changing the charging standard at any time and so on. The system is simple to operate, low in price, convenient to install and debug, and solves the management and charging problems of temporary parking lots well. Introduction to 0
With the economic growth, more and more people have joined the ranks of buying cars. The sharp increase in the number of cars and the relative shortage of parking lots make the management cost of parking lots prominent. Especially the temporary parking lot in large supermarkets, it is more difficult to manage and charge.
1 existing parking charge management system
At present, the parking lot charging management system usually adopts the following two charging methods:
(1) camera charging method: put a camera at the entrance and exit of the parking lot, and the camera will shoot the license plate number of the car and send it to a single chip microcomputer or computer for processing. Then the single chip microcomputer calculates the parking time and cost and controls the door to open. This scheme has a lot of information and needs a large storage capacity. Software design is complicated and expensive.
(2) Charge by swiping the card: the owner will apply for an IC card at the designated place, swipe the card in and out of the parking lot, and pay the fee through the IC card. But this method is more suitable for parking lots with long-term fixed parking spaces.
In order to solve the shortcomings of the above traditional charging methods, the author designed an automatic parking charge management system for temporary parking lots based on 89C5 1 single chip microcomputer. This system adopts the charging method of infrared detection single chip microcomputer, which requires small storage capacity and has the functions of automatic door opening and closing, automatic charging, display (displaying parking lot status), inquiry, printing, etc. The charging method can be adjusted, making the system more flexible. The whole system has the advantages of simple operation, low price and convenient installation and debugging. Can meet the requirements of managing temporary parking lots. In addition, the system can easily realize information encryption and various functions expansion, and can become a general charge management system through improvement.
2 system framework and workflow
2. 1 system framework
Divided by function. This temporary parking charge management system is divided into seven modules, as shown in figure 1.
(1) infrared detection module: installed in the parking lot and the entrance and exit of each parking space, used to detect the signals of the entrance and exit of the car and the parking space, and send them to the single chip microcomputer for corresponding processing. The infrared detection module consists of an infrared transmitting circuit and an infrared receiving circuit. The receiving circuit is divided into gate infrared receiving circuit and parking space infrared receiving circuit.
(2) Gate control module: cooperate with infrared detection module to perform the switch function of parking gate.
(3) SCM control center: 89C5 1 SCM system is adopted, which is the core part of this system. Its main function is to monitor the keyboard status and process the operation information input by the keyboard; Monitor the status of the parking lot, control the opening and closing of the gate, start timing when a car enters the parking lot, stop timing when a car leaves the parking lot, and convert the parking time into parking fee information; Control the display to display all kinds of information as required; Control the printing process of information.
(4) Parking lot status display module: display parking lot status signals. The yellow light indicates that the incoming and outgoing vehicles are being processed; The green light indicates that there is a vacancy: the red light indicates that the parking space in the venue is full and cars are not allowed to enter.
(5) Digital tube display module: display all kinds of parking information, including Beijing time, parking space, parking time, number of vacancies, parking fees, business volume, charging standards and operation tips. The module adopts 8 * * * LED static display mode, which saves the cost.
(6) Keyboard operation module: Use the 4x4 keyboard (1 6 switches in the array1) to perform various operations, including displaying and querying various information, modifying the charging standard, calibrating Beijing time, and printing the currently displayed contents.
(7) Micro printer module: TPUP-40A is selected to print invoices and total turnover.
Among them, the operation keyboard module, digital tube display module, parking lot status display module, micro printer module and single chip microcomputer control center are collectively called the central control circuit.
2.2 workflow
When a car passes by or stops in the parking lot, the infrared detection module will inform the single-chip microcomputer that there is a car coming in and out. The single-chip microcomputer will control the opening and closing of the parking lot door according to the state of the parking lot, calculate the parking time and expenses, and send them to the monitor for display, printer for printing, and handle the requirements of keyboard display, inquiry and modification. The parking fee is N yuan/hour, and if it exceeds 30 minutes, it will be counted as 1 hour, otherwise it will not be counted. The system can also act as a clock.
Automatic parking charge management system based on single chip microcomputer control
3 working principle of infrared detection module
Infrared detection module is the main module of this system. This section will introduce the working principle of this module in detail.
3. 1 infrared emitter
As shown in fig. 2, the infrared emitting circuit includes two infrared emitters D3 and D4 which are separated by a certain distance, for emitting infrared beams. Two NE555 timer chips each form a multivibrator. The first chip is 0.67KHz. On the one hand, its output is sent to the four pins of the second oscillator (2 1KHz square wave) for modulation, and the last output is used to light D3 and D4. On the one hand, it is sent to IC5 as a clock signal to control the opening and closing of the gate.
3.2 infrared receiver
The infrared beam is sent to TSOP 1738(o) and TSOP 1738( 1) of the infrared receiving circuit respectively. If two infrared beams are blocked, the output of the receiving circuit is 1, otherwise, the output is 0. After the pulse is processed, it triggers an interrupt and is sent to the single chip microcomputer for processing as a signal for the car to drive into or out of the parking lot. The parking space infrared receiving circuit is shown in Figure 3 (the gate infrared receiving circuit is similar to it, except that the integrated monostable trigger 74 12 1 triggered by falling delay is reduced).
The output of infrared receiver TSOP 1738 is open collector, and two infrared beams are sent to infrared receivers U 1 and U2 respectively. When the infrared beam is not blocked by the car, the output of U 1 and U2 is 0V, and if the beam is blocked, the output level is +5V respectively. Therefore, only when two infrared beams are blocked, U 1 and U2 output +5V level, which are sent to integrated monostable triggers U4 and U5 triggered by rising delay and falling delay respectively, so that 74 12 1 outputs square waves OUT 1 and OUT2, which are sent to 74ls/kloc-0. When the car enters the parking space, the single chip microcomputer takes out the system time at this time and sends it to the corresponding RAM. When the car leaves the parking space, the single chip microcomputer takes out the system time at this time again and subtracts it from the initial time, and the obtained time is the total parking time and sends it to the corresponding RAM.
Design of Single Chip Microcomputer Control Center
The control center of single chip microcomputer controls the input, processing and output of all signals in this system, and organically links all modules, which is the core part of the system.
4. 1 Hardware Settings
The control center adopts 89C5 1 single chip microcomputer system. Because the storage capacity required by the system is not large, only 89C5 1 internal RAM can be used without external RAM. Single-chip microcomputer adopts power-on and key reset circuits. The internal clock frequency is 12MHz, and the system clock is formed by software. Timer I 10 is set as the highest interrupt priority to ensure the accuracy of system time. In the setting of I/O port, the P0 port of single chip microcomputer is used as the data port. P0.0 ~ P0.7 are respectively connected with DB0~DB7 of the micro printer. P 1.0 ~ P 1.5 is used as an external interrupt source expansion port. P2.0 ~ P2.2 are respectively connected with red, green and yellow lights to indicate the parking lot status signal.
There are many interruptions to be handled by the automatic parking charge management system (including the interruption of cars entering and leaving the parking lot, the interruption of entering and leaving the parking space, etc.). ), and the response speed is required to be fast, so the method of software query queuing interrupt priority can not meet the requirements. Therefore, this system uses 74LS 148 priority encoder to expand the external interrupt source of single chip microcomputer, corresponding to different interrupt processing (such as start-stop timing, charging and so on). ), and sent to the display for display.
The circuit diagram of the single-chip microcomputer control center (included in the central control circuit) is complicated, and it is omitted here due to the limitation of space.
4.2 programming
The program of the single-chip microcomputer control center is written in MCS5 1 assembly language, which has high running efficiency. Its main procedures are:
① Main loop program: used to set internal ram and various interrupts, constantly scan the keyboard, make corresponding operations, and send them to the monitor for display. According to the system requirements, the program flow of the main cycle is shown in Figure 4.
② Print subroutine: complete the printing function of invoice or turnover information. When the invoice is printed, the parking information of the parking space will be cleared at the same time.
③ Switch the display subroutine: the back key on the 4x4 keyboard can switch the display of Beijing time, empty digits and parking information (including parking space, total parking time and parking fee), and record the display status for the printing subroutine. When parking information is displayed, if all the contents cannot be displayed at the same time, you can switch the display by rotating it up and down. Beijing time is displayed during initialization.
④ F3 function key operation subroutine: the F3 function key on the 4×4 keyboard is mainly used to query various data, set charging standards and calibrate Beijing time.
⑤ Timed interrupt service program: The system clock adopts the internal clock of single chip microcomputer, sets the clock to 24-hour system, and corrects the clock counting unit.
5 conclusion
There are some shortcomings in the traditional parking charge method. In view of these shortcomings, a brand-new automatic parking charge management system using infrared detection single chip microcomputer is designed, which provides a simple, low-cost and effective management method for temporary parking lots. The actual development and use of the system will greatly save the management cost and manpower of temporary parking lots and improve the utilization efficiency of temporary parking lots.
- Previous article:Oppoa35 mobile phone quotation parameters
- Next article:Teaching situation in Yuanpei Middle School
- Related articles
- How to shoot scenery Huawei enjoys 10 professional mode?
- What is the size of a photo with a blue background?
- Brief introduction of General Zhang Aiping
- How about Linqing Shuxiang Courtyard?
- How to choose high pixel and high sense of SLR?
- Pet Photography Failure Competition Award
- What are the main questions asked in the interview of the photography club?
- How to catch plums? What's the best fish to catch?
- What is the reason why Cameron began to take up photography?
- Independent photographer