Code:
	
  .-----------------------------------------------. VCC
  |  Grafik Display 64x128 pixel                  |  +
  |                                               |  |
  |  HP12542R-DYO                                 | .-.
  |                  1 1 1 1 1 1 1 1 1 1 2 2 2 2 2| | |10k
  |1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4| | |
  '-----------------------------------------------' '-'
   |     |   | |   | | | | | | | | | |   | | |       |
   |    === ===|   | | | | | | | | |===  |=== \------+
   |    GND GND|   | | | | | | | | |GND  |GND        |
   +---------+-+   | | | | | | | | |     |          --- µ1
             |     | | | | | | | | |     |          ---
             | +---+ | | | | | | | |     |           |
             | | +---+ | | | | | | |     |          ===
         VCC | | | +---+ | | | | | |     |VCC       GND
          +  | | | | +---+ | | | | |     | +
          |  | | | | |     | | | | |     | |
          +--+---------+ +-----------------|---------+
             | | | | | | | | | | | |     | |  74HC74 |
            .----------o--.| | | | |     | +---+     |
            |1 1 1 1 1 9 8|| | | | |     | |  4|     |
            |4 3 2 1 0    || | | | |     | |5.-o-.2  |
            |)            || | | | +---------|   |---+------<CK
            |     74HC164 || | | |       | | |   |-+ |
            |1 2 3 4 5 6 7|| | | |       | | '-o-'3| |
            '-------------'| | | |       | |  1|   | |
             | | | | | | | | | | |       | +---+   +--------<DT
             +-+ | | | |===| | | |       | | 10| 12| |
               | | | | |GND| | | |       | |9.-o-. | |
               | | | | +---+ | | |       +---|   |-+ |
               | | | +-------+ | |       | | |   |---+
               | | +-----------+ |       | | '-o-'11
               | +---------------+       | | 13|
               +-------------------------+ +---+
;	Testprogramm für Grafikdisplay Hyundai HP12542R-DYO mit 2-pin Anschluss 
	LIST      P=12F629
	include "P12F629.inc"
	__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _HS_OSC
#define _DT	GPIO,0			; nur für PIC12FXXX
#define	_CK	GPIO,1			; Displayanschlüsse festlegen
;#define	_DT	PORTB,7		; nur für PIC16FXXX
;#define	_CK	PORTB,6		; Displayanschlüsse festlegen
#define	_C	STATUS,C
#define	_Finv	Flags,0			; Displayinversion  Flag: 0-normal, 1-invers
DTmp   EQU	0x20
DTmp1	EQU	0x21
DTmp2	EQU	0x22
DTmp3	EQU	0x23
DTmp4	EQU	0x24
DTmp5	EQU	0x25
Flags	EQU	0x26
		ORG 	0x0000
		call	Init
Main		movlw	0xB0		; Page 0 Adresse setzen (1. Zeile)
		call	Cmd
		movlw	0x10		; Column 0 Adresse setzen (2 Bytes)
		call	Cmd
		movlw	0
		call	Cmd
		movlw	0x80		; Schleifenzähler festlegen (128d)
		movwf	DTmp5
		movlw	0		; eretes Byte festlegen 
		movwf	DTmp4
MainL1		movf	DTmp4,0
		call	DByte		; das Byte an Display schicken
		incf	DTmp4,1	; das Byte incrementieren
		decfsz	DTmp5,1	; Schleifenzähler decrementieren
		goto	MainL1		; wiederholen bis Schleifenzähler=0
		movlw	0xB1		; Page 1 Adresse setzen (2. Zeile), u.s.w 
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		movlw	0x80
		movwf	DTmp5
MainL2		movf	DTmp4,0
		call	DByte
		incf	DTmp4,1
		decfsz	DTmp5,1
		goto	MainL2
		movlw	0xB2		; Page 2 Adresse setzen (3. Zeile), u.s w.
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		movlw	0x80
		movwf	DTmp5
		movlw	0xFF		; erstes Byte festlegen
		movwf	DTmp4
MainL3		movf	DTmp4,0
		call	DByte
		decf	DTmp4,1	; das Byte decrementieren
		decfsz	DTmp5,1
		goto	MainL3
		movlw	0xB3		; Page 3 Adresse setzen (4. Zeile), u.s.w.
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		movlw	0x80
		movwf	DTmp5
MainL4		movf	DTmp4,0
		call	DByte
		decf	DTmp4,1
		decfsz	DTmp5,1
		goto	MainL4
		movlw	0xB4		; Page 4 Adresse setzen (5. Zeile), u.s.w., wie Page 0
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		bsf	_Finv		; invers
		movlw	0x80
		movwf	DTmp5
		movlw	0
		movwf	DTmp4
MainL5		movf	DTmp4,0
		call	DByte
		incf	DTmp4,1
		decfsz	DTmp5,1
		goto	MainL5
		bcf	_Finv		; normal
		movlw	0xB5		; Page 5 Adresse setzen (6. Zeile), u.s.w., wie Page 1
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		bsf	_Finv		; invers
		movlw	0x80
		movwf	DTmp5
MainL6		movf	DTmp4,0
		call	DByte
		incf	DTmp4,1
		decfsz	DTmp5,1
		goto	MainL6
		bcf	_Finv		; normal
		movlw	0xB6		; Page 6 Adresse setzen (7. Zeile), u.s.w., wie Page 2
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		bsf	_Finv		; invers
		movlw	0x80
		movwf	DTmp5
		movlw	0xFF
		movwf	DTmp4
MainL7		movf	DTmp4,0
		call	DByte
		decf	DTmp4,1
		decfsz	DTmp5,1
		goto	MainL7
		bcf	_Finv		; normal
		movlw	0xB7		; Page 7 Adresse setzen (8. Zeile), u.s.w., wie Page 3
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		bsf	_Finv		; invers
		movlw	0x80
		movwf	DTmp5
MainL8		movf	DTmp4,0
		call	DByte
		decf	DTmp4,1
		decfsz	DTmp5,1
		goto	MainL8
		bcf	_Finv		; normal
		goto	Main		; und noch mal vom Anfang (endlos)
		
Cmd        	bcf	_C		; Schicke ein Befehl zum Display
		goto	Send	
DByte		bsf	_C		; Schicke ein Databyte zum Display
Send		movwf   	DTmp2
		btfsc	_Finv		; prüfen, ob invertiert
		comf	DTmp2,1	; wenn ja, alle Bits negieren
		movlw   	9
		movwf   DTmp3
Ser		bcf	_CK		; Schicke seriell bitweise ein Byte+A0=C  (9 Bit) in den Schieberegister+Flip-Flop
		bcf	_DT
		btfsc	DTmp2,7
		bsf	_DT
		bsf	_CK
		rlf	DTmp2,1
		decfsz	DTmp3,1
		goto	Ser
		bcf	_DT		; setze
		bsf	_DT		; und
		bcf	_CK		; lösche
		bcf	_DT		; Display
		bsf	_DT		; Enable
		return
Del		movlw	0x20
		movwf	DTmp
Del1		clrf	DTmp1
Del2		clrf	DTmp2
Del3		decfsz	DTmp2,1
		goto	Del3
		decfsz	DTmp1,1
		goto	Del2
		decfsz	DTmp,1
		goto	Del1
		return
Init		movlw	7		; Komparator abschalten
		movwf	CMCON		; und GPIO0-3 als digitale I/O festlegen
		bsf	STATUS,RP0
		clrf	TRISIO		; nur für PIC12FXXX
;		clrf	TRISB		; nur für PIC16FXXX
		bcf	STATUS,RP0
		clrf	GPIO		; nur für PIC12FXXX
;		clrf	PORTB		; nur für PIC16FXXX
		clrf	Flags
		bcf	_CK		; lösche
		bcf	_DT		; Display
		bsf	_DT		; Enable
		movlw	0xAE		; Display aus
		call	Cmd
		call	Del		; abwarten
		movlw	0xA3		; LCD Bias=1/7
		call	Cmd
		movlw	0x2F		; LCD Spannungserzeugung einschalten
		call	Cmd
		movlw	0x81		; Kontrasteinstellung auswählen
		call	Cmd
		movlw	0x20		; Kontrast=mittel
		call	Cmd
		movlw	0xAF		; Display ein
		call	Cmd
		return
		END
;	Testprogramm für Grafikdisplay Hyundai HP12542R-DYO mit 2-pin Anschluss 
	LIST      P=18F252
	include "P18F252.inc"
	CONFIG OSCS=OFF,OSC=HSPLL, PWRT=ON, BOR=OFF, WDT=OFF, CCP2MUX=OFF, STVR=OFF, LVP=OFF, DEBUG=OFF
	CONFIG CP0=OFF,CP1=OFF,CP2=OFF,CP3=OFF,CPB=OFF,CPD=OFF,WRT0=OFF,WRT1=OFF,WRT2=OFF,WRT3=OFF
	CONFIG WRTB=OFF,WRTC=OFF,WRTD=OFF,EBTR0=OFF,EBTR1=OFF,EBTR2=OFF,EBTR3=OFF,EBTRB=OFF 
#define 	_DT	PORTB,7		; Displayanschlüsse 
#define	_CK	PORTB,6		; festlegen
#define	_C	STATUS,C
#define	_Finv	Flags,0			; Displayinvers Flag: 0-normal, 1-invers
DTmp   EQU	0x20
DTmp1	EQU	0x21
DTmp2	EQU	0x22
DTmp3	EQU	0x23
DTmp4	EQU	0x24
DTmp5	EQU	0x25
Flags	EQU	0x26
		ORG 	0x0000
		call	Init
Main		movlw	0xB0		; Page 0 Adresse setzen (1. Zeile)
		call	Cmd
		movlw	0x10		; Column 0 Adresse setzen (2 Bytes)
		call	Cmd
		movlw	0
		call	Cmd
		movlw	0x80		; Schleifenzähler festlegen (128d)
		movwf	DTmp5
		movlw	0		; eretes Byte festlegen 
		movwf	DTmp4
MainL1		movf	DTmp4,0
		call	DByte		; das Byte an Display schicken
		incf	DTmp4,1	; das Byte incrementieren
		decfsz	DTmp5,1	; Schleifenzähler decrementieren
		goto	MainL1		; wiederholen bis Schleifenzähler=0
		movlw	0xB1		; Page 1 Adresse setzen (2. Zeile), u.s.w 
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		movlw	0x80
		movwf	DTmp5
MainL2		movf	DTmp4,0
		call	DByte
		incf	DTmp4,1
		decfsz	DTmp5,1
		goto	MainL2
		movlw	0xB2		; Page 2 Adresse setzen (3. Zeile), u.s w.
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		movlw	0x80
		movwf	DTmp5
		movlw	0xFF		; erstes Byte festlegen
		movwf	DTmp4
MainL3		movf	DTmp4,0
		call	DByte
		decf	DTmp4,1	; das Byte decrementieren
		decfsz	DTmp5,1
		goto	MainL3
		movlw	0xB3		; Page 3 Adresse setzen (4. Zeile), u.s.w.
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		movlw	0x80
		movwf	DTmp5
MainL4		movf	DTmp4,0
		call	DByte
		decf	DTmp4,1
		decfsz	DTmp5,1
		goto	MainL4
		movlw	0xB4		; Page 4 Adresse setzen (5. Zeile), u.s.w., wie Page 0
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		bsf	_Finv		; invers
		movlw	0x80
		movwf	DTmp5
		movlw	0
		movwf	DTmp4
MainL5		movf	DTmp4,0
		call	DByte
		incf	DTmp4,1
		decfsz	DTmp5,1
		goto	MainL5
		bcf	_Finv		; normal
		movlw	0xB5		; Page 5 Adresse setzen (6. Zeile), u.s.w., wie Page 1
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		bsf	_Finv		; invers
		movlw	0x80
		movwf	DTmp5
MainL6		movf	DTmp4,0
		call	DByte
		incf	DTmp4,1
		decfsz	DTmp5,1
		goto	MainL6
		bcf	_Finv		; normal
		movlw	0xB6		; Page 6 Adresse setzen (7. Zeile), u.s.w., wie Page 2
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		bsf	_Finv		; invers
		movlw	0x80
		movwf	DTmp5
		movlw	0xFF
		movwf	DTmp4
MainL7		movf	DTmp4,0
		call	DByte
		decf	DTmp4,1
		decfsz	DTmp5,1
		goto	MainL7
		bcf	_Finv		; normal
		movlw	0xB7		; Page 7 Adresse setzen (8. Zeile), u.s.w., wie Page 3
		call	Cmd
		movlw	0x10
		call	Cmd
		movlw	0
		call	Cmd
		bsf	_Finv		; invers
		movlw	0x80
		movwf	DTmp5
MainL8		movf	DTmp4,0
		call	DByte
		decf	DTmp4,1
		decfsz	DTmp5,1
		goto	MainL8
		bcf	_Finv		; normal
		goto	Main		; und noch mal vom Anfang (endlos)
		
Cmd        	bcf	_C		; Schicke ein Befehl zum Display
		goto	Send	
DByte		bsf	_C		; Schicke ein Databyte zum Display
Send		movwf   	DTmp2
		btfsc	_Finv		; prüfen, ob invertiert
		comf	DTmp2,1	; wenn ja, alle Bits negieren
		movlw   	9
		movwf   DTmp3
Ser		bcf	_CK		; Schicke seriell bitweise ein Byte+A0=C  (9 Bit) in den Schieberegister+Flip-Flop
		bcf	_DT
		btfsc	DTmp2,7
		bsf	_DT
		bsf	_CK
		rlcf	DTmp2,1
		decfsz	DTmp3,1
		goto	Ser
		bcf	_DT		; setze
		bsf	_DT		; und
		bcf	_CK		; lösche
		bcf	_DT		; Display
		bsf	_DT		; Enable
		return
Del		movlw	0x40
		movwf	DTmp
Del1		clrf	DTmp1
Del2		clrf	DTmp2
Del3		decfsz	DTmp2,1
		goto	Del3
		decfsz	DTmp1,1
		goto	Del2
		decfsz	DTmp,1
		goto	Del1
		return
Init		clrf	TRISB
		clrf	PORTB
		clrf	Flags
		bcf	_CK		; lösche
		bcf	_DT		; Display
		bsf	_DT		; Enable
		movlw	0xAE		; Display aus
		call	Cmd
		call	Del		; abwarten
		movlw	0xA3		; LCD Bias=1/7
		call	Cmd
		movlw	0x2F		; LCD Spannungserzeugung einschalten
		call	Cmd
		movlw	0x81		; Kontrasteinstellung auswählen
		call	Cmd
		movlw	0x20		; Kontrast=mittel
		call	Cmd
		movlw	0xAF		; Display ein
		call	Cmd
		return
		END
 
						
Lesezeichen