PIC16F877A Blink Every One Second for 7-segment displays

Kubilay
1 min readApr 4, 2021

--

Start PICSimLab. Select the board McLab2. Select PIC16F877A as
microcontroller using the micro-controller tab. Configure the microcontroller through your
code as follows:

#pragma config FOSC = XT // Oscillator Selection bits (XT oscillator)
#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config BOREN = OFF // Brown-out Reset Enable bit (BOR disabled)
#pragma config LVP = OFF // Low-Voltage (Single-Supply) In-Circuit Serial
Programming Enable bit (RB3 is digital I/O, HV on MCLR must be used for
programming)
#pragma config CPD = OFF // Data EEPROM Memory Code Protection bit (Data
EEPROM code protection off)
#pragma config WRT = OFF // Flash Program Memory Write Enable bits (Write
protection off; all program memory may be written to by EECON control)
#pragma config CP = OFF // Flash Program Memory Code Protection bit (Code
protection off)

Program the microcontroller so that the most significant 8-bit of the analog to digital conversion is shown on 3 seven-segment displays on the board. Validate its operation by changing the Pot P2. The result shown to the display should blink every 1 second as depicted in Solution_Video_1.

--

--

No responses yet