color_sensor_code
- 최초 등록일
- 2021.12.05
- 최종 저작일
- 2021.11
- 12페이지/ 한컴오피스
- 가격 15,000원
* 본 문서(hwp)가 작성된 한글 프로그램 버전보다 낮은 한글 프로그램에서 열람할 경우 문서가 올바르게 표시되지 않을 수 있습니다.
이 경우에는 최신패치가 되어 있는 2010 이상 버전이나 한글뷰어에서 확인해 주시기 바랍니다.
소개글
"color_sensor_code"에 대한 내용입니다.
목차
없음
본문내용
//헤더파일
#include "TExaS.h"
#include "..//..//tm4c123gh6pm.h"
#define UNLOCK 0x4C4F434B
#define ST_ENABLE 0x00000001
#define ST_INT_EN 0x00000002
#define ST_CLK_SRC 0x00000004
#define ST_COUNT 0x00010000
//개별 Output 핀 설정
//PD 3-0// D3:S3, D2:S2, D1:S1, D0:S0
#define PD3 (*((volatile unsigned long *)0x40007020))
#define PD2 (*((volatile unsigned long *)0x40007010))
#define PD1 (*((volatile unsigned long *)0x40007008))
#define PD0 (*((volatile unsigned long *)0x40007004))
//PF 1// Out
#define PF1 (*((volatile unsigned long *)0x40025008))
//PC 7-4// C7:None, C6:Blue, C5:Green, C4:Red
#define PC7 (*((volatile unsigned long *)0x40006200))
#define PC6 (*((volatile unsigned long *)0x40006100))
#define PC5 (*((volatile unsigned long *)0x40006080))
#define PC4 (*((volatile unsigned long *)0x40006040))
//Grobal Variables
unsigned long delay = 0;
unsigned int counter = 0;
unsigned int countR = 0, countG = 0, countB = 0;
unsigned int flag = 0;
unsigned long is_measuredRed = 0;
unsigned long is_measuredGreen = 0;
unsigned long is_measuredBlue = 0;
//this is for Debugging
unsigned long check = 0;
unsigned long PD6_ON = 0;
참고 자료
없음