동네의 부품샵을 구경하다 우연히 구하게 된 부품이다. 저렴한 가격($1.99)때문에 메뉴얼 여부에 관계 없이 일단 구입하여 버렸다. 물론 '구글신'을 믿고 있었기 때문이지만...
부품 명칭은 PD2437로 OSRAM에서 나온 4-character 5x7 dot matrix alphanumeric programmable display with built-in CMOS control functions 이다. DIL 패키지 안에 5x7 매트릭스가 4개 들어있고 디스플레이 컨트롤러를 내장하고 있다.
일반적인 메모리같이 8-bit bidirectional data bus를 사용해서 마이크로컨트롤러와 데이터를 교환하고 ASCII 코드를 입력받아 그에 해당하는 문자를 표시하게 되어 있었다.
Arduino에 연결하려고 하는데 8-bit data bus를 모두 digital i/o에 연결해 버리면 arduino에 다른 주변기기를 붙일 수 없을거 같아 74LS164(8-Bit Parallel-Out Serial-In Shift Registers)를 같이 사용하기로 하였다.
- Control Word
b7 : clear
0 standard operation
1 clear entire display
b6 : lamp test
0 standard operation
1 display all dots at 50% brightness
b5 : blink
0 blink attribute disabled
1 blink entire display
b4 : attribute enable
0 disable above attributes
1 enable above attributes
b3,b2: attributes
00 display cursor instead of character
01 blink character
10 display blinking cursor instead of character
11 alternate character with cursor
b1,b0: brightness
00 0% (black)
01 25%
10 50%
11 100%
-----------------------------------------------------
how to load information into the display
SET BRIGHTNESS
1. set brightness level of the entire display to your preference, (000) <- 0x02 (50%)
LOAD FOUR CHARACTERS
2. load "S" in the left hand digit, (111) <- 'S'
3. load "T" in the next digit, (110) <- 'T'
4. load "O" in the next digit, (101) <- 'O'
5. load "P" in the right hand digit, (100) <- 'P'
BLINK A SINGLE CHARACTER
6. into the digit, second from the right, load the hex code 0xcf, which is the code for an 'O' with the d7 bit added as a control bit, (101) <- 0xcf
7. load enabled blinking character into the control word register. the display should show "STOP" with a flashing "O", (000) <- 0x17
ADD ANOTHER BLINKING CHARACTER
8. into the left hand digit, load the he code 0xd3 which gives an 'S' with d7 bit added as a control bit, (111) <- 0xd3
ALTERNATE CHARACTER/CURSOR ENABLE
9. load enable alternate character/cursor into the control word register. the display now should show "STOP" with the 'O' and the 'S' alternating between the letter and cursor. (000) <- 1f
INITIATE FOUR CHARACTER BLINKING
10. load enable display blinking. the display now should show the entire word "STOP" blinking, (000) <- 0x23
*/
// Connected to LS164
int DATA = 2; // LS164 Din (pin 1&2)
int CLK = 3; // LS164 Clk (pin 8)
// Connected to PD2437
int A0 = 6; // Address 0 (pin 7)
int A1 = 5; // Address 1 (pin 8)
int A2 = 4; // Address 2 (pin 9)
int WR = 7; // Write (pin 11)
int CE = 8; // Chip Enable (NEG, pin 6)
int RST = 9; // Reset (NEG, pin 4)
void setup() // run once, when the sketch starts
{
Serial.begin(38400);
// pins for LS164
pinMode(DATA, OUTPUT); // sets the digital pin as output
pinMode(CLK, OUTPUT); // sets the digital pin as output
void loop() // run over and over again
{
putChar(0, 0x83);
delay(100);
putChar(7,'S');
delay(100);
putChar(6,'T');
delay(100);
putChar(5,'O');
delay(100);
putChar(4,'P');
delay(100);
PD2437은 매우 쉽게 여러개를 cascading이 가능하기 때문에 현재 총 10개의 PD2437을 연결하여 20x2 LED display를 만들어 볼까 생각중이다. LCD에 비해 직접 발광을 하기 때문에 시야각 문제도 없고 시중에서 구할 수 있는 20x2 LCD보다 크기도 크기 때문에 야간에도 글자를 정확하게 확인할 수 있기 때문에 signboard로 적합할 거 같다.
댓글을 달아 주세요
좋은 디스플레이소개 감사합니다.. 옛날 스타택이 생각나게 하네요.. ^^