when i burnt the example hex file the hardware is working. but when the code i copied and compiled using keil uVision2 and converted to hex its not working what is the problem
Are you saying that you have totally failed to find that information by the use of Google?
Both the use of transistors, and the design of LED cubes, is well described on the net. And the big difference with Google is that it can link to pages that have images and diagrams - this forum only supports text.