2009-12-11 05:11 AM
2011-05-17 02:52 AM
Hi All,
I am using the uPSD3254BV-24U6. I am able to get UART1 working fine. And trying to setup UART2 to work like the UART1. When I make the changes to the SCON2 in the UPSD.h file and try to complie it using Keil, I got the following errors messages: E:\COMMUN\KEILV70\C51\INC\ST\UPSD.H(264): error C146: 'SCON2': invalid base address Here is what I have in the UPSD.h file: // --- UART2 SFRS ---- sfr SCON2 = 0x9A; // UART2 Serial Control sfr SBUF2 = 0x9B; // UART2 Serial Buffer : : /* SCON 2 */ sbit SM02 = SCON2^7; sbit SM12 = SCON2^6; sbit SM22 = SCON2^5; sbit REN2 = SCON2^4; sbit TB82 = SCON2^3; sbit RB82 = SCON2^2; sbit TI2 = SCON2^1; sbit RI2 = SCON2^0; Any idea what I did wrong? From looking at the datasheet, the Sfr address is correct. Best Regards.2011-05-17 02:52 AM