Pic microcontroller controls HT1621 LCD program

Single chip microcomputer STM32L151CCU6
1206RGB (single)
0201 package SLP0603 ESD electrostatic diode 5V one-way ESD
Mobile phone crystal 3.2*2.5mm 3225 26M (26.000MHZ) 7.5PF 10PPM 20PPM 30PPM
>

pIC microcontroller controls HT1621 LCD program

;THISPROGRAMISHT1621LCDDISPLAY
;VDD=5.0VIFVDD<5.0VPLEASETODELAY
;RECEIVEANDTRANSMITBYTR'TIME
;
FSREQU4H
RBEQU6H
GENR0EQU09H
GENR1EQU0AH
WD_RGEQU0BH

;theregistersofLCDDISPLAYDATA
DA_AG0EQU10H; SEG0SEG1
DA_AGFEQU1FH; SEG30SEG31
;
;RBBITS
CSEQU0; ABLEBIT
WDAEQU1;DATAPORT
WCLKEQU2; WRITECOLK
RCLKEQU3; READCOLK
;
;theVALUEofLCDworkmode
BISAEQU52H; 1/3bisa4COM
;
;----------------
;thetableofHT1621WORKMODEVALUE
ON_VALUE
ADDWF2
RETLW06H; LCDON
RETLW02H;SYSON

RETLW10H; TONEOFF
RETLWBISA; BISA1/34COM
RETLW28H; 32KXTAL
RETLW0AH; WDTDISABLE

RETLW00;/IRQDISABLE*
RETLW0C6H; NORMALMODE*

;-------
;TRANSMITBITSSUBROUTINE
;fristlytransmithighbitofbyte
TRAM_DATA
MOVWFGENR0

BCFRB, WCLK
RLFWD_RG
BTFSS3,0
GOTO$+3

BSFRB, WDA
GOTO$+2

BCFRB, WDA

NOP
NOP
BSFRB, WCLK

NOP
NOP
NOP
NOP
NOP
BCFRB, WCLK
DECFSZGENR0
GOTOTRAM_DATA+1
RETLW0
;-------
;RECEIVINGBITSSUBROUTINE
;fristlyreceivehighbitofbyte
RCIV_DATA
BCFRB, RCLK

NOP
NOP
NOP
NOP
BSFRB, RCLK
NOP
NOP

BTFSSRB, WDA
GOTO$+3
BSF3,0
GOTO$+2

BCF3,0
RLF0H
DECFSZGENR0
GOTORCIV_DATA
RETLW0
;
;-------
;TRANSMITCONTROLCODESOFLCDDISPLAYSUBROUTINE
ON_LCD
MOVWFGENR1

MOVLW80H; HI_W3BITS: 100
MOVWFWD_RG

MOVLW3
CALLTRAM_DATA
ON_LCD0
MOVLW7H
SUBWFGENR1, W
MOVLW00H; HI_W1BIT: 0
BTFSC3,0
MOVLW10H; HI_W1BIT: 1
MOVWFWD_RG

MOVLW1H
CALLTRAM_DATA

MOVFWGENR1
CALLON_VALUE;LO_8BITS
MOVWFWD_RG

MOVLW8
CALLTRAM_DATA

DECFSZGENR1
GOTOON_LCD0
RETLW0
;
;TRANSMITDISPLAYDATAESSUBROUTINE
DIS_DATA
MOVWFGENR1
MOVLW0A0H
MOVWFWD_RG;WRITECONTROL

MOVLW3H
CALLTRAM_DATA

MOVLW00
MOVWFWD_RG;WRITEADDRESS
MOVLW6H
CALLTRAM_DATA

;MOVLWDA_AG0-1
;MOVWFFSR
DIS_DATA0
INCFFSR
MOVFW0H
MOVWFWD_RG;DISPLAYCODE

MOVLW8
CALLTRAM_DATA

DECFSZGENR1;DISPLAYWHICHSEGMENTREGSTER
GOTODIS_DATA0
RETLW0H
;===========================
;
;becauseintheHT1621commandcode'highbitandmemory
;addresscode'high-bitisfristlytransmitted,and
;data'low-bitisfristlytransmittedandreceived,but
;thisprogramfristlytransmitandreceivhigh-bit.
;pleasetoattenatedisplaydataesassemble'modle.
;
;INTITIALIZEPORT_B
MOVLW0F0H
TRISRB
MOVLW0FH
MOVWFRB

MOVLW4; CPUOSC=4MHz
OPTION
;
;SETHT1621WORKMODE
BCFRB, CS; CS=0
MOVLW8H
CALLON_LCD; TRANSMITHT1621WORKMODEVALUE
MOVLW0FH
IORWFRB;CS=1
NOP
;
;===========================
;WRITEOPERATION
;DISPLAYDATAPUTINDA_AG0(10H)REGSTERTODA_AGF(1FH)REGISTER
BCFRB, CS; CS=0

MOVLWDA_AG0-1; DISPLAYSEGMENTREGSTER
MOVWFFSR
MOVLW10H; 32SEGMENTS
callDIS_DATA

MOVLW0FH; CS=1
IORWFRB
;
;===========================
; READOPERATION
MOVLW0C0H
MOVWFWD_RG;WRITECONTROL

BCFRB, CS
MOVLW3H
CALLTRAM_DATA

MOVLW00
MOVWFWD_RG;WRITEADDRESS
MOVLW6H
CALLTRAM_DATA
;
;READOUTDATAESPUTINDA_AG0(10H)TODA_AGF(1FH)REGSTER
BSFRB, WCLK

MOVLW10H; 32SEGMENTS
MOVWFGENR1
MOVLWDA_AG0
MOVWFFSR

BCFRB, RCLK; RCLK=0
AG_RD
BSFGENR0,3; READBYTES
CALLRCIV_DATA
;
INCFFSR
DECFSZGENR1
GOTOAG_RD
;
MOVLW0FH
IORWFRB
;
;

2.05"~2.75" Speaker 52~70mm

2.05"~2.75" speaker (52~70mm)


1)2.05" speaker 52mm speaker
2)2.25" speaker 57mm speaker
3)2.5" speaker 62mm speaker
4)2.6" speaker 66mm speaker
5)2.75" speaker 70mm speaker

XDEC-52Y-1

XDEC-57Y-3XDEC-66Y-1






FAQ

Q1. What is the MOQ?
XDEC: 2000pcs for one model.
Q2. What is the delivery lead time?
XDEC: 15 days for normal orders, 10 days for urgent orders.
Q3. What are the payment methods?
XDEC: T/T, PayPal, Western Union, Money Gram.
Q4. Can you offer samples for testing?
XDEC: Yes, we offer free samples.
Q5. How soon can you send samples?
XDEC: We can send samples in 3-5 days.

2.05" Speaker 52Mm Speaker,2.25" Speaker 57Mm Speaker,2.5" Speaker 62Mm Speaker,2.6" Speaker 66Mm Speaker

Shenzhen Xuanda Electronics Co., Ltd. , https://www.xdecspeaker.com

Posted on