Page 529 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 529
다. ARM(STM32F103VB)
ARM 프로세서는 라즈베리파이와 함께 이 작품에서 핵심적인 MCU의 역할을 하는 프로세서이
다. 주변기기(Peripherals)를 동작시키는 역할이 주된 목적이다. RFID 리더와 TFT LCD를 제어
하는 데 사용된다.
[GLCD.h]
LCD 관련 헤더파일이다. LCD 프로그램을 작성하기 편하도록 하는 매크로 함수들이 들어있다.
#ifndef _GLCD_H
#define _GLCD_H
#define CS_set GPIOD -> BSRR = 0x00001000
#define CS_reset GPIOD -> BRR =0x00001000
#define RS_set GPIOD -> BSRR = 0x00002000
#define RS_reset GPIOD -> BRR = 0x00002000
#define WR_set GPIOD -> BSRR = 0x00004000
#define WR_reset GPIOD -> BRR = 0x00004000
#define RD_set GPIOD -> BSRR = 0x00008000
#define RD_reset GPIOD -> BRR = 0x00008000
#define line0 0
#define line1 24
#define line2 48
#define line3 72
#define line4 96
#define line5 120
#define line6 144
#define line7 168
#define line8 192
#define line9 216
#define Black 0x0000 /* 0, 0, 0 */
#define Navy 0x000F /* 0, 0, 128 */
#define DarkGreen 0x03E0 /* 0, 128, 0 */
#define DarkCyan 0x03EF /* 0, 128, 128 */
#define Maroon 0x7800 /* 128, 0, 0 */
#define Purple 0x780F /* 128, 0, 128 */
#define Olive 0x7BE0 /* 128, 128, 0 */
- 522 -