Bob Parihar
Member
I did seven segment interfacing o simulation and on developing kit of 8051 and i was successful( when i did connect the seven segment only to the MCU in Proteus )
but now when i did implement it on my own general purpose PCB board with the circuit that is required for the hardware then i am getting error in output..
with the same circuit proteus also giving error on output
the circuit i am following is in the attached images
my code is as follows
but now when i did implement it on my own general purpose PCB board with the circuit that is required for the hardware then i am getting error in output..
with the same circuit proteus also giving error on output
the circuit i am following is in the attached images
my code is as follows
C:
#include<reg51.h>
sbit a=P1^0;
int ar[]= {0x40,0xF9,0x24,0x30,0x19,0x12,0x02,0xF8,0x00,0x10}; // common anode segment
unsigned int i,j;
void main()
{
for(i=0;i<10;i++)
{
a=1; //to the common pin of segment
P2=ar[i]; // WHATS THIS POINTING TO....
for(j=0;j<50000;j++); // just for some delay
}
}
Attachments
Last edited: