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

2nd UART on at89c51re2

Hello!

I have problem with configuration of UART_1 on at89c51re2 micro controller I supposed that is because I am using a at89c51xd2.h header file which does not include definition for UART_1. When I try to define
Sbit (ES1 , 0xB1, 3);
in IEN1 (0xB1) register i receive error message error C142: 'SFR': invalid base address.

Any help?

Thanks in advance

Parents
  • When I try to define
    Sbit (ES1 , 0xB1, 3);
    in IEN1 (0xB1) register i receive error message error C142: 'SFR': invalid base address.

    You'll have to excuse Erik, he prefers to answer a question he thinks he knows the answer to rather than the one you actually asked.

    If I remember correctly only registers whose address is divisible by 8 are bit addressable, so you will have to read and wtite that register as an 8 bit entity.

Reply
  • When I try to define
    Sbit (ES1 , 0xB1, 3);
    in IEN1 (0xB1) register i receive error message error C142: 'SFR': invalid base address.

    You'll have to excuse Erik, he prefers to answer a question he thinks he knows the answer to rather than the one you actually asked.

    If I remember correctly only registers whose address is divisible by 8 are bit addressable, so you will have to read and wtite that register as an 8 bit entity.

Children