??? 08/23/11 13:46 Read: times |
#183436 - C8051F120 SPI0 and UART1 |
Hi there,
as new user "hello to all" :) After some interesting threads with a lot of problem solving (for me) I'm having a challenge with a written C-File for using the UART1 combined with SPI0. Here is a snippet: ----------------------------- void PORT_Init (void) { char SFRPAGE_SAVE = SFRPAGE; // Save Current SFR page SFRPAGE = CONFIG_PAGE; // set SFR page XBR0 = 0x00; //all off (default) //XBR0 = 0x02; //Activate SPI0 XBR2 = 0xC4; // Enable crossbar and weak pull-up // Enable UART1 P0MDOUT |= 0x35; // Set TX1 pin to push-pull P1MDOUT |= 0x40; // Set P1.6(LED) to push-pull SFRPAGE = SFRPAGE_SAVE; // Restore SFR page } ----------------------------- This one works perfect and I can read out data on COM1 terminal. If I change XBR0 to 0x02 the terminal-window is only blank. I checked the EEPROM, it received data via SPI0 but UART1 isn't working anymore. Could anyone give me a hint why UART1 isn't working with activated SPI0 please? Background: I want to store ADC data (with max. f_clock) within EEPROM (via SPI0) and read it back (terminal) after measurement. BR, Reinhard |
Topic | Author | Date |
C8051F120 SPI0 and UART1 | 01/01/70 00:00 | |
priority crossbar | 01/01/70 00:00 | |
Caution on Using SiLabs Parts | 01/01/70 00:00 | |
Hurtful choice | 01/01/70 00:00 | |
the story | 01/01/70 00:00 | |
Best is normally in the middle | 01/01/70 00:00 | |
TY | 01/01/70 00:00 | |
I meant port pins | 01/01/70 00:00 | |
The Skip Registers | 01/01/70 00:00 |