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

S0OUT does not behave as expected

I am debugging an application using the simulator from uVision3 and the
serial Window #1. My target hardware is a 80c166, and the assignation of
VTREGs to serial output is the following:

ASSIGN
  WIN: <S0IN >S0OUT
  WIN2: <S1IN >S1OUT
  COM1: <NUL >NUL
  COM2: <NUL >NUL
  COM3: <NUL >NUL
  COM4: <NUL >NUL
I can enter serial data (i.e. indirectly write to S0RBUF) either by
typing characters to the serial window #1 or by writing to S0IN from the
command window. That works fine.

The problem I have got is when reading data from S0TBUF, since the
contents of S0OUT do not seem to match those in S0TBUF. I am
using the following function from a Keil application note in order to
visualise on the serial window what is being sent:
signal void s0out_sig (void)
{
  while (1)
  {
    wwatch(S0OUT);     /* wait for something in S0OUT */
    printf ("Transmitted a %2.2X\n", (unsigned) S0OUT);
  }
}
However, it seems that even though my application is transmitting data
correctly, S0OUT is 0 all the time, so the printf function is never
invoked and there is nothing to be printed to the serial window.

I will appreciate any comments. Thanks.