Hi !!
My clock freq is 4Mhz.
How do u set the display switching frequency greater than 100Hz as mentioned above??
Now,using my code(with all number functions defined,the long way) I tested in my MAIN section the following:
void main()
{
DDRB = 0b00000011;//PORT B bit 0 and 1 Output
DDRD = 0xFF;//PORT D Output
TRANS1 = 0;//Transistor 1 ON
TRANS2 = 1;//Transistor 2 is OFF since if its ON,it will display the SAME number
number9();//Display number 9
delay_ms(100);// Delay of 100ms,I have played around this delay time a lot to get multiplexing but no success(right from 1ms to 500ms)
TRANS1 = 1;// Turn Transistor 1 OFF
//Repeating for displaying number 8 on the second display
TRANS2 = 0;
number8();
delay_ms(500);
TRANS2=1;
//Repeat till 97,96,95....
}
While I had success with this,its not whats desired since only one segment display is turned on at one time,so I get 9 then 8,9 then 7,so on.
Not both at the same time which is what multiplexing is.It's not got to do with the delay time I think. The transistor works only as a switch.Since if u look at my schematic,one segment is connected to the other so whichever number function I call,it will light up depending which transistor is ON.
Thanks!