8051 - 3 ways to add STC model in Keil

Publisher:静心静气Latest update time:2019-05-14 Source: eefocusKeywords:keil Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

【1】Database replacement method (STC official website method):

Note: This method is the simplest, but the disadvantage is that when selecting devices, you can only choose STC microcontrollers, and the original microcontrollers are gone, which is frustrating.

Steps:


First, back up the UV2.CDB (or UV3.CDB/UV4.CDB) file in the UV2 (or UV3/UV4) folder of the KEIL installation directory, and then replace it with the CDB file of the same name provided by the STC official website.

Note: If there is no UV4.CDB, you can rename "UV2.CDB (or UV3.CDB)" to "UV4.CDB" for use.

 

【2】New database adding method:

Note: By adding another MCU database, you can select STC MCU without affecting the use of the original database.


Steps:

① Download the STC database for Keil, rename it to STC.CDB and copy it to the Keil/UV2 directory. (If it is Kile3, it is UV3, Kile4 is UV4)

②Open the TOOLS.ini file in the Keil folder, type CDB0=UV2STC.CDB("STC") under [UV2] (that is, above [C51]), then save and exit to complete the addition. (If it is Kile3, it is UV3, and Kile4 is UV4)

Usage: When setting options for the target, click the Device page and select "STC" in Database.


When creating a new project, select "STC" in Select a CPU Date Base File.

                           

Note: The default header files used in the STC database provided by Macrocrystalline's official website are REG51.H, REG52.H... (that is, the header files that can be quickly inserted by right-clicking are REG51.H, REG52.H...).

The right-click shortcut to insert the header file is as follows:

Therefore, if you want to conveniently use the "right-click quick insertion of the corresponding model header file", it is recommended that you modify the database or add the STC model yourself.

 

【3】Original database addition method (recommended):

Note: Add STC microcontrollers directly to the original database. Only add the STC models you need. It is simple and convenient. You can select STC microcontrollers without affecting the use of the original database.

 

Steps:

step 1:

 

Step 2:

( Detailed description )

Finish.

 

 

use:


 

 

 

[Add data of STC15F104E]

8051-based microcontroller with 1T(1-clock) High-Speed Core,

Dual DPTR, 6 I/O Lines, 2 Timers/Counters,

4K bytes flash ROM, 128 bytes data RAM,

1K On-chip EEPROM, WDT

 

CPU=IRAM(0-0x7F) IROM(0-0x1FFF) CLOCK(45000000) MODP2

MON=S8051.DLL TP51.DLL("-p51")

SIM=S8051.DLL DP51.DLL("-p51")

SFILE="LIBSTARTUP.A51"("Standard 8051 Strrtup Code")

REGFILE=STC15F104E.H("STC")

                       ↑

                       ↓

 Put the header file STC15F104E.H in the C:KeilC51INCSTC directory (if there is no STC folder, build it yourself).

Note: If REGFILE=STC15F104E.H, do not use the following ("STC"), then the header file STC15F104E.H should be placed in the C:KeilC51INC directory.

 

[Add data of STC89C52RC]

8051-based microcontroller,

Dual DPTR, 32-36 I/O Lines, 3 Timers/Counters,

8K bytes flash ROM, 512 bytes data RAM,

4K On-chip EEPROM, UART, WDT, ISP/IAP

 

CPU=IRAM(0-0xFF) XRAM(0-0xFF) IROM(0-0x1FFF) CLOCK(45000000) MODP2

MON=S8051.DLL TP51.DLL("-p51")

SIM=S8051.DLL DP51.DLL("-p51")

SFILE="LIBSTARTUP.A51" ("Standard 8051 Startup Code")

REGFILE=STC89C52RC("STC")

 

 

【Supplementary explanation】

About database CDB files,

Kile4 is backward compatible. Kile4 can use and edit the database CDB files of Kile2 and Kile3.

Kile2 is not upward compatible and cannot use Kile4's database CDB file.

 

 

Related Links:

Make your programming more enjoyable (intelligent prompts, code formatting...): TKStudio V4.5.1 (Chinese compilation environment) + keil

http://hi.baidu.com/_bxak/item/6221df09472534e9ff240dff

 

STC series header files + STC UV2.CDB + UV3.CDB + UV4.CDB download

http://hi.baidu.com/江湖访问bxak/blog/item/de248beec7d097cb2f2e211b.html?timeStamp=1319175911186

About UV4.CDB attachment:

The compressed package contains: UV4.cdb, STC folder, instructions for use.doc

① Directly replace the UV4.cdb in the C:KeilUV4 directory with the UV4.cdb in the compressed package. 

(The UV4.cdb in the compressed package has already collected the database that comes with Keil + STC database (including: STC15F104E, STC15F204EA...))
② Put the "STC" folder in the compressed package into the C:KeilC51INC directory. (The "STC" folder in the compressed package has already stored the header files of all STC series)

The purpose of step ②: You can right-click to quickly insert the header file corresponding to STC. For example:


Keywords:keil Reference address:8051 - 3 ways to add STC model in Keil

Previous article:51 MCU Principle and Application--Chip Structure
Next article:STM32F0 advanced project real-time clock DS1307

Recommended ReadingLatest update time:2024-11-23 08:02

51 MCU tutorial: key input, matrix key (key usage) proteus simulation + keil
IO port principle (P1 port is the simplest, so only P1 is introduced here, the principles of other IO ports are similar) P1 port principle It can be seen that the working principle of P1 port is relatively simple. It is easier to understand using P1 port for input and output. 1. Internal bus: It is the value of the
[Microcontroller]
51 MCU tutorial: key input, matrix key (key usage) proteus simulation + keil
How does keil c51 start the c program?
Assembly starts from org 0000h, so how does keil c51 start the main() function? keil c51 has a startup program startup.a51, which is always compiled and linked with the c program. Let’s see how it and the main() function are compiled;   //The main function is as follows; void main(void) { while (1) This is an uncondit
[Microcontroller]
How to achieve precise delay of C8051 microcontroller
Code written in C: delay=0x64; while(--delay); The compiled assembly source code is as follows: ;SOURCELINE#62 00107F64MOVR7,#064H;2B,2CLK 0012? C0006: ;SOURCELINE#63 0012DFFEDJNZR7,? C0006;2B,2/3CLK If we use a 24MHZ crystal oscillator and each clock cycle is 41.6ns, then the delay accuracy of the above delay sta
[Microcontroller]
Problems with Keil's code optimization
After reading an article titled "Keil C51's method of continuously reading the same port" (original text) in the "Experience Exchange" column of "Microcontroller and Embedded System Application" magazine, issue 10, 2005, the author believes that the article does not provide an in-depth and accurate analysis of this iss
[Microcontroller]
Keil51 interrupt processing
Note the following about interrupt functions: (1) Interrupt functions cannot pass parameters. If an interrupt function contains any parameter declaration, a compilation error will occur. (2) Interrupt functions do not have a return value. If you attempt to define a return value, you will not get the correct result. It
[Microcontroller]
Microcontroller Teaching Based on Keil C51 Integrated Development Environment
1. Introduction The reform and practice of MCU teaching is a kind of teaching activity to better enable students to transform the theoretical knowledge of MCU they have learned into practical abilities to adapt to social development and employment needs. Nowadays, one of the main tasks of vocational education i
[Microcontroller]
Microcontroller Teaching Based on Keil C51 Integrated Development Environment
Design of wireless transceiver module based on C8051F340 and Si4432
    In order to save costs and reduce the difficulty of wireless communication for users. A wireless transceiver module based on C8051F340 and Si4432 is designed. Through a large number of interference experiments, it is confirmed that the module can work stably in some relatively harsh environments. This module has a
[Microcontroller]
Design of wireless transceiver module based on C8051F340 and Si4432
Design and implementation of embedded SNMP agent based on single chip microcomputer
Introduction SNMP (Simple Network Management Protocol) is widely used and powerful. As long as the management software has MIB (Management Information Base) and has appropriate permissions, the manager can access the SNMP agent. SNMP is generally used in computer networks and telecommunications networks. Th
[Microcontroller]
Latest Microcontroller Articles
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号