목차
1. LED 점등
2. 비트밴딩
3. 3색LED
4. 세크먼트
5. key
2. 비트밴딩
3. 3색LED
4. 세크먼트
5. key
본문내용
g*)0x40011014) |= 0x67;
delay_int_count(500000);
(*(volatile unsigned long*)0x40011010) |= 0xff;
(*(volatile unsigned long*)0x40011014) |= 0xFF;
delay_int_count(500000);
(*(volatile unsigned long*)0x40011010) |= 0xff;
(*(volatile unsigned long*)0x40011014) |= 0xE7;
delay_int_count(500000);
}
}
5. key
/*
* Key_led_test:wkup-Green;userkey-Red
*/
static void delay_int_count(volatile unsigned int nTime)
{
for(; nTime > 0; nTime--);
}
int main(void)
{
(*(volatile unsigned*)0x40021018) |= 0x8; //GPIOB CLOCK ENABLE led 클럭
(*(volatile unsigned*)0x40021018) |= 0x4; //GPIOA CLOCK ENABLE key 클럭
(*(volatile unsigned*)0x40010c04) &= 0xffffff00; //GPIOB_pin9,8 초기화
(*(volatile unsigned*)0x40010c04) |= 0x11; //GPIOB_pin9,8 mode 설정
(*(volatile unsigned*)0x40010c00) &= 0xff0fffff; //GPIOB_pin5 초기화
(*(volatile unsigned*)0x40010c00) |= 0x100000; //GPIOB_pin5 mode 설정
(*(volatile unsigned*)0x40010800) &= 0xffffff00; //GPIOA_pin1,0 초기화
(*(volatile unsigned*)0x40010800) |= 0x44; //GPIOA_pin1,0 mode 설정
while(1)
{
(*(volatile unsigned*)0x40010c14) |= 0x20;
delay_int_count(50000);
(*(volatile unsigned*)0x40010c10) |= 0x20;
delay_int_count(50000);
if( ( (*(volatile unsigned*)0x40010808) & 0x1 )== 0x1 ) //GPIOA_pin0 check
{
(*(volatile unsigned*)0x40010c14) |= 0x100;
}
else
{
(*(volatile unsigned*)0x40010c10) |= 0x100;
}
if( ((*(volatile unsigned*)0x40010808) & 0x2 )== 0x2 ) //GPIOA_pin1 check
{
(*(volatile unsigned*)0x40010c14) |= 0x200;
}
else
{
(*(volatile unsigned*)0x40010c10) |= 0x200;
}
}
}
delay_int_count(500000);
(*(volatile unsigned long*)0x40011010) |= 0xff;
(*(volatile unsigned long*)0x40011014) |= 0xFF;
delay_int_count(500000);
(*(volatile unsigned long*)0x40011010) |= 0xff;
(*(volatile unsigned long*)0x40011014) |= 0xE7;
delay_int_count(500000);
}
}
5. key
/*
* Key_led_test:wkup-Green;userkey-Red
*/
static void delay_int_count(volatile unsigned int nTime)
{
for(; nTime > 0; nTime--);
}
int main(void)
{
(*(volatile unsigned*)0x40021018) |= 0x8; //GPIOB CLOCK ENABLE led 클럭
(*(volatile unsigned*)0x40021018) |= 0x4; //GPIOA CLOCK ENABLE key 클럭
(*(volatile unsigned*)0x40010c04) &= 0xffffff00; //GPIOB_pin9,8 초기화
(*(volatile unsigned*)0x40010c04) |= 0x11; //GPIOB_pin9,8 mode 설정
(*(volatile unsigned*)0x40010c00) &= 0xff0fffff; //GPIOB_pin5 초기화
(*(volatile unsigned*)0x40010c00) |= 0x100000; //GPIOB_pin5 mode 설정
(*(volatile unsigned*)0x40010800) &= 0xffffff00; //GPIOA_pin1,0 초기화
(*(volatile unsigned*)0x40010800) |= 0x44; //GPIOA_pin1,0 mode 설정
while(1)
{
(*(volatile unsigned*)0x40010c14) |= 0x20;
delay_int_count(50000);
(*(volatile unsigned*)0x40010c10) |= 0x20;
delay_int_count(50000);
if( ( (*(volatile unsigned*)0x40010808) & 0x1 )== 0x1 ) //GPIOA_pin0 check
{
(*(volatile unsigned*)0x40010c14) |= 0x100;
}
else
{
(*(volatile unsigned*)0x40010c10) |= 0x100;
}
if( ((*(volatile unsigned*)0x40010808) & 0x2 )== 0x2 ) //GPIOA_pin1 check
{
(*(volatile unsigned*)0x40010c14) |= 0x200;
}
else
{
(*(volatile unsigned*)0x40010c10) |= 0x200;
}
}
}
키워드
추천자료
아동복지레포트 (아동학대의 개념, 현황, 법, 사례, 예방프로그램 등 상세히 정리)
EPANET 프로그램 레포트
마이크로프로세서 C프로그램 요약레포트
(A+ 레포트) 유아교육 - 레지오 에밀리아 프로그램
ocu 정책론 레포트- 내가 살고 있는 지역의 사회복지 프로그램
교정 복지 프로그램 개발 방법과 그 사례[A+ 추천 레포트★★★★★]
[★우수레포트★][디딤씨앗통장] 디딤 씨앗 통장 프로그램 (CDA) - 디딤씨앗통장의 목표, 대상,...
[★우수레포트★][지역사회복지실천의 기술] 지역사회사정의 개요, 지역사회복지실천의 욕구사...
[영어레포트/영어에세이/영어발표/영작] 예능 프로그램 트렌드에 관한 의견
(A+ 레포트,시험대비) [사회복지 프로그램 개발과 평가] 프로그램 개발의 이론적 모형
(A+ 레포트,시험대비) [사회복지 프로그램 개발과 평가] 프로그램 개발을 위한 의사결정 접근...
(A+ 레포트,시험대비) [사회복지 프로그램 개발과 평가] 사회복지와 프로그램2
(A+ 레포트, 프로포절) 노인복지 프로그램 기획
(A+ 레포트,시험대비) [유아교육개론] 유아교육 프로그램 평가의 이해
소개글