Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
6Activity
0 of .
Results for:
No results containing your search query
P. 1
ESPWithThePIC16F877

ESPWithThePIC16F877

Ratings: (0)|Views: 51 |Likes:
Published by thoyeurua
he thong nhung voi pic 16f877a
he thong nhung voi pic 16f877a

More info:

Categories:Types, Research, Science
Published by: thoyeurua on Mar 24, 2010
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

10/25/2011

pdf

text

original

 
 EMBEDDEDSYSTEMSPROGRAMMINGWITH THEPIC16F877
Second EditionBy Timothy D. GreenCopyright 2008 by Timothy D. GreenAll Rights Reserved.
 
 2 
Table of Contents
 Preface …………………………………………………………………. 5List of Figures …………………………………………………………. 6Abbreviations and Acronyms …………………………………………. 7Trademarks ……………………………………………………………. 10Chapter 1 Introduction to ESP and the PIC …………………………. 11Chapter 2 Microcontrollers and the PIC16F877 ……………………. 15Section 2.0 Chapter Summary ……………………………….. 15Section 2.1 Memory and Memory Organization ……………. 15Section 2.2 The PIC16F877 …………………………………. 16Section 2.3 Programming the PIC …………………………… 17Chapter 3 Simple PIC Hardware & Software (“Hello World”) …….. 20Section 3.0 Chapter Summary ……………………………….. 20Section 3.1 A Simple Example System ……………………… 20Section 3.2 Summary of Instructions and Concepts …………. 25Chapter 4 The PIC Instruction Set (Part I) ………………………….. 27Section 4.0 Chapter Summary ………………………………. 27Section 4.1 The PIC16F877 Instruction Set ………………… 27Section 4.2 Summary of Instructions and Concepts …………. 33Chapter 5 The PIC Instruction Set (Part II) …………………………. 34Section 5.0 Chapter Summary ……………………………….. 34Section 5.1 Introduction ……………………………………… 34Section 5.2 Keypad and Display Interface …………………… 35Section 5.3 The STATUS Register and Flag Bits ……………. 39Section 5.4 The Keypad Software ……………………………. 40Section 5.5 The LED Display Software ……………………… 43Section 5.6 Improved Display and Indirect Addressing ……… 46Section 5.7 Odds & Ends …………………………………….. 50Section 5.8 Using KEY_SCAN and DISPLAY Together ……. 54Section 5.9 A Last Look at the Advanced Security System ….. 56Section 5.10 Summary of Instructions and Concepts ………… 57Chapter 6 Fundamental ESP Techniques ……………………………. 59Section 6.0 Chapter Summary ………………………………… 59Section 6.1 Introduction ………………………………………. 59Section 6.2 Software Readability …………………………… 59Section 6.3 Software Maintainability …………………………. 60
 
 3
 Chapter 6Section 6.4 Software Fundamentals ………………………….. 60Section 6.5 The Background Routine ………………………… 61Section 6.6 The Watch-Dog Timer …………………………… 61Section 6.7 Event-Driven Software …………………………... 62Section 6.8 Interrupts …………………………………………. 65Section 6.9 Slow Inputs and Outputs …………………………. 65Section 6.10 Software Time Measurement …………………… 66Section 6.11 Hashing …………………………………………. 67Section 6.12 Waveform Encoding ……………………………. 68Section 6.13 Waveform Decoding …………………………… 71Section 6.14 RAM, ROM, and Time Tradeoffs ……………75Section 6.15 ROM States ……………………………………... 75Section 6.16 Limitations of C/C++ …………………………… 76Chapter 7 Advanced ESP ……………………………………………. 78Section 7.0 Chapter Summary ………………………………… 78Section 7.1 Introduction ………………………………………. 78Section 7.2 Sine Wave Generation …………………………….78Section 7.3 Dual-Tone-Multi-Frequency (DTMF) Signaling …81Section 7.4 Pulse-Width Modulation ………………………….82Section 7.5 ADPCM Data Compression ………………………84Section 7.6 Test Functions and System Ideas …………………87Chapter 8 PIC Peripherals and Interrupts ……………………………91Section 8.0 Chapter Summary ………………………………...91Section 8.1 Overview of the PIC Peripherals …………………91Section 8.2 Input/Output Ports ………………………………..93Section 8.2.1 Port A ………………………………………….. 93Section 8.2.2 Port B, Port C, Port D ………………………….. 95Section 8.2.3 Port E ………………………………………….. 95Section 8.3 Interrupts …………………………………………. 95Section 8.4 ADC and Analog MUX ………………………….. 98Section 8.5 Watch-Dog Timer ………………………………... 102Section 8.6 Timer 0 …………………………………………… 103Section 8.7 Timer 1 ………………………………………….. 105Section 8.8 Timer 2 ………………………………………….. 106Section 8.9 Capture Mode …………………………………… 107Section 8.10 Compare Mode ………………………………… 109Section 8.11 Pulse-Width Modulation (PWM) ……………… 111Section 8.12 Parallel Slave Port ……………………………… 114

Activity (6)

You've already reviewed this. Edit your review.
1 hundred reads
anna_malai078351 liked this
rtyagi2000 liked this
elcomandante liked this
sachinkaranth liked this
cadrian_ liked this

You're Reading a Free Preview

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