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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Andy Neil
08/24/05 10:52
  08/24/05 10:57

Read: 488 times

#100016 - Pointless
Responding to: Vignesh Prasad's previous message
Vignesh Prasad said:
Dear Andy, I have stripped off the remaining portions and have put the simplified version of my serial handling routine and corresponding screen shot of Keil C51 simulator.

The code you are simulating is not the same as the code you are running on your target!

In particular, you have added clearing RI in your serial ISR...!

If you run this modified code on your target, does it work?

The combuf[..] array doesnt get stored by the values of SBUF..

It does when I simulate it!

I think you are missing the fact that SBUF is actually two completeley independent buffers:
Writing to SBUF loads the the UART's transmitter;
Reading from SBUF reads the UART's receiver.

Don't bother messing with SBUF - just open the Serial Window in the simulator and watch the characters appear in the combuf[] array as you type in the Serial Window. They do get into combuf[], and the first one does go into combuf[0]

And if you type more than 5 characters, the values in combuf[] do get overwritten!
And if you type more than 10 characters, they get overwritten again!
And if you type more than 15 characters, ... well, you get the idea?

List of 18 messages in thread
More encounters with Keil C51      Vignesh Prasad      08/23/05 23:28      
   Simulate it!      Andy Neil      08/24/05 03:30      
      It is not an homework      Vignesh Prasad      08/24/05 06:07      
         Proving nothing.      Andy Neil      08/24/05 07:01      
         LCD      Andy Neil      08/24/05 07:10      
      Simulation Results      Vignesh Prasad      08/24/05 08:32      
         Pointless      Andy Neil      08/24/05 10:52      
            Got it !!      Vignesh Prasad      08/24/05 13:02      
            update      Andy Neil      08/26/05 05:43      
   do you set SCON as a byte or bitwise ?      Erik Malund      08/24/05 06:37      
   not an answer, but why do you call a fun      Erik Malund      08/24/05 07:18      
      I don't C      Jan Waclawek      08/24/05 08:06      
         inline      Andy Neil      08/24/05 08:26      
            Compiler Tries      Abhishek Singh      08/25/05 21:59      
            OT: inline, Keil ARM      Andy Neil      09/06/05 07:18      
               C99 does specify inline as a keyword.      Maarten Brock      09/06/05 10:38      
   Review index boundary value      Tsuneo Chinzei      08/26/05 02:31      
      Even More Pointless simulation!      Andy Neil      08/26/05 05:40      

Back to Subject List