51 MCU Basics of IoT 01- Development Environment Construction

Publisher:学海星空Latest update time:2022-05-16 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Preface

From aerospace to children's toys, everything that has a little bit of intelligence is inseparable from the presence of microcontrollers... In this article, we will learn about the STC89C52 microcontroller, which belongs to the 8051 series of microcontrollers. As an entry-level microcontroller, the 51 microcontroller is not only widely used in teaching experiments, but also in actual projects.


1. Basic knowledge

1. What is a microcontroller?

A single-chip microcomputer is a single-chip microcomputer that consists of a central processing unit CPU, data storage RAM, program storage ROM, input/output devices (keyboard, display, etc.) integrated into a single chip.


2. What can a microcontroller do?

The functions of the microcontroller are well explained at the beginning of the preface. Anything that has a touch of intelligence is inseparable from the microcontroller, especially now that the Internet of Things is developing in full swing, and the microcontroller has ushered in a new spring. Currently, the most commonly used smart meters and smart small appliances are the 51 microcontroller + wireless module connected to the Internet of Things platform, and then the smart devices can be monitored through the front end.


3.Why should we learn microcontrollers?

Learning about microcontrollers can help you make some interesting small creations by yourself, improve your hands-on and practical abilities, and participate in electronic competitions. It is very helpful for job hunting after graduation, and you may even change the world accidentally.


4. Development Board Introduction

The 51 single-chip Internet of Things development board used in this experiment is shown in the figure below:

insert image description here

The corresponding names of the modules marked in the above figure are as follows:


2. Development Environment Construction

Download information from Baidu Cloud Disk:

Link: https://pan.baidu.com/s/1WVuun7PWWMfWLcbZ4-MWhw

Extraction code: h4iv


After downloading and decompressing, the directory is as follows:

insert image description here

1. Install CH340 driver

Open A-08 related software/must-install software/CH340_CH341

insert image description here

Double-click to install:

insert image description here

The following box pops up to indicate that the installation is successful, click OK

insert image description here

2. Install Keil 4

Open A-08 related software/must-install software/keil4

insert image description here

Click mdk473 to start installation

insert image description here

Click the Next button in the picture above to proceed to the next step

insert image description here

Check I agree to all the terms of the preceding License Agreement, then click Next


insert image description here

Select the default path C:Keil and click Next


insert image description here

Fill in the First Name, Last Name, Company Name, and E-mail content casually, click Next, and enter the installation page


insert image description here

Wait for the installation to complete

insert image description here

Continue to click Next

insert image description here


Click Finish, a pop-up box will pop up prompting you to install the driver software, click Install


insert image description here

After clicking Install in the above picture, the installation of Keil4 is completed, the web page opens the content in the picture below, and an icon is generated on the desktop, and the installation is complete.

insert image description here

3. Install C51 plug-in

Click A-08 related software/must-install software/keil4/c51v901.exe

insert image description here

Click Next

insert image description here


After checking the Agree tab, click Next


insert image description here

Select the same path as the Keil4 installation path, then click Next


insert image description here

Continue to click Next

insert image description here


If it appears during the process:

insert image description here


Click Replace All


insert image description here

4. Activate Keil 4

Open the Keil4 icon generated on the desktop as an administrator


insert image description here

Click License Management


Open the A-08 related software/must-install software/keil4 folder

Unzip keygen2032, copy the CID in keil LicenseMangement,

Click Generate

Copy the generated ID, paste it into Keil License Management, and click Add LIC

The above picture shows that the activation is successful and the validity period ends in 2032


3. Download and run

1. Compile

First, unzip the A-08 reference program.rar, and then open the first program: 1. Light up an LED

Click the compile icon, the system has 0 errors and 0 warnings

The generated hex file is as follows


2. Download

(1) Open the download software


Unzip A-08 related software/Required software/STC-ISP download/stc-isp-15xx-v6.87M.zip, then double-click to open stc-isp-15xx-v6.87M.exe


(2) Connecting Hardware

(3) Download the program

Set up the STC-ISP tool and select the burning file

Then click the Download/Program button

Then click the hexagonal self-locking switch twice in succession to reset and power on, complete the cold start, and download the program successfully


(4) Equipment operating status

After the program is downloaded successfully, the device LED0 is always on, indicating that the program is downloaded successfully


Reference address:51 MCU Basics of IoT 01- Development Environment Construction

Previous article:51 MCU Playing with the Basics of the Internet of Things 02-Light up the LED lights to achieve a marquee effect
Next article:The principle of sending and receiving of 8051 asynchronous serial port

Recommended ReadingLatest update time:2024-11-16 11:24

Serial communication of 51 series microcontroller
The serial communication of the microcontroller seems to be very complicated, mainly because it uses more registers. Compared with the previous knowledge, it has more comprehensive capabilities, and there are naturally more issues to consider when writing. The timers and interrupts learned before will be the basis of m
[Microcontroller]
51 MCU Series Knowledge 5--Parallel Port (2)
2. P1 port The mnemonic of the special register corresponding to port P1 is P1. It is an 8-bit special register with a byte address of 90H. Each bit has a bit address and can be accessed directly. The bit structure of the PI port is shown in Figure 2-20. The P1 port is also a quasi-bidirectional port, and its use
[Microcontroller]
LIN bus communication source program (master+slave) implemented by TJA1020+51 microcontroller
  LIN mater's 51 MCU code /**************master*****************/ #include REGX52.H #include intrins.h sbit p31=P3^1; sbit k1=P1^0; sbit k2=P1^1;  sbit p20=P2^0; unsigned char t; unsigned char sendflag, flag; void delay(unsigned int i) {      while(i--); } void send() {                                       // S
[Microcontroller]
LIN bus communication source program (master+slave) implemented by TJA1020+51 microcontroller
Digital tube display program based on 51 single chip microcomputer and DS18B20 temperature sensor
#include reg52.h #include intrins.h sbit DQ=P1^4;//temperature acquisition sbit latch1=P2^2;//segment latch sbit latch2=P2^3;//bit latch unsigned char code dofly_DuanMa ={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};//display segment code 0~9 unsigned char code dofly_WeiMa ={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,
[Microcontroller]
Reset operation and reset circuit design of AT89S51 microcontroller
Reset is the initialization operation of the microcontroller. You only need to add a high level to the reset pin RST of the AT89S51 for more than 2 machine cycles (that is, 24 clock oscillation cycles) to reset the AT89S51. reset operation When the AT89S51 is reset, the PC is initialized to OOOOH, causing the AT89S5
[Microcontroller]
Reset operation and reset circuit design of AT89S51 microcontroller
51 MCU data types int, float, number of bytes occupied by pointers
1. int === 2 bytes 2.sfr===Special function register, also an extended data type, occupies 1 memory unit, and can be used to access all special function registers in the 51 microcontroller. sfr P1 = 0x90; /////////This sentence defines P1 as the on-chip register of the P1 port. 3.sfr16===16-bit
[Microcontroller]
51 MCU data types int, float, number of bytes occupied by pointers
51 MCU Basics - Serial Communication
principle: It needs to be explained here that serial communication needs to occupy timer 1, so timer 1 cannot be used when serial communication is used, unless it is code optimization. This requires configuring several registers, which are all relatively simple. The TMOD register sets the working mode of the timer
[Microcontroller]
51 MCU Basics - Serial Communication
51 single chip microcomputer drives 16 times 16 dot matrix to display Chinese characters program
  Code: #include reg52.h typedef unsigned char uint8; typedef unsigned int uint16; sbit acon=P1^0; //upper 8-bit address line sbit bcon=P1^1; sbit ccon=P1^2; sbit acon1=P1^3; //lower 8-bit address line sbit bcon1=P1^4; sbit ccon1=P1^5; sbit en=P1^6; //38 decoder enable sbit en1=P1^7; uint8 j=0,k=0; code ui
[Microcontroller]
51 single chip microcomputer drives 16 times 16 dot matrix to display Chinese characters program
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号