【正文】
Ports ? Five I/O ports ? PORT A through PORT E ? Most I/O pins are multiplexed ? Generally have eight I/O pins with a few exceptions ? Addresses already assigned to these ports in the design stage ? Each port is identified by its assigned Special Function Registers (SFR) – look at the previous slide ? PORTA (address of F80) ? PORTB (address of F81) ? ? these are part of data memory or register file TRISB must be set to specify signal direction of PORT B. Processes and Conditions of Data Transfer ? Interrupt is a process of munication between two devices ? If provides efficient munication between the two devices ? Examples: Sending a file to a printer, pressing a key on the key board ? External or Internal to the MPU Processes and Conditions of Data Transfer MPU Initiating Unconditional Conditional (asks if device is ready) HW SW Parallel data transfer Serial data transfer RST Processes and Conditions of Data Transfer ? Reset ? Special type of external interrupt ? Examples: ? Manual Reset ? Poweron Reset ? Brownout Reset (power goes below a specifies value) MCU Support Devices (1 of 2) ? Timers ? A value is loaded in the register and continue changing at every clock cycle – time can be calculated ? Can count on rising or falling edge ? There are several timers: 8bit, 16bit ? Controlled by SFR ? Master Synchronous Serial Port (MSSP) ? Serial interface supporting RS232 ? Addressable USART ? Another serial data munication ? A/D converter ? Parallel Slave Port (PSP) ? Capture, Compare and PWM (CCP Module) ToCON PIC18F Special Features ? Sleep mode ? Powerdown mode ? Watchdog timer (WDT) ? Able to reset the processor if the program is caught in unknown state (., infinite loop) ? Code protection ? EEPROM can be protected through SFR ? Incircuit serial programming ? Incircuit debugger PIC18F4X2 Architecture Block Diagram PIC16F87 Architecture Block