This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

some troubles with SiLabs c8051f041

Hi!
I have some troubles with SiLabs c8051f041. I try to start very simple program - flashing one led on gpio. I use Keil CA51 Compiler Kit. Program succesfully compilates without errors. Then I program my chip c8051f041 with BeeProg+ programmer. When programming is succesfully finished, I try to power ON my chip. And nothing happened... I don't understand what I am doing wrong?

Parents
  • It's my main.c:

    //-----------------------------------------------------------------------------
    // Includes
    //-----------------------------------------------------------------------------
    #include <c8051f040.h> // SFR declarations
    //-----------------------------------------------------------------------------
    // Function PROTOTYPES
    //-----------------------------------------------------------------------------
    void SYSCLK_IntOsc_Init (void);
    //-----------------------------------------------------------------------------
    // MAIN Routine
    //-----------------------------------------------------------------------------
    void main (void)
     {
     WDTCN = 0xde; // disable watchdog timer
     WDTCN = 0xad;
     // select Internal Oscillator how the system clock
     SYSCLK_IntOsc_Init ();
    XBR0=0;  //P0 pins is digital out puts
    P0MDOUT=0b10000000;  // P0.7 is push-pull output
    XBR1=0b10000000;  //SYSCLK routed to Port pin
    while (1)
    {
    P0 |=(1<<7);      //LED ON
    P0 &= ~(1<<7);  //LED OFF
    }
    }
    
    
    
    
    

Reply
  • It's my main.c:

    //-----------------------------------------------------------------------------
    // Includes
    //-----------------------------------------------------------------------------
    #include <c8051f040.h> // SFR declarations
    //-----------------------------------------------------------------------------
    // Function PROTOTYPES
    //-----------------------------------------------------------------------------
    void SYSCLK_IntOsc_Init (void);
    //-----------------------------------------------------------------------------
    // MAIN Routine
    //-----------------------------------------------------------------------------
    void main (void)
     {
     WDTCN = 0xde; // disable watchdog timer
     WDTCN = 0xad;
     // select Internal Oscillator how the system clock
     SYSCLK_IntOsc_Init ();
    XBR0=0;  //P0 pins is digital out puts
    P0MDOUT=0b10000000;  // P0.7 is push-pull output
    XBR1=0b10000000;  //SYSCLK routed to Port pin
    while (1)
    {
    P0 |=(1<<7);      //LED ON
    P0 &= ~(1<<7);  //LED OFF
    }
    }
    
    
    
    
    

Children