Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
33Activity
0 of .
Results for:
No results containing your search query
P. 1
The Basic embedded concepts for 8051 architecture.

The Basic embedded concepts for 8051 architecture.

Ratings:

5.0

(1)
|Views: 659|Likes:
Published by sssampath
sssampath
sssampath

More info:

Published by: sssampath on Dec 03, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/05/2013

pdf

text

original

 
© Copyright Hitex (UK) Ltd. 1996C51 Primer page 1
C51 Primer
An Introduction To The Use OfThe Keil C51 Compiler On The8051 Family
Hitex (UK) Ltd.
University of Warwick Science Park Coventry, CV4 7EZTel: 024 7669 2066Fax: 024 7669 2131Email: sales@hitex.co.uk Web: http://www.hitex.co.uk © Copyright Hitex (UK) Ltd. 1996All Rights Reserved.No Part of this publication may be transmitted, transcribed, stored in aretrieval system, translated into any language, in any form, by any meanswithout the written permission of Hitex (UK) Ltd..
ISSUE: III
 
© Copyright Hitex (UK) Ltd. 1996C51 Primer page 2
Contents
3.1 Constants...................................................................................................................................................................................123.2 Variables.....................................................................................................................................................................................133.2.1 Uninitialised Variables............................................................................................................................................................133.2.2 Initialised Variables.................................................................................................................................................................133.3 Watchdogs With Large Amounts Of Initialised Data.................................................................................................................143.4 C51 Variables..............................................................................................................................................................................153.4.1 Variable Types........................................................................................................................................................................153.4.2 Special Function Bits..............................................................................................................................................................153.4.3 Converting Between Types....................................................................................................................................................163.4.4 A Non-ANSI Approach To Checking Data Type Overflow.................................................................................................17
4.1 Modular Programming In C51...................................................................................................................................................194.2 Accessibility Of Variables In Modular Programs......................................................................................................................204.3 Building A Real Modular Program - The Practicalities Of Laying Out A C51 Program...........................................................224.3.1 The Problem...........................................................................................................................................................................224.3.2 Maintainable Inter-Module Links..........................................................................................................................................234.4 Task Scheduling.........................................................................................................................................................................274.4.1 8051 Applications Overview.................................................................................................................................................274.4.2 Simple 8051 Systems.............................................................................................................................................................274.4.3 Simple Scheduling - A Partial Solution...................................................................................................................................284.4.4 A Pragmatic Approach...........................................................................................................................................................28
5.1 Accessing 8051 On-Chip Peripherals........................................................................................................................................305.2 Interrupts...................................................................................................................................................................................305.2.1 The Interrupt Function Type.................................................................................................................................................305.2.2 Using C51 With Target Monitor Debuggers...........................................................................................................................315.2.3 Coping Interrupt Spacings Other Than 8...............................................................................................................................315.3 Interrupts, USING, Registerbanks, NOAREGS In C51 - Everything You Need To Know.....................................................325.3.1 The Basic Interrupt Service Function Attribute.....................................................................................................................325.2.4 The Using Control..................................................................................................................................................................325.3.2 The absolute register addressing trick in detail.......................................................................................................................335.3.3 The USING Control...............................................................................................................................................................345.3.4 Notes on C51's "Stack Frame"...............................................................................................................................................355.3.5 When To Use USING.............................................................................................................................................................355.3.6 The NOAREGS pragma.........................................................................................................................................................355.3.7 The REGISTERBANK Control Alternative To NOAREGS................................................................................................365.3.8 Summary Of USING And REGISTERBANK......................................................................................................................375.3.9 Reentrancy In C51 - The Final Solution.................................................................................................................................375.3.10 Summary Of Controls For Interrupt Functions...................................................................................................................395.3.11 Reentrancy And Library Functions......................................................................................................................................39
6.1 Using Pointers And Arrays In C51...........................................................................................................................................406.1.1 Pointers In Assembler............................................................................................................................................................406.1.2 Pointers In C51.......................................................................................................................................................................406.2 Pointers To Absolute Addresses...............................................................................................................................................426.3 Arrays And Pointers - Two Sides Of The Same Coin?.............................................................................................................426.3.1 Uninitialised Arrays...............................................................................................................................................................426.3.2 Initialised Arrays....................................................................................................................................................................426.3.3 Using Arrays..........................................................................................................................................................................436.3.4 Summary Of Arrays And Pointers.........................................................................................................................................446.4 Structures...................................................................................................................................................................................456.4.1 Why Use Structures?..............................................................................................................................................................456.4.2 Arrays Of Structures..............................................................................................................................................................466.4.3 Initialised Structures...............................................................................................................................................................466.4.4 Placing Structures At Absolute Addresses.............................................................................................................................46
 
© Copyright Hitex (UK) Ltd. 1996C51 Primer page 3
8.1 Basic Use Of L51 Linker...........................................................................................................................................................608.2 Stack Placement.........................................................................................................................................................................608.3 Using The Top 128 Bytes of the 8052 RAM...........................................................................................................................618.4 L51 Linker Data RAM Overlaying...........................................................................................................................................618.4.1 Overlaying Principles.............................................................................................................................................................618.4.2 Impact Of Overlaying On Program Construction..................................................................................................................628.4.2.1 Indirect Function Calls With Function Pointers (hazardous)..............................................................................................638.4.2.2 Indirectly called functions solution.....................................................................................................................................658.4.2.3 Function Jump Table Warning (Non-hazardous)...............................................................................................................668.4.2.4 Function Jump Table Warning Solution...............................................................................................................................678.4.2.5 Multiple Call To Segment Warning (Hazardous)...............................................................................................................688.4.2.6 Multiple Call To Segment Solution.....................................................................................................................................698.4.3 Overlaying Public Variables....................................................................................................................................................69

Activity (33)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
S.Dharanipathy liked this
Prashant Ganappa liked this
lcz37296 liked this
deepak4315 liked this
Hardik liked this
Shamir liked this
sivnath liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->