PIC16F877 Feature Tutorials

The PIC16F877 is a very powerful and versatile microcontroller. This series of tutorials covers the features of microcontroller describing how to access the features of the micro.

If it isn't tested it probably doesn't work.  The following are not yet fully implemented

The I2C doesn't support all modes

SSP is not implemented yet

Reset is not fully supported

USART does not yet support 9 bit addressing

NOTE: This tutorial series, is for advanced users. You should be fluent with MPLAB and the PIC16F877 instruction set. If you are a beginner you should refer to the Tutorial series for the PIC16C55 which introduces in more detail microcontroller concepts and the MPLAB development environment.

Tutorial Name Last Updated PIC16F877 Features
Tutorial 1: PortB Counter 'Smoke Test' TRISB,PORTB
Tutorial 2: PortB Keypad Decoder  

TRISB/PORTB,PORTB PULLUP,TRISC,PORTC,PORTB Change Interrupt,Wakeup from Sleep

Tutorial 3: External Wakeup on INTB0  

TRISB/PORTB,TRISC/PORTC,TRISD/PORTC,INTBO Interrupt-Rising Edge, INTBO Interrupt - Falling Edge,INTB0 Wakeup from Sleep

Tutorial 4: Timer 0 External Counter  

TRISA/PORTA,TRISB/PORTB,T0KI,Timer0 Counter Mode

Tutorial 5: EEPROM Persistent Store  

TRISE/PORTE.TRISB/PORTB,TRISC/PORTC,TRISD/PORTD,EEPROM READ,EEPROM WRITE,EEPROM Interrupt,EEPROM Wakeup from Interrupt

Tutorial 6: FLASH Persistent Store  

TRISE/PORTE.TRISB/PORTB,TRISC/PORTC,TRISD/PORTD,FLASH READ,FLASH WRITE

Tutorial 7: Asynchronous USART echo  

TRISC/PORTC,USART Asynchronous Mode,USART Receive Interrupt,USART Receive,USART Transmit

Tutorial 8: Timer0 Counter Mode Tachometer-BarGraph  

Tutorial 9: 1 millisecond Duty, 500Hz signal using Timer0 with Prescalar and Register Preload  

Tutorial 10: Timer0 Infinite Interrupt Loop  

Tutorial 11: Beware TMR0 write 2 Cycle Inhibit, Prescalar clear!  

Tutorial 12: Using 16Bit Timer1 as 8Bit Timer  

Tutorial 13: Timer1 Asynchronous Clock Mode  

Tutorial 14: Pulse Width Modulation  

Tutorial 15: Using Capture module to interpret a PWM signal  

Tutorial 16: Using Compare modules to create a one shot timer  

Tutorial 17: Frequency generator using Compare Special Trigger  

Tutorial 18: Analog to Digital Conversion  

TRISA/PORTA,TRISB/PORTB,TRISC/PORTC,TRISD/PORTD,TRISE/PORTE,ADC Conversion,ADC Interrupt,ADC Wakeup from Sleep

Tutorial 19:
Copying a 24LC64 EEPROM using I2C Master mode communications.
 

Tutorial 20:
I2C Master/Slave Communication
 

Feature Matrix

Tutorial

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
                                         
PORTS                                        
TRIS/PORTA
TRIS/PORTB
TRIS/PORTC
TRIS/PORTD
TRIS/PORTE
PORTB Pullup
PORTB Changed Interrupt
INTBO Interrupt - Rising Edge
INTBO Interrupt - Falling Edge
A4/T0CKI
Timer0                                        
CounterMode
TimerMode                                        
TMR0 Interrupt                                      
RegisterLoad                                        
Prescalar                                      
Increment Inhibit                                        
Prescalor Reset                                        
Timer1                                        
TimerMode                                        
Timer1                                        
TimerMode                                        
EEPROM                                        
EEPROM WRITE                                      
EEPROM READ                                      
EEPROM Write Complete Interrupt                                      
FLASH                                        
FLASH WRITE                                      
FLASH READ                                      
USART                                        
Asynchronous Mode                                      
Synchronous Mode                                        
Transmit                                      
Transmit Interrupt                                      
Receive                                      
Receive Interrupt                                      
ADC                                        
ADC Conversion                                      
ADC Interrupt                                    
I2C                                        
Master Mode                                      
Interrupts                                        
INTPortB                                      
INTBO                                      
TMR0                                      
EEPROM Write Complete Interrupt                                      
TXIF - USART Transmit Interrupt                                      
RCIF - USART Receive Interrupt                                      
ADIF - ADC Interrut                                    
Wakeup from Sleep                                        
PORTB Changed Interrupt
INTBO  Interrupt
TMR0                                      
TXIF - USART Transmit Interrupt                                      
RCIF - USART Receive Interrupt                                      
ADIF - ADC Interrut