??? 10/20/10 18:31 Read: times |
#179214 - Reduce problem into smaller problems Responding to: ???'s previous message |
How long delays? Long as in a significant number of clock cycles?
If the Keil simulator does run the application, then the application should most probably run on the live hardware too. It's just that the Keil simulator shows the simulated result of I/O ports - the real hardware cares about actual voltages and currents. A normal way to solve problems is to reduce them into smaller ones. Make two programs. One program holds the pins high. One program holds the pins low. What does happen with the pins, if you measure with a volt meter? If the pin has just a weak internal pull-up, it will not be able to get near VCC because of the load from LED+resistor to ground. If the pin is in push-pull mode and held high, it should do a pretty good job of keeping that signal high, and your LED should get the required current to be lit - unless you selected a significantly incorrect value for the series resistor. Don't want to do two applications? So create an application that holds some pins high and some low - after all, your board seems to have 8 LED connected to the port. Just remember that most processors have one figure for max current output from a single pin, and another figure for max current in total from all 8 pins. So if you have 8 LEDs connected - make sure that the processor can handle all eight, or make sure the test program doesn't drive more LEDs than what the datasheet allows. |