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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/18/06 08:58
Modified:
  12/18/06 09:40

Read: times


 
#129666 - Thanks..
Responding to: ???'s previous message
Thansk Andy for your support, i'm going to explain better the problem.

This is the code:


// definition

#define Sfr(x, y) sfr x = y

Sfr (SBUF , 0x99);

#define SetUARTMode1 SCON = 0x50; /* uart in mode 1 (8 bit), REN=1 */

#define Set9600BaudT1 {TH1 = 0xFA; TL1 = 0xFA;} /* 9600 Bds at 22.118MHz */

// enable interrupt....
//// in my interrupt serial routine

lastCharOnRx = SBUF;


With my emulator (Phyton PICE 51) i break on this last line.
If from the pc I send byte from 0x00 to 0x79, on my breakpoint i see the correct byte sended.
If i send, from the pc, for example 0x80, on my emulator i see 0x00.
If i send C2, i see B4....


I tried to typedef sfr as a unsigned char


What made you think that this would help?



I don't know if it is the right think... :(


What is RC51?


It Is compiler distributed in the Raisonance kit.

Thanks


List of 10 messages in thread
TopicAuthorDate
8051 + RC51Compiler -> sfr unsigned char redefenit            01/01/70 00:00      
   First things first            01/01/70 00:00      
      Thanks..            01/01/70 00:00      
         One step at a time...            01/01/70 00:00      
            uhmmmm            01/01/70 00:00      
   unsigned is the default type for char            01/01/70 00:00      
      Aside: bad practice            01/01/70 00:00      
         Maybe...            01/01/70 00:00      
            Aha!            01/01/70 00:00      
               Thanks            01/01/70 00:00      

Back to Subject List