
You have to perform shifting operations in a loop. However, performing a 16-bit division on an 8-bit CPU is by far not as simple as a DIV instruction!

You might perform a 16-bit division (divide a 16-bit value by 100).

So the first digit is "1" and the other two digits are off. What your program is doing is: It writes some value (for example 6 to produce the digit "1") to P0 and switches P1.0 on and P1.1 and P1.2 off. If P1.0 is off and P1.1 and P1.2 are on (and P0 still has the value 6), _11 is shown. If P1.0 and P1.2 are on and P1.1 is off, the first and the last segment are active and the middle segment is inactive (so 1_1 is shown). If port P0 has the value 6, the digit "1" is shown. The pins P1.0 to P1.2 specify which 7-segment digit is switched on and the pins P0.0 to P0.6 specify which digit is shown on the corresponding segments. It seems that you haven't fully understood how your circuit works: So is there anyway i can send data above 255 or 8 bit to the i/o port and to led display ORG 000H But i cant send data above 255(FFH) to the I/O ports. I am trying to make four common annode 7 segment led display which can count up to 9999 using at89c52 MC. What I mean by this is that I can have my sketch run with all digits full brightness displaying 8s no problem, but if anywhere in the loop I have a variable that I increment up (say by incrementing up 1 per loop), and change nothing else, the display will go from 100% brightness, to 20% (at best).I am new to assembly language programming. Getting the right segments on has been a breeze, but I'm finding that if I have any kind of counting logic, the displays dim to about 20%. I've the wired my duemilanove with the a-dp pins on the 13-6, and the transistors on 5-2. I didn't have any multiplexers left but have instead wired it up as per this diagram: I've got project that needed to have some (4) digits display, and had plenty of 7 seg.
