Training program: Mechanic - electrotechnician Program name: Digital processing - microprocessors

bendembarrassΗλεκτρονική - Συσκευές

2 Νοε 2013 (πριν από 3 χρόνια και 10 μήνες)

79 εμφανίσεις

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.


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 MHz

one
(calibrated during production)


Package of 28 pins

PIC16F833

basic characteristics

PIC16F833


block diagram


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 a
nd

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 used

for writing constants


e.g. for saving program
presets in TV sets, for a periodical saving of data measurement results (temperature) etc.



The PIC16F8
3
3 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
.

PIC16F8
8
3


program memory

PIC16F883
-

data memory, banks

PIC16F883

Selection 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

?




Datasheet

Microchip

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)



References