Does any body knows,how should i display some digit on seven segment? for example by pressing a push bottom which is connected to "p1.18" port of "lpc2124", digit "1" appears on the seven segment,or by pressing a push bottom connected to "p1.16",digit "2" appers on seven segment.
Separate the problem into sub-problems.
1) Decide what stimuli to use to select digit. Maybe 10 processor pins - one for each digit. But then you have to decide what to do if multiple pins are activated. Or maybe four processor pins detecting a binary combination. But then you need to decide what you should do if combination 10..15 are selected. Or maybe connect a potentiometer to an ADC and measure the turn angle.
2) Figure out what type of display you want to use. Common-anode or common-cathode determines how you drive them. Should you short a pin to ground to light one segment? More processors are good at sinking current than sourcing current. Next thing - can the processor handle all 7 segments concurrently without overload? Using a digit module or using 7 or more discrete LED?
3) Test the software modules individually.
4) Modify the code by having the input from the input select the action for the driver module.
Well, if you look around you at the number of 7-segment displays that exist in the world today, I think it must be quite obvious that there are, indeed, people who know that. Probably quite a large number of people.
homepages.tesco.net/.../questions-with-yes-or-no-answers.html
Are you asking about the basic electronics of how LEDs work, and how to control them? www.kpsec.freeuk.com/trancirc.htm www.kpsec.freeuk.com/.../led.htm
Or how, specifically, to use the ports of an NXP lpc2124 to control LEDs? www.nxp.com/.../LPC2114_2124.html
Or what??
Note that none of this has anything to do with Keil!
www.8052.com/.../117340
www.8052.com/.../117348
The illustrations of "common anode" and "common cathode" in that last link are broken; see this one instead: www.rlocman.ru/.../~athsam-Circuits-SG_Clock-SG_clock_display_conn.gif
And, of course, for specific information about the lpc2124 and 7-Segments, see: www.lmgtfy.com