FAQ

FAQ

How to print the value of SFR when SFR and SBUF are on the different SFR pages?  Issue Date:2020-04-13

The recommended solution is to move SFRs to XRAM. Then the SFR page should be set to the UART page to print the value of SFR.

The following is demonstration of printing the value of PWM0C1H on ML51EB9AE. Make sure you are on the correct SFR page for the ML51EB9AE when accessing SFRs.

Because SBUF and PWM0C1H are not on the same SFR pages, user must move PWM0C1H to XRAM. Then the SFR page should be set to the UART page to direct the operation to UART0. The sample code is shown below.

277-1

Products: Microcontrollers ,8bit 8051 MCUs
Applications:
Function:
This website uses cookies to ensure you get the best experience on our website. Learn more
OK