220 likes | 491 Views
Chapter 2 The PIC 16F877 Microcontroller. Features. 16F877 Features. PIC Oscillator. _ LP_OSC Oscillator Low frequency (32<F<200Khz) ; _XT_OSC Oscillator medium speed (200Khz<F<4Mhz) ; _HS_OSC Oscillator High speed (4Mhz<F<20Mhz) ; _RC_OSC Oscillator RC.
E N D
Chapter 2 The PIC 16F877 Microcontroller
PIC Oscillator • _LP_OSC Oscillator Low frequency (32<F<200Khz) ; • _XT_OSC Oscillator medium speed (200Khz<F<4Mhz) ; • _HS_OSC Oscillator High speed (4Mhz<F<20Mhz) ; • _RC_OSC Oscillator RC
Special function • : ; Protection of program ; ------------ _CP_ALL total protection ; _CP_HALF protection from 1000 to 1FFF ; _CP_UPPER_256 protection from 1F00 to 1FFF ; _CP_OFF no protection ; • Debugging ; --------- ; _DEBUG_ON RB6 and RB7 used to debug ; _DEBUG_OFF RB6 and RB7 used normally ; • Access to flash program ; -------------------------- ; _WRT_ENABLE_ON The program can be used in the flash ; _WRT_ENABLE_OFF The program cannot be written in the flash; • Protection of EEPROM ; ----------------------- ; _CPD_ON Memory EEPROM protected ; _CPD_OFF Memory EEPROM not protected ;
Special function • Programming on circuit ; ------------------------- _LVP_ON RB3 can program the PIC ; _LVP_OFF RB3 normal utilization ; • Reset the PIC if potential <4V ; ------------------------------ ; _BODEN_ON Reset potential on service ; Valid PWRTE_ON automatically ; _BODEN_OFF Reset potential not worked ; • Retard when the power is ON ; ----------------------------- ; _PWRTE_OFF Quick start ; _PWRTE_ON temporized start ; • Watchdog ; -------- ; _WDT_ON Watchdog works ; _WDT_OFF Watchdog does not work
Des Macros BANK0 macro ; passer to bank0 bcf STATUS,RP0 bcf STATUS,RP1 endm BANK1 macro ; pass to bank1 bsf STATUS,RP0 bcf STATUS,RP1 endm BANK2 macro ; pass to bank2 bcf STATUS,RP0 bsf STATUS,RP1 endm BANK3 macro ; pass to bank3 bsf STATUS,RP0 bsf STATUS,RP1 endm