Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
08/23/11 07:46
Read: 965 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.


List of 9 messages in thread
C8051F120 SPI0 and UART1      Reinhard Plautz      08/23/11 07:46      
   priority crossbar      Maarten Brock      08/23/11 08:14      
      Caution on Using SiLabs Parts        Michael Karas      08/23/11 09:23      
         Hurtful choice      Per Westermark      08/23/11 14:12      
            the story      Erik Malund      08/23/11 16:39      
               Best is normally in the middle      Per Westermark      08/23/11 20:03      
                  TY      Reinhard Plautz      08/23/11 22:04      
         I meant port pins      Maarten Brock      08/24/11 07:43      
            The Skip Registers      Michael Karas      08/24/11 08:20      

Back to Subject List