100 likes | 234 Views
Anglicky v odborných předmětech " Support of teaching technical subjects in English “. Training program: Mechanic - electrotechnician Program name: Digital processing - microprocessors III. class Microcontrollers Elaborated by: Vlastimil Vlček.
E N D
Anglicky v odborných předmětech"Support of teaching technical subjects in English“ Training program: Mechanic - electrotechnician Program name: Digital processing - microprocessors III. class Microcontrollers Elaborated by: Vlastimil Vlček Projekt Anglicky v odborných předmětech, CZ.1.07/1.3.09/04.0002 je spolufinancován Evropským sociálním fondem a státním rozpočtem České republiky.
PIC16F833 basic characteristics • Scope of supply voltage: 2V – 5V • Current consumption : 480uA at 5V/4MHz • RISC architecture (35 instructions) • Program memory: 4kB FLASH • Data memory: 256 byte SRAM, 256 byte EEPROM • Number of I/O lines: 24 • 10-bit A/D converter, 3 counters/ timers , 2 analog comparators, a serial port and a parallel port controlled by hardware, Watchdog Timer etc. • An external oscillator (up to 20 MHz) or an internal 8 MHzone (calibrated during production) • Package of 28 pins
Memory types The microcontrollers from Microchip use Harvard architecture – separated memories for program and data (independent buses). The program memory is of the OTP or FLASH type. In 10Fxx, 12Fxx and 16Fxx type ranges it is not directly accessible to the user; in higher type ranges, writing even in the program memory is enabled. The data memory is of the RAM type, both direct and indirect addressing are possible. In lower type ranges of microcontrollers (10Fxx, 12Fxx, 16Fxx), the data memory is, for technological reasons, divided into blocks which are called banks. The banks are software-selectable and are therefore arbitrarily accessible even during the program run. Most types of microcontrollers from Microchip have also a memory of the EEPROM type. It requires a special form of writing and is usedfor writing constants – e.g. for saving program presets in TV sets, for a periodical saving of data measurement results (temperature) etc. The PIC16F833 microcontroller belongs to the group of 8-bit microcontrollers. All memory cells as well as internal registers of the microcontroller have therefore the width of 8 bits. All memory cells are, in the terminology of microcontrollers, collectively called registers.
PIC16F883Selection of some important SFRs Special function registers (hereinafter referred to as SFRs) provide important information about the state of the microprocessor and its peripheral circuits, and they also give us the possibility to influence its further activity: STATUS Information about the results of arithmetic and logic operations, setup of the banks OPTION Setup of the timer, predevider and pull-up resistors INTCON Work with the interrupt system PCL Program counter (pointer to the program memory) PORTA, B, C, D, E Both-way multipurpose ports TRISA, B, C, D, E Setup of data downstream of the ports TMR0, 1, 2 Programmable counters/ timers W Working register. It is not directly accessible through an address. Participates in arithmetic and logic operations and data shifts.
Summary of the subject matter • What types of memories do we find in the PIC16F883 microcontroller? • What are “ports”? • What do we label as “a register” in microcontrollers? • Is it possible to change data downstream through the ports, or is it firmly determined by the port type?
Summary of the subject matter • What type of memory is a program memory? • What type of memory is a data memory? • What is the use of the EEPROM memory in a microcontroller? What are its advantages and disadvantages? • Which memory of a microcontroller is divided into “banks”?
References • DatasheetMicrochip PIC16F882/883/884/886/887 DS41291E (http://www.microchip.com) • Jiří Hrbáček: Mikrořadiče PIC16CXX a vývojový kit PICSTART (BEN – technická literatura, Praha 2001 3. dotisk 4. vydání) • Jiří Hrbáček: Komunikace mikrokontroléru s okolím 1 ((BEN – technická literatura, Praha 2002)