Problem beim Ansteuern von LED

OP #2264258
Lesenswert?

Guten Tag,

versuche gerade auf einem Entwicklerboard zuersteinmal die LED 
anzusprechen. Selbst das gelingt nicht.

Quellcode:


//---------------------------------------------------------------------- 
-------
// Includes
//---------------------------------------------------------------------- 
-------

#include <compiler_defs.h>
#include <C8051F930_defs.h>            // SFR declarations


//---------------------------------------------------------------------- 
-------
// Global Constants
//---------------------------------------------------------------------- 
-------

#define  LED_ON             0
#define  LED_OFF            1

//SBIT (LED, SFR_P2, 6);                 // LED==LED_ON means ON
sbit LED = SFR_P2^6;


void PORT_Init (void)
{
   P2MDIN |= 0x40;                     // P2.6 is digital
   P2MDOUT |= 0x40;                    //P2.6 is push-pull
}

void main(void){

  PCA0MD &= ~0x40;
  PORT_Init();

  LED = LED_ON;
  while(1){

    }

}

LED ist an Pin 2.6 Jumper sollte richtig gestellt sein.

Hoffe jemand kann mir da weiterhelfen.

Danke euch.

Gruß mike

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren