Discussion in "Project Doubts" started by    circol    Aug 23, 2007.
Thu Aug 23 2007, 03:42 pm
#1
I attached my schematics and codings
Thu Aug 23 2007, 03:52 pm
#2
i cant see the attached schematic :S try using www.imageshack.us
get the direct link to image and post it here in [ img ] and [ /img ] tags
*remove spaces!! from the tags.
Thu Aug 23 2007, 04:15 pm
#3
http://img120.imageshack.us/img120/6200/schematicslo5.jpg

and my coding is

#include<REG51.H>

sbit UD = P3^2;
sbit TD = P3^3;

unsigned int count = 0x00, FMS = 0x00, units, tens;


void display(void);

void main(void)
{

unsigned int a[10]={0x7E,0x30,0x6D,0x79,0x33,0x5B,0x5F,0x70,0x7F,0x7B};

TMOD = 0x01;TF0 =0; TR0 = 0;
IE = 0x82;
count = 30;

while(count != 0){
count--;
display();
TL0 = 0xFD; TH0 = 0x4B;
TR0 = 1;
while(FMS<20);
TR0 = 0;
TF0 = 0;
FMS = 0x00;
}

}

void display(void)
{
units = count/10;
tens = count%10;
UD=1; TD=0;
P1=a[units];
UD=0; TD=1;
P1=a[tens];
}

void Timer0(void)interrupt 1{

TR0=0;
TL0= 0xFD;TH0= 0x4B;
FMS++;
TR0=1;
}

Thu Aug 23 2007, 04:18 pm
#4
lookup table was missed

unsigned int a[10]={0x7E,0x30,0x6D,0x79,0x33,0x5B,0x5F,0x70,0x7F,0x7B};
Thu Aug 23 2007, 04:20 pm
#5
Oooh again :mad I hope this it will be visible :blush

0x7E,0x30,0x6D,0x79,0x33,0x5B,0x5F,0x70,0x7F,0x7B
Thu Aug 23 2007, 05:00 pm
#6
you are trying to source the current this always cause a problem i know.. try removing Rb 10K SIP and check if the value of Ra is correct.. i mean.. is it enough to drive the transistor properly and source the current..
Thu Aug 23 2007, 05:37 pm
#7
No,I removed the microcontroller from the IC base and I given the 5V to the port 1 pins. And 5V is also given to the P3.2 and P3.3 but one pin at a time. I'm getting the display.

And one more thing if I palce the mc the voltage across the Port 1 pins for logic high is about 0.9V.
I know this is mc current driving capability issue but I don't know how to fix it
Thu Aug 23 2007, 05:52 pm
#8
you should have chosen common anode.. coz its easy for micros to sink the current rather source... try connecting pull ups at port pin that might help you..
Sat Aug 25 2007, 11:50 am
#9
Ya it's working now. Thanks for your help.
Sat Aug 25 2007, 11:50 am
#10
Ya it's working now. Thanks for your help.
:-)

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am
ktaletrryp
Fri Apr 26 2024, 10:55 pm
Robertrip
Fri Apr 26 2024, 11:20 am