
Microcontroller. Outline. Microcontroller PIC 16F84 Architecture, Instructions, Applications Microcontroller PIC 16F877 Architecture, Applications with, Keypad, LCD, Stepper motors, Analog to digital conversions, Timers, PWM, Serial communications, graphical LCD.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Chapter 1: The microcontroller
PIC 16F84
PIC16F84 has two separate memory blocks, one for data and the other for program. EEPROM memory with GPR and SFR registers in RAM memory make up the data block, while FLASH memory makes up the program block.
LIST p=16F877
#include "P16F877.INC"
cblock 0x20
count, lc1, lc2;
endc
; Vector for normal start up.
org 0
goto start
org 4
goto inthlr
…..
…
bank0 macro;
bcf STATUS, RP0
endm; End of macro
bank1macro;
bsf STATUS, RP0;
endm;
Enableint macro;
bsf INTCON, 7; Set the bit
endm; End of macro
Disableint macro; Interrupts are globally disabled
bcf INTCON, 7; Reset the bit
endm; End of macro
Input macro par1, par2; Macro input
bank1; In order to access TRIS registers
bsf par1, par2; Set the given bit input
bank0; Macro for selecting bank0
endm; End of macro
Output macro par1, par2; Macro output
bank1; In order to access TRIS registers
bcf par1, par2; Reset the given bit = output
bank0; Macro for selecting bank0
endm; End of macro
Label ; subprogram is called with "call Label"
set of instructions
set of instructions
set of instructions
return or retlw
In microcontroller systems, beeper is used for indicating certain occurrences, such as push of a button or an error. To have the beeper started, it needs to be delivered a string in binary code - in this way, you can create sounds according to your needs. Connecting the beeper is fairly simple: one pin is connected to the mass, and the other to the microcontroller pin through a capacitor, as shown on the following image.