Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/04/09 18:13
Read: times


 
#169397 - I take it that you are programming for the first time..
Responding to: ???'s previous message
Actually I've done a lot of programming in both assembly and C,but only theoretically. So when I connected the board and burned a simple program, I was quite surprised to see my see the LED blinking continually. And yes, the same issue arises when I program in Assembly.

Thanks for the link.That solves a lot of my doubts.

1)I now understand that the program goes into an automatic endless loop after my main function ends.Am I correct?

2)The tutorial does say how to break the endless loop in the "hello world " program:
"Stop Running HELLO with the Halt command from the Debug menu or the toolbar. You may also type ESC in the Command page of the Output window."

3) But in hardware, what do I do?
Do I insert a breakpoint in the program. If so, do I insert a breakpoint at main()?

4) Also, If I'm writing a more complicated code,say calling a delay function for making my LED's blink , in that case how do I stop my program after one loop?

List of 13 messages in thread
TopicAuthorDate
A doubt about programming the P89v51RD2.            01/01/70 00:00      
   I'm programming in C for the first time            01/01/70 00:00      
      I take it that you are programming for the first time..            01/01/70 00:00      
         FAQ            01/01/70 00:00      
            Another Problem!            01/01/70 00:00      
               Large number            01/01/70 00:00      
                  How to post legible source code            01/01/70 00:00      
               Delay loops in 'C'...            01/01/70 00:00      
                  Thank you.            01/01/70 00:00      
                     Did you not notice?            01/01/70 00:00      
                        I did notice the indentation.            01/01/70 00:00      
                           skim through the FAQ's (edited)            01/01/70 00:00      
   what your (missing) comments state            01/01/70 00:00      

Back to Subject List