A simple microcontroller suitable for classroom teaching experiment DEVELOPER
Microcomputer application system program is the backbone of the professional classes of Electricity, one of its operational very strong, for college students, classroom instruction alone is not adequate, except in the classroom requires students to master basic concepts, understanding of mcu extension interface circuit design method and the process of programming, the only through extra-curricular a lot of practice to master the MCU application system design steps, learn to develop microcontroller applications, the basic method.
Based on the AT89S52 microcontroller with in-system programming capabilities, integrating a set of low-cost, easily drawn, making quick, easy to operate experimental microcontroller development system. The system is very suitable for the classroom or outside the classroom to use.
Hardware circuit is divided into the smallest microcontroller system and downloader two parts.
Minimum System Principle: there is no minimum system peripheral devices and expansion peripheral interface microcontroller system. It is the MCU application system design basis, including the minimum system architecture options, reset the clock system design and system design. Under normal circumstances, three types of MCU Minimum System Sub-Structure: ① Bus-Bus applications, minimum system structure, the structure consists of bus-based MCU, reset circuit, clock circuit, I / O port and the parallel expansion of the total lines. ② bus-type non-bus applications, the minimum system structure, only the microcontroller reset circuit consisting of simple circuits, parallel bus is not used for external expansion, the application system can be used as I / O port to use. ③ the smallest non-bus-based microcontroller system architecture.
The minimum system introduced here belong to the first ② kinds, from MCU AT89S52 and ISP programming interface composition, its principles shown in Figure 1. Figure P0 ~ P3 mouth and CN104 left when the experiment or practical training as I / O port or connection with the expansion of the circuit. CON101 is to download or read the chip when the internal procedures used by ISP programming interface, operation, you need to remove the jumper J101. (ISP that is, English In-System Programmable, intended for in-system programming.)
Downloader: Download is controlled by interface board and connecting cable. Interface board schematic diagram shown in Figure 2 (a). Figure 8 in U201 is a 74HC244 buffer circuits for the computer parallel port and single-chip buffer isolation. The connector CN202 is a common DB25 pin-shaped plug, with the host computer connected to communicate; of these 4,5-pin control U201 chip, in its normal low level that allow data transmission, high when the output was high-impedance state 74HC244; 6 pin output data to the microcontroller; 7 feet is the clock signal; 9-pin is an output reset signal; 10 feet is required to receive from the microcontroller to read out data. The connector CN201 is a standard 10-pin IDC socket, its various functions shown in Figure 2 (b).
Download a 10-pin flat cable cables, two embossed with IDC plug. Download a termination device, the other end of the ISP port Minimum System board.
In this experiment development system, software and procedures used in keil c download software SLISP. Interested readers can use proteus simulation software. As the application circuit and procedures in the simulation environment and real environment to run, and in some cases, there are some differences, so here are not recommended (2 software can be used to the appropriate Web site to download and install).
keil C++ basic operations: Install keil c software, computer icon on the desktop will be displayed. Double-click the icon with the left mouse button are allowed to enter the work keil c interface, as shown in Figure 3. The interface with the Word interface is similar to above is a menu bar, followed by quick button on fences. Used here, some of the menu and the shortcut button on the meaning of the Chinese have been marked in Figure 3 on; use only function is to create a project or open an existing project, create or open a source text and so on, finally compile it into a need for hex file.
Its steps are as follows:
* New project or open an existing project
* A new file or open an existing file
* The destination file option set
* The establishment of the destination file, to obtain. HEX file
Program to read and download: You have installed a computer Ssangyong electronic download software in their desktop has icons. The same with the left mouse button double-click the icon can be downloaded into the MCU's work program interface, as shown in Figure 4. The interface is in Chinese, and more clear.
First use of "communications device parameter settings, and select" set as shown in the figure, that is, communication port set to parallel communication port "LPT1", rates set "TURBO" speed up, the device select "AT89S52".
Pulling minimum system board jumpers J101, J102, J103, plug in the AT89S52 chip; will download the line interface board into the computer's parallel port, and with the connecting cable to the minimum system and interface board with a good, and then pick the smallest system on the +9 V power supply. Note that "+" and "-" can not be wrong. Open the power of the minimum system power supply, you can read and write chip-based program.
If an error in the download process and will be the following. In the text box when prompted. Then be rewritten to find the reasons, you need to chip should first wipe to get rid of the original message, and then write.
If the original program has been modified, then to re-compile, or point of rebuilding the destination file "Rebuild alI target files" button to generate a new. HEX file; downloads would also like to re-load the same file name just generate a new . HEX file. So as to ensure that this download is a modified procedure.
The completion of the above operations, close the +9 V power supply, unplug the connecting cable, plug in the jumper J101, connected to the extension interface circuit, you can check the operation of programs to carry out experiments or developed.
Training case of
Control relay with two buttons together and release the suction.
The basic requirements: Click on the switch S1, relay pull-J; click of a button S2, relay J release. If S2 is not closed, then even if S1, relay J will not pull-in.
Circuit implementation: Using MCU 89S52 of P3.6 and P3.7 port P1.7 to control the state, so that the relay pull-in or release; when P3.6 to P1.7 are also low, low, Relay Pick-up; when the P3.7 to P1.7 are high when the high, the relay releases. The principle shown in Figure 5, the circuit board structures can be made universal.
Programming ideas: First, take P3.7, determine whether it is "1." Yes, the P1.7 set "1", return; not a "1", then it P3.6. Take P3.6, determine whether it is "0." Yes, the P1.7 set "0"; not a "0" is returned. The process shown in Figure 6.
Programming: According to the flow chart is not difficult to compile programs. Procedures available "Notepad" or "KEIL C" in the entry, and use the file name "rlcontrol.asm" to save. The specific meaning of Directive See the books.
Program debugging: specific steps are as follows:
① with "Notepad" or "KEIL C" in the entry or programming, and use a file name, such as "rlcontrol.asm" preservation;
② Open the "KEIL C" software to create a new project. Project name may also wish to "rlcontrol";
③ Open the file has been established "rlcontrol.asm", and that the file is added to the "Source Group 1" in;
④ In the "Options for Target'Target 1 '" in the "Output" tab on the settings;
⑤ point compile and build the target file, to be "rlcontrol.hex" documents;
⑥ pulling minimum system board jumpers J101, J102, J103, plug in the AT89S52 chip, will download the line interface board into the computer's parallel port on the connecting cable to the minimum system and interface board with a good, and then the smallest system connected to the +9 V power supply;
⑦ open download software and set up the parameters, load the file to be written "rlcontrol.hex", point "program" button to download the program (if necessary, should first of the chips to "erase");
⑧ completion of the above operations, close the +9 V power supply, unplug the connecting cable, plug in the jumper J101, connected to the extension interface circuit;
⑨ supply verification process, the two buttons whether the action meets the requirements, does not meet the requirements will be modified;
⑩ Repeat the above steps until you achieve the required functionality.
Micro Controller Unit Articles
- P89C51RD2 customizable interface design, human-computer interaction
- QST108 touch sensor interface design with PIC microcontroller
- Based on single chip car super capacitor test system design and implementation
- A simple microcontroller suitable for classroom teaching experiment DEVELOPER
- MCU for electric bicycles to provide an effective drive (Figure)
- Real-time kernel μC / OS-II under the Network Monitoring System
- Based on AT89C52 Microcontroller Design SD card reader
- Based on low-power MCU Intelligent Integrated Instrument Design
- A small, highly integrated intelligent design and realization of test device
- Freescale Flexis JM family of flexible controller to start the development of USB connections
- Intelligent design dumbbell
- Automotive Burglar Alarm Monitoring System
- A STC12C2052AD improved single-chip voltage regulator control circuit
- Embedded design using C8051F020 Tester
- Based on single-chip low-power active RFID tag design
- Based on OSEK / VDX the electric power system design
- Flexible framework for the realization of MCU products easily upgrade
- Wireless Remote Control LED Clock Screen Design
- ISP-based image processing system of the PLD hardware design
- A single-chip multi-machine communication system design
Can't Find What You're Looking For?
Rating: Not yet rated