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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/10/08 08:11
Read: times


 
#160812 - Solved - I guess
Responding to: ???'s previous message
1. As I said, we were using non-polling method before, and we wanted to use standard C functions for serial port only for menu since polling is fine for the menu. We don't do anything else while the menu is displayed for the configuration. Since the menu part is quite extensive for byte by byte handling of ISR (Guess experienced programmers must be using ISR equivalent of printf), we thought it wise to go for polling.

2. Map file of programs using printf, seemed to be having putchar calls. So I assumed that printf must be calling a putchar function (non-modifiable library), equivalent to the sample putchar function that Keil gives. I understand from your clarifications that it is indeed not the case. But then I not clear as to what putchar Keil is calling.

3. The program works even if UART interrupts are enabled if structure is shifted by force. But as you said, it shouldn't be working, since it would be simply waiting for interrupt. But then it was working! In fact, we continued with normal coding after shifting one structure to 03H !! Before that, it was normally declared so that Keil could place it where it wanted. But after moving it to 03H, the code was actually working, and I connected the whole issue to stack. But then as you said, it shouldn't be working.

4. Now, after your comments, we disabled the Interrupts and TI=1 line, and removed the 03H forcing of structure start address. It did not work. But with TI=1, UART interrupts disabled and with structure placed as per Keil, printf works fine. And this, I guess, must be the way that I should deal with it. Please comment...

5. I took time to reply since we internet Wimax connection wasn't working. our ISP (TATA) generally takes ages to rectify issues. It isn't working even now, and I got myself another connection from a different ISP.

Thank you all for the kind comments. Appreciate the help.

List of 21 messages in thread
TopicAuthorDate
Program hangs at one point - 8051F340            01/01/70 00:00      
   Assembly window            01/01/70 00:00      
   hyper terminal interface            01/01/70 00:00      
      Stack size?            01/01/70 00:00      
         Stack size            01/01/70 00:00      
            Stack Management            01/01/70 00:00      
   Watchdog            01/01/70 00:00      
      stack and preview..            01/01/70 00:00      
         Limited stack            01/01/70 00:00      
      Where is the UART ISR?            01/01/70 00:00      
         ISR for UART            01/01/70 00:00      
            ISR for UART?            01/01/70 00:00      
               why "TI0=1;" is required            01/01/70 00:00      
            No, it isn't            01/01/70 00:00      
               Solved - I guess            01/01/70 00:00      
                  'polling' is NOT "standard C"            01/01/70 00:00      
                     You are right Erik..            01/01/70 00:00      
      Thought I will thank you individually..            01/01/70 00:00      
   Disable watchdog            01/01/70 00:00      
      and in Keil it is:            01/01/70 00:00      
         Status : WDT disabling in the status worked            01/01/70 00:00      

Back to Subject List