The Addressing Methods Use to know the source address and destination address of data... Solving the problem by examples: Design the address decoding circuit using ROM and RAM.. The capa
Trang 1CHAPTER 1
FUNDAMENTAL OF
MICROCONTROLLERS
Trang 2Class Rules
1 Class attendance: 10% (if a student absent more than 2
time, the attendance score is zero)
2 Quizes or Excercises in class: 10%
3 Homeworks report: 15% (students will submit the homework via ELearning system)
4 Teamwork project : 25%
• Each team includes 3-4 students, each team will present
their research topic at the 3 final weeks of the semester
• English power point and english presentation in class are encouraged
5 Final exam: 40% (Students will allow to use their documents while doing the exam Time for final exam: 90 minutes)
Trang 3- Analog input/output interface makes a part of microcontroller circuit of mixed mode(both analog and digital nature).
Introduction
Trang 4Architecture of microcontroller
Microcontroller PIC, ATMega, TI:
RISC: Reduced Instruction Set Computer
Other Microcontroller:
Trang 5Some typical specifications of Pic families:
- Flash memory, I/O, Timer-Counter 8bits - 16bits;
- Communication: A/D, Rs232, SPI, I2C, CAN, LAN, USB,…
- Control: ExINT, Output Compare, Input Capture, PWM,
QEI,…
Trang 6Typical structure of microcontroller
Trang 7PIC 16F877
Trang 8PIC 16F877
Trang 9What is Microprocessor ? Example?
What is the differences between Microcontroller and Microprocessor?
Trang 10The Addressing Methods
Use to know the source address and destination address of data
Trang 11How to solve the addressing mode problem?
Review some popular IC using in addressing mode:
- 74139: decoding 2 4
- 74139: decoding 3 8
- Some logical gates: AND, OR, XOR, EX-OR, EX-NOR
Trang 12Introduction
Trang 13ROM and RAM
Typical using in the addressing problem
ROM
A0 - An nCS D0 - Dm
The ability to addressing data is based on the number of
Trang 14Solving the problem by examples:
Design the address decoding circuit using ROM and RAM The capacity of ROM is 16KB using pieces of 4KB ROM and the capacity of RAM is 8KB using pieces of 4KB RAM The starting address of ROMs is 0000h and the address of RAMs is following after the ending address of ROMs
How to solve this kind of problem?
Step 1: Make the addressing table of all peripherals
Step 2: Choose suitable address line to be the input signal to
decoding ICs as 74138 or 74139 or 74142, and decide which output pins of the decoding ICs to connect to the appropriate peripherals
Step 3: Draw the circuit.
Trang 16Exercises
1 Design the address decoding circuit using ROM and RAM The capacity of ROM is 16KB using pieces of 8KB ROM and the capacity of RAM includes 2 pieces of 4KB RAM and 2 pieces of 2 KB RAM The starting address of ROMs
is 0000h and the address of RAMs is following after the ending address of ROMs
2 Design the address decoding circuit using ROMs and RAMs The capacity of ROM is 32KB using pieces of 8KB ROM and the capacity of RAM is 4KB using pieces of 2KB RAM The starting address of RAMs is 0000h and the address of ROMs is following after the ending address of RAMs
Trang 17Think about the three types of problems
1 The starting addresses of each types of memory are given
2 The capacity of the second type is bigger than the first type
3 The capacity of the second type is smaller than the first type
Trang 18Programing Language and Programing Softwares
-Programing Language: C, Basic, ASM,
Trang 19Some popular loading circuits
1 FD-ICP
Loading program: WinPicPro
Trang 202 PIG-PG1
Loading program: WinPicPro
Trang 212 PIG-PG2
Loading program: WinPicPro
Introduction Introduction
Trang 222 PIG-PG3
Loading program: ICPro