After entering your email address, a confirmation email will be sent to your inbox. Please approve this email to receive our weekly eBook update. We will not share your personal information with any third party.

About the book

Description

This text book is intended for under-graduate Engineering and/or IT students studying micro-controllers and embedded systems. It covers mainly the 8051 family of micro-controllers starting with the basic architecture and then moves on to assembly language and Real-Time Operating System (RTOS) where three main types of self-developed RTOSs are discussed (with full source code listing). These are the round-robin SanctOS , the co-operative PaulOS and finally the pre-emptive MagnOS RTOS giving also various example application programs using the Keil IDE (http://www.keil.com).

Preface

This text book is intended to be used either as a stand-alone text for an 8051-based course on micro
controllers or as a reference book for those whose work requires familiarity with micro controllers and
real-time operating systems.

The strong emphasis of this book is on interfacing and programming the 8051 to typical real-world devices
such as switches, displays, motors, and A/D converters through both assembly language and C language
programming. In particular, a variety of Real-Time Operating Systems (RTOS) are well explained and
working programs are actually implemented (and well documented). Many programming examples, in
both assembly language and C, are also included in order to help the students (and anyone interested
in the topic) better understand the RTOS principle.

It would be helpful if the reader has already got some familiarity with personal computers and has taken
introductory courses in digital devices and some experience with assembly language programming. It is
assumed that the reader is familiar with binary and hexadecimal numbers.

Learning to write programs is like learning to ride a bicycle in that reading alone is not enough. Handson
practical experience is essential. Therefore, to enhance the usefulness of this book as a learning tool,
the reader is encouraged to test some of the example programs given throughout this book using easily
available free software, such as the latest demo version of the KEIL IDE (http://www.keil.com).

Content

Preface

Acknowledgements

Dedications

List of Figures

List of Tables

8051 Basics

Introduction

Memory Types

Code Memory

External RAM

Register Banks

Bit Memory

Special Function Register (SFR) Memory

SFR Descriptions

Basic Registers

The Accumulator, Address E0H, Bit-addressable

The R registers

The B Register, address F0H, Bit-addressable

The Data Pointer (DPTR)

The Program Counter (PC)

The Stack Pointer (SP), address 81H

Addressing Modes

Program Flow

Low-Level Information

Timers

Serial Port Operation

Interrupts

A51 Examples

Template.a51

Serial Port Example Program

Traffic Lights A51 Program

8032 Differences

8032 Extras

256 Bytes of Internal RAM

Additional Timer 2

Evaluation Boards

FLITE-32 Development Board

Typical Settings for KEIL uV2

The NMIY-0031 Board

C8051F020TB

Programming in C with KEIL μV2 IDE

Byte Ordering – BIG ENDIAN and LITTLE ENDIAN

Explicitly Declared Memory Types

Data types

Interrupt routines

Real-Time Operating System

What is a Real-Time Operating System

Types of RTOSs

SanctOS – a Round-Robin RTOS

SanctOS System Commands

Variations from the A51 version

SanctOS example program

PaulOS – a Co-operative RTOS

Description of the RTOS Operation

PaulOS.C System Commands

Descriptions of the commands

PaulOS parameters header file

Example using PaulOS RTOS

MagnOS – a Pre-Emptive RTOS

MagnOS System Commands

Detailed description of commands

Interfacing

Interfacing add-ons to the 8051

LEDs

Input Switches

Keypad

LCD Display

LCD Command Set

DC Motor

DC motor using H-Bridge

Model Servo Control

Stepper Motor

Index for Part I

Index for

Programming Tips and Pitfalls

RAM size

SP setting

SFRs

Port usage

DPTR

Serial port (UART)

Interrupts

RTOSs pitfalls

C Tips

Appendix A ParrOS.a51

Appendix B PaulOS A51 version

Appendix C SanctOS.C

Appendix D PaulOS.C

Appendix E MagnOS.C

Appendix F Further Examples

Appendix G 8086 PaulOS RTOS

Appendix H 8051 Instruction Set

Bibliography

Index

End Notes

This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with EU regulation.