NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
HT1632C HA0136E ROW/16 ROW23 HT48R10A-1 101A6A5A4 HT1632 - Datasheet Archive
Driving Matrix LEDs Using the HT1632C to Display an Animated Figure D/N: HA0136E Introduction The HT1632C is a memory mapping
Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure D/N: HA0136E HA0136E Introduction The HT1632C HT1632C is a memory mapping type of LED display driver device. Its range of applications are large and can include digital clocks, thermometers, humidity meters, industrial instrument displays as well as many others. The animated figure Demo Board uses an HT1632C HT1632C to drive six 88 LED matrix panels to form a overall 2416 LED matrix which is used to depict a walking person display effect. The HT1632C HT1632C has two display formats: 24 ROW/16 ROW/16 COM and 32 ROW/8 COM. This design uses the 24 ROW/16 ROW/16 COM display format. The animated figure uses 10 different screen display formats to create the walking person effect. Pressing the switch will initiate different walking effect types. HT1632C HT1632C Basic Characteristicis Operating Voltage: 2.4V~5.5V 2 display types: 32 ROW/8 COM or 24 ROW/16 ROW/16 COM Internal RAM if 32 ROW/8 COM are selected then RAM is 64x4 bits if 24 ROW/16 ROW/16 COM are selected then RAM is 96x4 bits 16-level PWM brightness control Internal 256K RC oscillator Serial interface communiation with the MCU Instruction and Data instruction communication with the MCU Common lines can select NMOS or PMOS open-drain output drive types V1.10 1 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure Hardware Block Diagram ROW0~ROW23 ROW23 HT1632C HT1632C Figure 1 The main controller is the HT48R10A-1 HT48R10A-1, which in turn controls the HT1632C HT1632C LED driver device. The HT48R10A-1 HT48R10A-1 uses an external 4MHz external RC oscillator while the HT1632C HT1632C uses its internal 150kHz internal RC oscillator. The LED driver interface signals are the CS, WR and DATA lines, which correspond to the PA0, PA1 and PA2 lines on the HT48R10A-1 HT48R10A-1. The switch is connected to pin PA.4. Six 88 LED matrix panels together will form a 2416 size display made up of two rows and 3 columns. The HT1632C HT1632C uses the 24 ROW/16 ROW/16 COM display format. V1.10 2 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure Hardware Circuit Description Figure 2 V1.10 3 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure The power supply input is DC 9V which is regulated down to 5V using a 7805 regulator device. C7, C8, C9 and C10 are filter capacitors. The HT1632C HT1632C uses its internal RC oscillator, which has a frequency of 256kHz. The main controller is the HT48R10A-1 HT48R10A-1, which uses an external 4MHz crystal. C1, C2, C3, R1 and R2 form the HT48R10A-1 HT48R10A-1 reset circuit. LED matrix internal structure: Figure 3 88 LED matrix pins are as follows: Figure 4 R represents Rows C represents Columns This figure is the LED front side. V1.10 4 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure LED layout principle: The LED display uses the 24 ROW/16 ROW/16 COM mode, (2 rows and 3 columns). The columns are the HT1632C HT1632C COM lines and the rows are the ROW. See Figure 5. Figure 5 Pressing the switch changes the walking stype of the animated figure. The switch is connected to pin PA.4 on the HT48R10A-1 HT48R10A-1. The animated figure starts from the right side of the first column and slowly walks out, continuously moving left until it extinguishes. Then another animated figure starts walking from the first column again in the same way. This cycle keeps repeating itself. When the switch is pressed, the animated figure walks in its original location. When the switch is pressed again, the animated figure continuously walks forward. V1.10 5 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure Software Design Description Flowchart Main V1.10 6 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure Interrupt Interrupt N Key Press ? HAVE_KEY=0 Y N 20ms delay elapsed ? Y HAVE_KEY=1 Y N FG_KEY=0 FG_KEY=0 Y FG_KEY=1 RETI V1.10 7 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure HAVEKEY_LED HAVE_KEYLED R_SEG & TBLP load value READ TABLE INC TBLP INC R_SEG INC COUNT COUNT=2CH N Y DELAY TAB_ADR=TAB_ADR+PATTERN TAB_ADR=LED_COUNT N Y TAB_ADR=OFFSET TAB_LED MAIN_LOOP V1.10 8 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure SCAN_LED SCAN_LED R_SEG & TBLP load value READ TABLE INC TBLP INC R_SEG INC COUNT N R_SEG.7=1 COUNT=44 Y Y TAB_ADR=TAB_ADR+ PATTERN N TAB_ADR=LED_COUNT Y TAB_ADR=OFFSET TAB_LED TEMP_ADDR=0D4H N TEMP_ADDR=60H Y MAIN_LOOP V1.10 9 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure READ Table V1.10 10 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure HT1632C HT1632C Write WRITE_1632 I/O initialisation TEMP[1]=A3A2A1A0D0D1D2D3 TEMP[0]=101A6A5A4 101A6A5A4 setup 14 times loop value N TEMP[0].5 =0 Y CLR DT SET DT CLR WR SET WR RLC TEMP[1] RLC TEMP[0] N 14 loops finished? Y RET V1.10 11 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure Software Design Description This design uses 10 different types of screen displays to depict a walking person effect. For this reason the important point in the program is in the management of the transition between the different pictures and the gradual extinguishing of the displays. (consult the SCAN_LED flow). In the program, R_SEG is the HT1632C HT1632C address register, R_ADDR is the HT1632C HT1632C address, COUNT is the individual picture address and TEMP_ADDR records the address of the LED moving person. MAIN: main program loop flowchart SCAN_LED: no key press person walking forward HAVEKEY_LED: key press person running on original location INTERRUPT: determine if key is pressed if not continuous cycle, if jump to HAVEKEY_LED READ TABLE: Read data and process When one action finishes, the picture will move to the left one position. When the animated figure arrives at the display edge, the read data is not written to the HT1632C HT1632C until it disappears, and then data can be reloaded into TEMP_ADDR. When data is read, R_SEG will increase by 3, COUNT will increase by 3, TBLP will increase by 1 or 2. TEMP_ADDR will reduce by 4. Because for some pictures a data read requires 16-bits and the HT48R10A-1 HT48R10A-1 Program Memory has a capacity of 102414 bits, therefore before transmitting data, first determine if the highest data bits are equal to 3F. This indicates that the data is 16-bits. If this is the case, then 1 should be added to TBLP, if not then the data can be transmitted. Because data transmission to the HT1632C HT1632C is 4 bits wide, each time data is read the high/low byte order needs to be determined. After each animated picture has been displayed a delay is needed after another read is required. This is because, if the animated figure walking speed is changed then this can be achieved by adjusing this delay. The animated figure original location walking style is achieved by: store TEMP_ADDR value and do not change, then write a table read value to R_ADDR. Then when the switch is pressed again TEMP_ADDR = TEMP_ADDR-4. When writing to the HT1632C HT1632C, writing an HT1632C HT1632C address requires a 14-bit data transmission. These 14-bits are composed of: 101 (3-bit write instruction), A6A5A4A3A2A1A0 (7-bit address) and D0D1D2D3 (4-bit data). The address is transmitted in a highest bits first format while the data is transmitted in a lower bits first format. V1.10 12 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure PCB Layout V1.10 13 June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure BOM Designator LibRef Description Footprint Comment 4M Crystal Oscillator BCY-W2/D3.1 XTAL C1 Cap Capacitor C 103 C2 Cap Capacitor C 104 C3 Cap Capacitor C 104 C7 CAPPOL C4 470uF C8 Cap 104 104 C9 CAPPOL C4 470uF C10 Cap 104 104 HT48R10A-1 HT48R10A-1 Component_1 HT1632C HT1632C Component_1 KEY SW-PB LED1 COMPONENT_2 LED LED2 COMPONENT_2 LED LED3 COMPONENT_2 LED LED4 COMPONENT_2 LED LED5 COMPONENT_2 LED LED6 COMPONENT_2 LED P DCJACK P P1 7805 7805 R1 Res1 Resistor R TEI 10K R2 Res1 Resistor R TEI 100K R3 Res1 Resistor AXIAL-0.3 330R R4 Res Semi Semiconductor Resistor AXIAL-0.5 S3 V1.10 XTAL SW2WAY PODONG Capacitor Capacitor HT48R10A-1 HT48R10A-1 Switch 14 SPST-2 SW-PB 7805 10K June 17, 2010 Driving Matrix LEDs Using the HT1632C HT1632C to Display an Animated Figure Revision History Revision: V1.10 Updated Date: June 14, 2010 Modified Contents: The original part number HT1632 HT1632 was changed to HT1632C HT1632C. The Application Circuit was modified. V1.10 15 June 17, 2010