For this project I used the follow simple 3.2V circuit for supply. D1 and D1 are red leds with Vd of about 1.9V..2.0V each. Another solution is to replace both leds with a 1.8 kΩ resistor.
PIC16F84 power supply
LPH 7366 controled power supply
LPH 7366 interfacing with PIC16F84
LPH 7366 Pins (front view)
pin1 V+ Power supply pin for lcd driver
pin2 Sclk Serial clock
pin3 Sda Serial data communication
pin4 DorC Data or Command
pin5 Cs Chip select
pin6 Osc (32768Hz external clock) not used
pin7 Gnd
pin8 Vout(DC/DC voltage converter)this power the lcd panel and is generated by lcd driver
pin9 Reset
The oscillator for LPH7779 and LPH7677 has a frequency of 16KHz, internal generated only.
LPH 7779 or LPH 7677 lcd interfacing with PIC16F84
LPH7779, LPH7677 Pins (front view)
pin1 V+
pin2 Sclk
pin3 Sda
pin4 DorC
pin5 Cs
pin6 Gnd
pin7 Vout(DC/DC voltage converter)
pin8 Reset
;=======LCD_Nokia nse1,nse3,nsm1 / Version 1.1====================24/12/02== ; cod LPH7366-1, LPH7779, LPH7677 / driver PCD8544 ; rb6,rb7 sclock,sdata ; ra0,ra1,ra2,ra3 d/C,Reset,Vccmd,SCE ; http://www.module.ro ; standard crystal 4.000 MHz XT - 1us pe instructiune/pe aproape ; Program realizat de Ing. Bergthaller Iulian-Alexandru ;------------------------------------------------------------ list p=16f84A;f=inhx8m _CP_OFF equ H'3FFF' ;code protect off _PWRTE_ON equ H'3FFF' ;Power on timer on _WDT_OFF equ H'3FFB' ;watch dog timer off _XT_OSC equ H'3FFD' ;crystal oscillator __CONFIG _CP_OFF & _PWRTE_ON & _WDT_OFF & _XT_OSC ;------------------------------------------------------------ ; cpu init porta equ 05 portb equ 06 count1 equ 0C count2 equ 0D count3 equ 0E afisaj equ 0F count4 equ 10 #DEFINE sclk portb,6 #DEFINE sdta portb,7 #DEFINE dorc porta,0 #DEFINE rset porta,1 #DEFINE tens porta,2 #DEFINE enab porta,3 ;------------------------------------------------------------ org 0 ; ;------------------------------------------------------------ init movlw 0 tris portb ; set portb as output movwf portb ; all ouput low movlw 0 tris porta ; set portb as output movwf porta ; all ouput low start call pause bsf dorc bsf enab bsf tens ;activare tensiune call lcres ;resetare movlw 21H ;set extins movwf afisaj call lccmd movlw .197 ;Vop movwf afisaj call lccmd movlw 13H ;bias movwf afisaj call lccmd movlw 20H ;horizontal disply movwf afisaj call lccmd movlw 09H ;mod control all on movwf afisaj call cbild call lccmd call pause call pause call pause call pause movlw 08H ;mod control blank movwf afisaj call lccmd call pause call pause movlw 0CH ;mod control normal movwf afisaj call lccmd movlw 40H ;x ini movwf afisaj call lccmd movlw 80H ;y ini movwf afisaj call lccmd adata movlw 1FH ;data movwf afisaj call lcdta movlw 05H ;data movwf afisaj call lcdta movlw 07H ;data movwf afisaj call lcdta goto adata lcdta bsf dorc bcf enab ; enable chip and start data call varsa bsf enab retlw 00 lccmd bcf dorc bcf enab ; enable chip and start data call varsa bsf enab retlw 00 lcres bcf rset ;start reset call pause bsf rset ;stop reset retlw 00 varsa movlw 08H movwf count4 vbit bcf sclk btfsc afisaj,7 ;bit0 bsf sdta btfss afisaj,7 bcf sdta call halta bsf sclk call halta rlf afisaj,1 decfsz count4 goto vbit retlw 00 cbild bcf sdta movlw .6 movwf count3 c3 movlw .84 movwf count1 c1 movlw .8 movwf count2 bsf dorc bcf enab c2 bcf sclk nop nop bsf sclk decfsz count2 goto c2 bsf enab decfsz count1 goto c1 decfsz count3 goto c3 retlw 00 pause movlw .7 movwf count3 d3 movlw .50 movwf count1 d1 movlw .250 movwf count2 d2 decfsz count2 goto d2 decfsz count1 goto d1 decfsz count3 goto d3 retlw 00 halta movlw 20H movwf count1 g1 movlw 40H movwf count2 g2 decfsz count2 goto g2 decfsz count1 goto g1 retlw 00 ;------------------------------------------------------------ end ;============================================================
Lcd links:
If you want to connect some PCD8544 based lcd products on a computer, the follow links can be very useful:
Subscribe to my RSS Feed.
Back to my home page
Last updated January, 2003