Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] using 2 UART for 8051

Status
Not open for further replies.

88sanz

Newbie level 5
Joined
Sep 24, 2010
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,368
I'm using C8051F120 microcontroller from SiliconLab for my project. It allows usage of both UART0 and UART1.
I implemented the usage of both UART0 & UART1 in my program via interrupts. UART0 connects to hyperterminal and UART1 to another device.
However, both UART0 and UART1 shares the same memory address for their data buffer(i.e. SBUF0 and SBUF1). I was wondering in the situation when UART0 and UART1 raise interrupt simultaneously, UART0(higher priority) interrupt will be carried out first. What will happen to the data that was input into UART1?
 

There is not possible separate into 2 buffers ?
The flow you presented maybe will get problem.

+++
 

SBUF0 is located at address 0x99 in SFR page 0 and SBUF1 is located at address 0x99 in SFR page 1, therefore it is not the same memory address.
 
  • Like
Reactions: 88sanz

    88sanz

    Points: 2
    Helpful Answer Positive Rating
Thanks for all the help given. My bad for mistaking both having the same memory address.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top