- •Preface
- •Document Conventions
- •Contents
- •Chapter 1. Introduction
- •Manual Topics
- •Changes to the Documentation
- •Evaluation Kits and Production Kits
- •Types of Users
- •Requesting Assistance
- •Software Development Cycle
- •Product Overview
- •Chapter 2. Installation
- •System Requirements
- •Installation Details
- •Folder Structure
- •Chapter 3. Development Tools
- •C51 Optimizing C Cross Compiler
- •A51 Macro Assembler
- •BL51 Code Banking Linker/Locator
- •LIB51 Library Manager
- •OC51 Banked Object File Converter
- •Chapter 4. Creating Applications
- •Creating Projects
- •Project Targets and File Groups
- •Overview of Configuration Dialogs
- •Code Banking
- •µVision2 Utilities
- •Writing Optimum Code
- •Tips and Tricks
- •Chapter 5. Testing Programs
- •µVision2 Debugger
- •Debug Commands
- •Expressions
- •Tips and Tricks
- •Chapter 6. µVision2 Debug Functions
- •Creating Functions
- •Invoking Functions
- •Function Classes
- •Chapter 7. Sample Programs
- •HELLO: Your First 8051 C Program
- •Introduction
- •RTX51 Technical Data
- •Overview of RTX51 Routines
- •TRAFFIC: RTX-51 Tiny Example Program
- •RTX Kernel Aware Debugging
- •Chapter 9. Using On-chip Peripherals
- •Special Function Registers
- •Register Banks
- •Interrupt Service Routines
- •Interrupt Enable Registers
- •Parallel Port I/O
- •Timers/Counters
- •Serial Interface
- •Watchdog Timer
- •D/A Converter
- •A/D Converter
- •Power Reduction Modes
- •Chapter 10. CPU and C Startup Code
- •Caveats
- •Hardware and Software Requirements
- •Serial Transmission Line
- •µVision2 Monitor Driver
- •µVision2 Restrictions when using Monitor-51
- •Monitor-51 Configuration
- •Troubleshooting
- •Debugging with Monitor-51
- •Chapter 12. Command Reference
- •µVision 2 Command Line Invocation
- •A51 / A251 Macro Assembler Directives
- •C51/C251 Compiler
- •LIB51 / L251 Library Manager Commands
- •OC51 Banked Object File Converter
- •Index
Getting Started and Creating Applications |
9 |
|
|
Chapter 1. Introduction
Thank you for allowing Keil Software to provide you with software development |
1 |
tools for the 8051 family of microprocessors. With the Keil tools, you can |
generate embedded applications for virtually every 8051 derivative.
NOTE
Throughout this manual we refer to these tools as the 8051 development tools. However, they support all derivatives and variants of the 8051 microcontroller family.
The Keil Software 8051 development tools listed below are programs you use to compile your C code, assemble your assembly source files, link and locate object modules and libraries, create HEX files, and debug your target program. Each of these programs is described in more detail in “Chapter 3. Development Tools” which begins on page 21.
µVision2 for Windows™ is an Integrated Development Environment that combines project management, source code editing, and program debugging in one single, powerful environment.
The C51 ANSI Optimizing C Cross Compiler creates relocatable object modules from your C source code.
The A51 Macro Assembler creates relocatable object modules from your 8051 assembly source code.
The BL51 Linker/Locator combines relocatable object modules created by the C51 Compiler and the A51 Assembler into absolute object modules.
The LIB51 Library Manager combines object modules into libraries that may be used by the linker.
The OH51 Object-HEX Converter creates Intel HEX files from absolute object modules.
The RTX-51 Real-time Operating System simplifies the design of complex, time-critical software projects.
The tools are combined into the kits described in “Product Overview” on page 16. They are designed for the professional software developer, but any level of programmer can use them to get the most out of the 8051 microcontroller architecture.
10 Chapter 1. Introduction
Manual Topics
1 This manual discusses a number of topics including:
How to select the best tool kit for your application (see “Product Overview” on page 16),
How to install the software on your system (see “Chapter 2. Installation” on page 19),
The features of the 8051 development tools (see “Chapter 3. Development Tools” on page 21),
How to create complete applications using the µVision2 IDE (see “Chapter 4. Creating Applications” on page 57),
How to debug programs and simulate target hardware with the µVision2 debugger (see “Chapter 5. Testing Programs” on page 93),
How to access the on-chip peripherals and special features of the 8051 variants using the C51 Compiler (see “On-chip Peripheral Symbols” on page 114),
How to run the sample programs (see “Chapter 7. Sample Programs” on page 149).
NOTE
To get started immediately, install the software (refer to “Chapter 2. Installation” on page 19) and run the sample programs (refer to “Chapter 7. Sample Programs” on page 149).
Changes to the Documentation
Last minute changes and corrections to the software and manuals are listed in the RELEASE.TXT files. These files are located in the \KEIL\UV2 and \KEIL\C51\HLP folders. Take the time to read these files to determine if there are changes that may impact your installation.
Getting Started and Creating Applications |
11 |
|
|
Evaluation Kits and Production Kits
Keil Software delivers software in two types of kits: evaluation kits and |
1 |
production kits. |
Evaluation Kits include evaluation versions of our 8051 tools along with this user’s guide. The tools in the evaluation kit let you generate applications up to 2 Kbytes in size. This kit allows you to evaluate the effectiveness of our 8051 tools and generate small target applications.
Production Kits (discussed in “Product Overview” on page 16) include the unlimited versions of our 8051 tools along with a full manual set (including this user’s guide). The production kits include 1 year of free technical support and product updates. Updates are available at www.keil.com.
Types of Users
This manual addresses three types of users: evaluation users, new users, and experienced users.
Evaluation Users are those users who have not yet purchased the software but have requested the evaluation package to get a better feel for what the tools do and how they perform. The evaluation package includes tools that are limited to 2 Kbytes along with several sample programs that provide applications created for the 8051 microcontroller family. Even if you are only an evaluation user, take the time to read this manual. It explains how to install the software, provides you with an overview of the development tools, and introduces the sample programs.
New Users are those users who are purchasing 8051 development tools for the first time. The included software provides you with the latest development tool technology, manuals, and sample programs. If you are new to the 8051 or the tools, take the time to review the sample programs described in this manual. They provide a quick tutorial and help new or inexperienced users get started quickly.
Experienced Users are those users who have previously used the Keil 8051 development tools and are now upgrading to the latest version. The software included with a product upgrade contains the latest development tools and sample programs.
12 Chapter 1. Introduction
|
Requesting Assistance |
||
1 |
|||
At Keil Software, we are dedicated to providing you with the best embedded |
|||
development tools and documentation available. If you have suggestions or |
|||
|
comments regarding any of the printed manuals accompanying this product, |
||
|
|||
|
please contact us. If you think you have discovered a problem with the software, |
||
|
do the following before calling technical support. |
||
|
1. |
Read the sections in this manual that pertains to the job or task you are trying |
|
|
|
to accomplish. |
|
|
2. |
Make sure you are using the most current version of the software and utilities. |
|
|
|
Check the update section at www.keil.com to make sure that you have the |
|
|
|
latest software version. |
|
|
3. |
Isolate the problem to determine if it is a problem with the assembler, |
|
|
|
compiler, linker, library manager, or another development tool. |
|
|
4. |
Further isolate software problems by reducing your code to a few lines. |
If you are still experiencing problems after following these steps, report them to our technical support group. Please include your product serial number and version number. We prefer that you send the problem via email. If you contact us by fax, be sure to include your name and telephone numbers (voice and fax) where we can reach you.
Try to be as detailed as possible when describing the problem you are having. The more descriptive your example, the faster we can find a solution. If you have a single-page code example demonstrating the problem, please email it to us. If possible, make sure that your problem can be duplicated with the µVision2 simulator. Please try to avoid sending complete applications or long listings as this slows down our response to you.
NOTE
You can always get technical support, product updates, application notes, and sample programs from www.keil.com/support.