본문 바로가기

[TI]/LM3S8962

[LM3S8962 EVM] 확장보드 제어 관련자료

[LM3S8962 EVM] 확장보드 제어 관련자료

확장 보드 <-> LM3S8962  핀맵
myMCU-EXP  LM3S8962 EVM
 

 

LED1 -> PWM2 -> PE0
SWITCH1 -> INT0 -> PC4
BUZZER ->PWM3 -> PG1


LM3S8962 EVM ->확장보드 : LED, Buzzer, Switch 회로도





/-----------------------------------------------------------------------------
//Switch Driver
#define SW1_BIT       BIT0
#define SW1_PORT      GPIO_PORTG_DATA_R
#define Sw1Init()      SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG);\
          GPIOPinTypeGPIOInput(GPIO_PORTG_BASE, SW1_BIT)

#define GetSw1()      !(SW1_PORT&SW1_BIT)
#define WaitForSw1()     while(GetSw1())

//-----------------------------------------------------------------------------
//Buzzer Driver
#define BUZZER_BIT      BIT1
#define BUZZER_PORT      GPIO_PORTG_DATA_R
#define BUZZER_OFF()     Sbi(BUZZER_PORT, BUZZER_BIT)
#define BUZZER_ON()      Cbi(BUZZER_PORT, BUZZER_BIT)
#define BUZZER_Init()     SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG);\
          GPIOPinTypeGPIOOutput(GPIO_PORTG_BASE, BUZZER_BIT)



반응형