본제품은 LCD 드라이버 칩인 HT1621가 내장되어 있어 PIC, AVR, C51, STM32등의 MPU로
I/O방식 3-wire인터페이스로 손쉽게 세그먼트 LCD를 제어 할 수 있습니다.
#define cs PBout(10)
#define wr PBout(9)
#define dat PBout(8)
#define led PDout(2)
#define BIAS 0x29
#define SYSEN 0x01
#define LCDOFF 0x02
#define LCDON 0x03
#define RC256 0x18
int main(void)
{
uchar a[5];
a[0]=0xff; a[1]=0xff; a[2]=0xff; a[3]=0xff; a[4]=0xff; a[5]=0xff;
/**********************************************/
// dp c b a--d e g f
// 0 0 0 0--0 0 0 0
/**********************************************/
Stm32_Clock_Init(9); //
delay_init(72); //
LED_Init(); // LED 포트 초기화
init_port(); //
//SendCmd(RC256); // RC
SendCmd(BIAS); // 바이어스 설정
SendCmd(SYSEN); //
SendCmd(LCDON); //
Write_1621(0x09,0x01); //
WriteAll_1621(0,a,5); // 실제 데이터 출력
while(1) {
LED0=0;
LED1=1;
delay_ms(300);
LED0=1;
LED1=0;
delay_ms(300);
}
}
With Controller