Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.
-
Upload
brent-blake -
Category
Documents
-
view
213 -
download
0
Transcript of Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.
![Page 1: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/1.jpg)
Eng .Samra EssalaimehEng .Samra EssalaimehPhiladelphia UniversityPhiladelphia University
2013/20142nd Semester
PIC MicrocontrollersPIC Microcontrollers
![Page 2: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/2.jpg)
Computer Systems
![Page 3: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/3.jpg)
The PC system main unit.
PC motherboard
![Page 4: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/4.jpg)
Block diagram of PC motherboard.
![Page 5: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/5.jpg)
Word processor Operation
![Page 6: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/6.jpg)
PC Microprocessor System
Block diagram of PC microprocessor system.
System Operation
![Page 7: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/7.jpg)
•Program ExecutionThe ROM and RAM memory contain program information and data in numbered locations.The ISD contains address decoding logic which allocates a particular memory chip to a range of addresses. The I/O port registers, which are set up to handle the data transfer in and out ofthe system, are also allocated particular addresses by the system designer, and accessed by the CPU in the same way as memory locations.
•Execution Cycle
![Page 8: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/8.jpg)
PC Engineering Applications
![Page 9: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/9.jpg)
The MicrocontrollerThe microcontroller can provide, in a
simplified form, all the main elements of the conventional microprocessor system on a single chip.
less complex applications can be designed and built quickly and cheaply
![Page 10: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/10.jpg)
A Microcontroller Application
Microcontroller keypad display system
![Page 11: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/11.jpg)
Programming a Microcontroller
![Page 12: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/12.jpg)
Information CodingNumber Systems: 1.Decimal: Base 10
![Page 13: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/13.jpg)
2. Binary: Base 2
3. Hexadecimal: Base 16
hexadecimal is used as a way to represent binary numbers in a compact way, while allowing easy conversion back to the original binary
![Page 14: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/14.jpg)
Examples of equivalent values
Counting:The rules for counting in any number system:1.Start with all digits set to zero.2. In the right digit position (LSB), count up from zero to the maximum digit available (1 in binary, 9 in decimal, F in hexadecimal). 3. If a column value is at its maximum, reset it to zero, and increment (add 1 to) the next column to the left.In microprocessors, there is a fixed number of digits in the registers which store binary numbers (8, 16, 32 bits or more). If the number storage space has a fixed number of digits, leading zeros must be used to fill the empty positions, because each register bit must be either 1 or 0, and leading zeros do not alter the value.
![Page 15: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/15.jpg)
![Page 16: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/16.jpg)
Bits, Bytes and Words:
One binary digit represents a ‘bit’ of information. A group of 8 bits is called a ‘byte’, and larger binary codes are called ‘words’. This last term is used fairly loosely, but it sometimes refers to a 16-bit code, with a 32-bit code called a ‘long word’, specifically in the Motorola 68000 CPU, which was widely used in the past. As we now know, in hexadecimal four bits are represented by one hex digit, so a byte is 2 hex digits, and so on. Thus, register and memory values are typically displayed as hexadecimal numbers with 2, 4, 8, 16 . . . digits.
![Page 17: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/17.jpg)
Machine Code ProgramsData Words:
![Page 18: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/18.jpg)
Machine Code
8086 Machine Code
![Page 19: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/19.jpg)
PIC Machine Code
![Page 20: Eng.Samra Essalaimeh Philadelphia University 2013/2014 2 nd Semester PIC Microcontrollers.](https://reader036.fdocuments.in/reader036/viewer/2022081519/56649e925503460f94b97820/html5/thumbnails/20.jpg)
ASCII Code:ASCII (American standard code for information interchange)
is a type of binary code for representing alphanumeric characters, as found on your computer keyboard.
The basic code consists of seven bits. For example, capital (or ‘upper case’) ‘A’ is represented by binary code
100 0001 (65), ‘B’ by 66, and so on to ‘Z’ = 65+25 = 90 = 101 10102. Lower case letters
and other common keyboard characters such as punctuation, brackets and arithmetic signs, plus some special control characters also have a code in the range 0–127. The numerical characters also have a code, for example ‘9’ = 011 10012, so you sometimes need to make it clear if the code is the binary equivalent 10012 or the ASCII code 011 10012.