This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nid help on LED blinking

i have problem with the led blinking. I using the exmaple program given by keil using uVision3. When i run the program, the LED on the development board didnt blink, it just stay on! wat should i do?

thanks!

Parents
  • "So is there any hexa code for port 1 or 2 [...]"

    I somehow get the impression that the language fools you. This is not similar to a "cheat code" or "access code" that you get from someone and that allows you to activate a new feature.

    Hexadecimal numbers are just a different way of writing a number. No need to use hexadecimal numbers. An 8-bit port can handle a number between 0 and 255 (8 bits represents 2^8 = 256 states).

    You must know what you have connected to different pins of a port. Then you must calculate what number to write to the port to tell if a pin is input or output. And you must calculate what pins to drive high or low. And you must calculate what pins you are interested in when reading a port.

    Note that your processor pins may not require any special setting to change the individual pins between input or output. But your datasheet will tell you.

    And you have still not told what your PCW is?

Reply
  • "So is there any hexa code for port 1 or 2 [...]"

    I somehow get the impression that the language fools you. This is not similar to a "cheat code" or "access code" that you get from someone and that allows you to activate a new feature.

    Hexadecimal numbers are just a different way of writing a number. No need to use hexadecimal numbers. An 8-bit port can handle a number between 0 and 255 (8 bits represents 2^8 = 256 states).

    You must know what you have connected to different pins of a port. Then you must calculate what number to write to the port to tell if a pin is input or output. And you must calculate what pins to drive high or low. And you must calculate what pins you are interested in when reading a port.

    Note that your processor pins may not require any special setting to change the individual pins between input or output. But your datasheet will tell you.

    And you have still not told what your PCW is?

Children