hi i have some project that i made i hope that help you so
i used just tow 7 degement and i have no problem
i give you here the prog that i manage a controle tempreture and i display it
also with the picture of the circuit
this is the code of th .h file
#include <16F876A.h>
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES HS //High speed Osc (> 4mhz)
#FUSES NOPUT //No Power Up Timer
#FUSES NOPROTECT //Code not protected from reading
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOCPD //No EE protection
#FUSES WRT_50% //Lower half of Program Memory is Write Protected
#use delay(clock=8000000)
#define set PIN_B3
#define moin PIN_B4
#define plus PIN_B5
#define une PIN_B7
#define dize PIN_B6
and the .c file
BYTE CONST chif [10]= {0X3f,0X06,0X5b,0X4f,0X66,0X6d,0X7D,0X07,0X7F,0X6F};
// table containe the code of 7 segement
int8 value,un,diz,temp,temp1;
void affiche() // code of the display in 2 7 segments
{
un=value/10; // extract the first right part of the number
diz=value%10; //extract the first left part of the number
output_low(une); //then the out put code by code
output_high(dize); //and of corse one by one for exemple
output_c(chif[diz]); //we turn off the right 7 segment and we display
delay_ms(100); //and we turn on the other
output_low(dize);
output_high(une);
output_c(chif[un]);
delay_ms(100);
}
void main()
{
setup_port_a( AN0_AN1_VSS_VREF );
setup_adc(ADC_CLOCK_INTERNAL);
setup_spi(SPI_SS_DISABLED);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
// TODO: USER CODE!!
do {
///////////read temp
set_adc_channel( 0 );
value = read_adc();
output_c(value);
affiche();
/////////////testing
if(temp1>value)
output_high(PIN_b0);
else output_low(pin_b0);
///////////////////set temp
if(input(set))
{
do{
start:;
value=temp;
affiche();
if (input(moin)){temp--;goto start;delay_ms(70);while(moin);};
if (input(plus)){temp++;goto start;delay_ms(70);while(plus);};
temp1=temp;
}while(input(set));
}
}while(1);
}
And it is write in ccs compiler
here the circuit