STC12C5A60S2 51 microcontroller minimum system,

Source: Internet
Author: User

STC12C5A60S2 51 microcontroller minimum system,
STC12C5A60S2

1. Connect the physical circuit according to the chip documents. Minimum system:

Circuit Diagram <> physical Diagram
  2. Install the driver according to the usb downloader1. first, plug the usb downloader into the computer, View computer device management, view the occupied com port if the device is not identified, you need to install the usb driver 2. install the keil compiler 1>. create a new project, create a new source code file, and add the file to the project to create a project: project-> new project-enter the project name (click to save) choose the chip model-> Atmel-> 89c52 (compatible with 89c51) to create a file: file-> (press ctrl + s)-> enter the file name (testFile. c. Click Save.) add file to the project: Right-click Source Group1 and choose add file to group1... set compilation settings (ensure): output> create hex ~ (Make sure it is selected) Compile: After editing the source code, click compile. The generated file is under the current project *. hex 3. Download the source code to the chip1. first, make sure that the minimum system is connected. The usb downloader connects to the computer and connects to the minimum system Gnd, Rxd, and Txd. vcc (not connected to the chip first) 2. open the ISP client and select *. download the hex file (the download baud rate is set to 57600-19200. when the download is in the waiting status, connect to the Vcc line and start the download (if the minimum system is OK) 4. hello world The LED lamp is connected to the p1 port of the chip and the Gnd (the minimum system can be verified to run)
The Code is as follows:# Include <reg52.h> sbit led1 = P1 ^ 0; void delay (unsigned int I); // declare the latency function void main () {while (1) {led1 = 1; delay (10000); led1 = 0; delay (10000 );}} /******************/void delay (unsigned int I) {unsigned char j; for (I; i> 0; I --) for (j = 255; j> 0; j --);} STC12C4052AD 1. according to the chip circuit connection circuit diagram <> physical graph line connection vcc20 connection buzzer + pole gnd connection-pole 2. Example code in program unzip .zip-> project-> music-wing-waving girl

 

 

Related Article

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.