How do you expect us to help if you don't give us ANY information about your project? Where is the schematic? Where is the code? How do you have everything hooked up?
Dear Der
Thanks for reply please check the attached code
int sevenSegment[]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F};
void setup() {
DDRD = 0XFF;
pinMode(10,OUTPUT); // Controlled Seven Segment 1 Common Cathode
pinMode(11,OUTPUT); // Controlled Seven Segment 2 Common Cathode
pinMode(12,OUTPUT); // Controlled Seven Segment 3 Common Cathode
}
void loop() {
int voltage = analogRead(A0);
int temp_hundred = voltage / 100;
int rest_hundred = voltage % 100;
int hundred = sevenSegment[temp_hundred];
int temp_ten = rest_hundred / 10;
int rest_ten = rest_hundred % 10;
int ten = sevenSegment[temp_ten];
int temp_one = rest_ten / 1;
int one = sevenSegment[temp_one];
PORTD = one;
digitalWrite(10,LOW);
digitalWrite(11,HIGH);
digitalWrite(12,HIGH);
delay(5);
PORTD = ten;
digitalWrite(10,HIGH);
digitalWrite(11,LOW);
digitalWrite(12,HIGH);
delay(5);
PORTD = hundred;
digitalWrite(10,HIGH);
digitalWrite(11,HIGH);
digitalWrite(12,LOW);
delay(5);
}