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

when i burn the hex file its not working

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

Parents
  • What other "arbitrary" value? Note that 32000 is close to the limit for a signed integer.

    Next thing - repeating the port output 32000 times isn't the way to create a delay. You really should separate the delay functionality from turning on or off the port pins. Your code would greatly change blink frequency if you add some extra lines of code inside the for loops. Having a delay function giving 100ms delay would mean that extra code together with the "port on" or "port off" would make an extremely small change in blink frequency.

Reply
  • What other "arbitrary" value? Note that 32000 is close to the limit for a signed integer.

    Next thing - repeating the port output 32000 times isn't the way to create a delay. You really should separate the delay functionality from turning on or off the port pins. Your code would greatly change blink frequency if you add some extra lines of code inside the for loops. Having a delay function giving 100ms delay would mean that extra code together with the "port on" or "port off" would make an extremely small change in blink frequency.

Children