Minimum 51 Development Board usage (Memo)

Source: Internet
Author: User

A 51 Development Board was developed recently, as shown in. This board is very simple,All I/O ports are extracted, and Peripherals can be expanded by themselves. P0 is used to pull up the resistance,11.0592 M crystal oscillator, reset key, DC power plug, DC power self-locking switch, microcontroller lock seat, expansion of three VCC And Gnd. Compared with the large development board bought by students, this board is more customizable. Because there are few things, this board is only 13 yuan, enough to learn 51 Single-Chip Microcomputer! I regret that I didn't buy one when I first learned 51! Write this articleArticleTo tell beginners how to start learning 51 SCM.

After buying this board, we also need some accessories. First, we need a core-core 4.5 chip (RMB) andUSB/TTL single-chip microcomputer download module (8 yuan), dubang line (20 cm, 40 root, 4 yuan), 5 V power supply, other LED light emitting diodes, buzzer, LED display, the bread version, the motor or something are selected based on your needs. AccessoriesFor example:

You also need to download and install several software:Keil micro vision (DevelopmentProgramGenerate binary files), STC-ISP (to the microcontroller download program ).

Open Keil, create a new project, and select Atmel-> PP2. Right-click the new project and set it. Click "output", select "create HEX file", create a new C or assembly file, and write a simple program. Here we provide you with a C program for the Flow lamp:

# Include <reg51.h> # Include <Intrins. h>//  The shift library function is included in this header file.  Void Delay (unsigned Int D) //  Define latency subfunctions { While (-- D> 0  );}  Void  Main () {unsigned  Char  I, Sel;  While (1  ) {Sel = 0xfe  ;  For (I = 0 ; I < 8 ; I ++ ) {P1 = Sel; //  The display variable is reversed and assigned to the P1 port. Delay ( 100000 ); //  Latency Sel = _ crol _ (SEL,1 ); //  Change the DISPLAY variable  }}} 

Then compile the source program to obtain the hex binary file.

Next, prepare the connection. Connect the USB downloading module to the serial port of the single-chip microcomputer with the dubang cable. Note that only three wires can be connected. Do not connect the 5 V power cord, then plug the USB downloading module into the USB port of the computer. The computer should prompt you to install the driver. Do not connect to the power source first. After the installation is complete, open the STC-ISP, muc type select stc89c52rc, select the compiled program file, from the COM1 port to try, click Download, if the COM1 port after the bright green icon, this is the comport. I use com3, for example:

At this time, the system will prompt "the connection is still in progress. Please power on the MCU... ", then we turn on the power (or connect the 5 V line). When the following prompt appears, it indicates that your program has been downloaded:

MCU type Is  : Maid version:  4  . 3 Cchinese: MCU firmware version:  4 . 3 cdouble speed /Double speed: 12 TB/ Single-speed oscillating Amplifier Gain: full gain next download P1.  0 /P1. 1  Internal extensions unrelated to downloads aux - Ram: Allows access (highly recommended). The data flash zone will be erased the next time the user application is downloaded: No user software starts the internal watchdog, and the internal clock frequency of the watchdog is reset:  11.059326 m  . External clock frequency:  11.059326 m  . Chinese: Reconnecting... current baud  Is :/The current baud rate is: 115200 BPS. We are erasing MCU flash... erasing application zone ...(  00 : 01  Download... (Start Time:  16 : 01 : 09  ) Program OK / Download okverify OK / Verify OK erase times /Erase time: 00 : 01  Program times /Download time: 00 : 01  Encrypt OK /Encrypted

If your P1 port is connected to a light emitting diode, you can see that the diode is cyclically lit.

Next, if you want to continue learning, you need to find a book, learn 51 basic knowledge, and learn assembly or C basic knowledge. The most important thing is to learn and practice, and write the instance programs in the book, put it on the Development Board and run it quickly.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.