Page 619 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 619
*/
void LCD_set (char c[10][10], char c2[10][10]);
void extLCD (int lin, char * c);
void GLCD_Test(void);
#endif /*_GLCD_H*/
GLCD.c
#include "stm32f10x.h"
#include "GLCD.h"
#include "font.h"
unsigned int text;
unsigned int back;
unsigned short DeviceCode;
void GLCD_init (void)
{
/* Enable clock for GPIOA,B,C,D,E AFIO and SPI3. */
RCC->APB2ENR |= 0x0000007D;
/* NCS is PB2, GPIO output set to high. */
GPIOE->CRL = 0x33333333; //
GPIOE->CRH = 0x33333333;
GPIOD->CRH &= 0x0000ffff; //PD12,PD13,14,15
GPIOD->CRH |= 0x33330000;
GPIOD->BSRR = 0x0000F000; //cs,rs,wr,rd = 1;
delay(2); /* Delay 50 ms */
DeviceCode = rd_reg(0x00);
if(DeviceCode == 0x9320)
- 612 -