Sunteți pe pagina 1din 10

b) Micro Controller

AT89S52
Features:
8K Bytes of In-System Programmable (ISP) Flash Memory Endurance: 10,000 Write/Erase Cycles 4.0V to 5.5V Operating Range 256 x 8-bit Internal RAM 32 Programmable I/O Lines Low-power Idle and Power-down Modes Fast Programming Time Flexible ISP Programming (Byte and Page Mode)

Description:

The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the Indus-try-standard 80C51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with insystem programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue

functioning. The Power-down mode saves the RAM con-tents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset.

Memory Organization
MCS-51 devices have a separate address space for Program and Data Memory. Up to 64K bytes each of external Program and Data Memory can be addressed.

(a) Program Memory


If the EA pin is connected to GND, all program fetches are directed to external memory. On the AT89S52, if EA is connected to VCC, program fetches to addresses 0000H through 1FFFH are directed to internal memory and fetches to addresses 2000H through FFFFH are to external memory.

(b) Data Memory


The AT89S52 implements 256 bytes of on-chip RAM. The upper 128 bytes occupy a parallel address space to the Special Function Registers. This means that the upper 128 bytes have the same addresses as the SFR space but are physically separate from SFR space. When an instruction accesses an internal location above address 7FH, the address mode used in the instruction specifies whether the CPU accesses the upper 128 bytes of RAM or the SFR space. Instructions which use direct addressing access the SFR space. For example, the following direct addressing instruction accesses the SFR at location 0A0H (which is P2). MOV 0A0H, #data

Instructions that use indirect addressing access the upper 128 bytes of RAM. For example, the following indirect addressing instruction, where R0 contains 0A0H, accesses the data byte at address 0A0H, rather than P2 (whose address is 0A0H). \MOV @R0, #data

Note that stack operations are examples of indirect addressing, so the upper 128 bytes of data RAM are available as stack space.

Pin Diagram

c) SOFTWARE DESCRIPTION
INTRODUCTION TO EMBEDDED C:
Ex: Hitec c, Keil c KEIL Software makes industrial-strength software development tools and C compilers that help software developers write compact, efficient embedded processor code.

For over two decades Keil Software has delivered the industry's most reliable embedded software development tools and compilers for writing efficient and compact code to run on the most popular embedded processors. Used by tens of thousands of customers including General Motors, Whirlpool, Qualcomm, John Deere and many others, HI-TECH's reliable development

tools and C compilers, combined with world-class support have helped serious embedded software programmers to create hundreds of breakthrough new solutions.

Whichever embedded processor family you are targeting with your software, whether it is the ATMEL, PICC or 8051 series, Keil tools and C compilers can help you write better code and bring it to market faster. KEIL PICC is a high-performance C compiler for the Microchip PIC micro 10/12/14/16/17 series of micro controllers. Keil PICC is an industrial-strength ANSI C compiler - not a subset implementation like some other PIC compilers. The PICC compiler implements full ISO/ANSI C, with the exception of recursion. All data types are supported including 24 and 32-bit IEEE standard floating point. Keil PICC makes full use of specific PIC features and using an intelligent optimizer, can generate high-quality code easily rivaling hand-written assembler. Automatic handling of page and bank selection frees the programmer from the trivial details of assembler code.

System Constituents

A Typical Embedded System :

Technically, there are prevalent and common characteristics of embedded systems. From a programmer's perspective the following components are minimum: Central Processing Unit (CPU), Random Access Memory (RAM), Programmable Read Only Memory (PROM) or Erasable PROM (EPROM), and Input/Output (I/O) space.

(a) Embedded C Compiler:


KEIL C - full featured and portable Reliable - mature, field-proven technology Multiple C optimization levels An optimizing assembler Full linker, with overlaying of local variables to minimize RAM usage Comprehensive C library with all source code provided Includes support for 24-bit and 32-bit IEEE floating point and 32-bit long data Mixed C and assembler programming Unlimited number of source files Listings showing generated assembler types

Compatible - integrates into the MPLAB development tools

IDE, MPLAB ICD and most 3rd-party

Runs on multiple platforms: Windows, Linux, UNIX, Mac OS X, Solaris

Embedded Development Environment:


PICC can be run entirely from the. This environment allows you to manage all of your PIC projects. You can compile, assemble and link your embedded application with a single step. Optionally, the compiler may be run directly from the command line, allowing you to compile, assemble and link using one command. This enables the compiler to be integrated into third party development environments, such as Microchip's MPLAB IDE.

(a) Embedded system tools: Assembler:


An assembler is a computer program for translating assembly language essentially, a mnemonic representation of machine language into object code. A cross assembler (see cross compiler) produces code for one type of processor, but runs on another. The computational step where an assembler is run is known as assembly time. Translating assembly instruction mnemonics into op-codes, assemblers provide the ability to use symbolic names for memory locations (saving tedious calculations and manually updating addresses when a program is slightly modified), and macro facilities for performing textual substitution typically used to encode common short sequences of instructions to run inline instead of in a subroutine. Assemblers are far simpler to write than compilers for high-level languages.

OPERATING SYSTEMS:
To run any software we need operating system. Embedded systems do not require a complete operating system, which may make the system bulky, but only the basic functionalities of the operating system in a real time environment RTOS. Off-the-shelf operating systems for these systems began to appear in the late 1970s, and today several dozen viable options are available. Embedded operating systems are available in variety of flavors: Windows NT, LINUX, Windows CE 3.0, PalmOS, QNX, ROMDOS, JBED, RT kernel, Tiny BIOS, Turbo task, Nucleus plus/Tasking, Diamond, and ThreadX etc. Out of these , a few major players have emerged , such as Vxworks, PSOS, nucleus, windows CE, ThreadX and Linux. Inferno and Chai are the two popular environments that are used to develop application stems

The Essence
An embedded system is a microcontroller-based, software driven, reliable, real-time control system, autonomous, or human or network interactive, operating on diverse physical variables and in diverse environments and sold into a competitive and cost conscious market.

Embedded Systems Types: High-end embedded & Lower- end embedded systems. High-end embedded system - Generally 32,64 Bit Controllers used with OS. Examples: Personal Digital Assistant and Mobile phones etc . Lower end embedded systems - Generally 8,16 Bit Controllers used with an minimal operating systems and hardware layout designed for the specific purpose. Examples: Small controllers and devices in our every day life like Washing Machine, Microwave Owens , where they are embedded in.

Classification

Real Time Systems RTS classification A right answer after the dead line is a wrong answer

RTS is one which has to respond to events within a specified deadline

Hard Real Time Systems Soft Real Time System "Hard" real-time systems have very narrow response time Example: Nuclear power system , Cardiac pacemaker. "Soft" real-time systems have reduced constrains on "lateness" but must operate very quickly and repeatable. Example: Railway reservation system takes a few extra seconds the data remains valid. still

CHARACTERISTICS Designs are cost-sensitive Have real-time performance constraints Used with Real-Time Operating Systems (RTOS) Software failure can be life-threatening May have constraints on power consumption Operate over a wide-range of environmental conditions Fewer system resources then a desktop system All code might be stored in ROM Require specialized design tools May have on-chip debugging resources

Development Environment:

Development processor The processor on which we write and debug our programs Usually a PC. Target processor The processor that the program will run on in our embedded system often different from the development processor. Two embedded solutions uClinux and ELKS of Linux is focused on MMU-less processors.

uClinux provides an advantage by offering an active developer community and providing free support. It has also been ported to several different processor's and development boards.

APPLICATIONS OF EMBEDDED SYSTEMS :


Embedded computing systems are found everywhere, including in cellular telephones, pagers, VCRs, camcorders, thermostats, automated supermarket stockers, computerized inventory control devices, digital thermometers, telephone answering machines, printers etc. They are also found in various fields like handheld PDAs, cameras, and microwave ovens. Cars are full of them, as are airplanes, satellites, and advanced military and medical equipments.

S-ar putea să vă placă și