LCD interfacing

edited November 2010 in Hardware
Has anybody interfaced an LCD to a Spectrum? I'm toying with putting together an interface, a small 32x8 display would fit nicely just above the keyboard. Portable Speccy ;)
Post edited by Jonathan Harston on

Comments

  • edited November 2010
    jgharston wrote: »
    Has anybody interfaced an LCD to a Spectrum? I'm toying with putting together an interface, a small 32x8 display would fit nicely just above the keyboard. Portable Speccy ;)

    Can be LCD monitor ?
    http://www.worldofspectrum.org/forums/showthread.php?p=457816#post457816
  • edited November 2010
    velesoft wrote: »
    No, I mean an liquid crystal display, as in here.
  • edited November 2010
    jgharston wrote: »
    No, I mean an liquid crystal display, as in here.

    Version for SAM COUPE:
    http://www.youtube.com/watch?v=m8eMVKHMZ18&feature=player_embedded

    SAM COUPE is ZX compatible and use same signals on system bus, then is it connectable also for ZX Spectrum.
  • edited November 2010
    I have seen this one in the real, think it used a simple 8bit port. Long time ago...
    http://home.orange.nl/edwin.blink/samcoupe/hardware/lcd/

    Maybe this one could be helpfull: http://home.iae.nl/users/pouweha/lcd/lcd1.shtml
  • edited November 2010
    From my archive, by unknown author:
    ; Some basic code for driving LCD alphanumeric displays. It is mostly to
    ; demonstrate that these LCDs could be driven by a Z80 without complex ports
    ; or timing problems.
    
    ; Interface equates. Note C2h and C3h are read ONLY.
    
    WRINST	EQU	C0h		; write instruction
    WRDATA	EQU	C1h		; write data
    RDBUSY	EQU	C2h		; read busy flag (and address)
    RDDATA	EQU	C3h		; read data
    
    	ORG	1800h		; start in RAM
    
    	LD	B,#0		; initial delay
    	DJNZ	$		; do it
    
    	LD	HL,INITBL	; start table
    	LD	B,#15		; 15 mS delay
    	CALL	INSTR		; output instruction
    	LD	B,#5		; 5 mS delay
    	CALL	INSTR		; output instruction
    	LD	B,#1		; 1 mS delay
    	CALL	INSTR		; output instruction
    
    	LD	B,#4		; 4 mode bytes
    MODSET:
    	CALL	BUSY		; wait until ready
    	INC	HL		; point to first mode byte
    	LD	A,(HL)		; get byte
    	OUT	(WRINST),A	; out to display
    	DJNZ	MODSET		; loop until all done
    
    	LD	HL,MESSAGE	; point to the message
    	CALL	BUSY		; wait until ready
    	LD	A,#0Fh		; display on, cursor blink
    	OUT	(WRINST),A	; out to display
    	LD	A,#80h		; address set to 00
    	CALL	MESG		; send the message
    
    	HALT			; all stop
    
    MESG:
    	CALL	BUSY		; wait until ready
    	OUT	(WRINST),A	; address out to display
    	LD	B,#MSGEND-MESSAGE	; mesage length	
    WRITE2:
    	CALL BUSY		; wait until ready
    	LD	A,(HL)		; get byte
    	OUT	(WRDATA),A	; chr out to display
    	INC	HL		; point to next chr
    	DJNZ	WRITE2		; loop until all chrs done
    
    	RET
    
    BUSY:				; wait until ready:
    	PUSH	AF		; save AF
    BUSY1:
    	IN	A,(RDBUSY)	; get status (& address)
    	BIT	7,A		; check status bit
    	JR	NZ,BUSY1	; loop if still busy
    	POP	AF		; restore AF
    	RET			; done
    
    INSTR:				; output instruction
    	CALL	DELAY		; wait for B mS
    	LD	A,(HL)		; get byte
    	OUT	(WRINST),A	; out to display
    	RET			; done
    
    DELAY:
    	PUSH	HL		; save HL
    	LD	DE,-1		; set to -1
    LOOP1:
    	LD	HL,431/5	; 86
    LOOP2:
    	ADD	HL,DE		; decrement HL
    	JR	C,LOOP2		; loop if not 0
    	DJNZ	LOOP1		; decrement mS count & loop if not 0
    	POP	HL		; restore HL
    	RET			; done
    
    INITBL:
    	DB	30h		; initialisation byte (set 8 bit I/F)
    	DB	38h		; set 8 bit I/F, 2 lines, 5x7 font.
    	DB	08h		; display off
    	DB	01h		; clear & home display
    	DB	06h		; set no scroll, cursor shifts right.
    
    MESSAGE:
    	DB	'LCD Display'	; any old rubbish
    MSGEND:
    
    	END
    
  • edited November 2010
    Another z80 one, pm if you need translation.
    www.msxarchive.nl/pub/msx/mirrors/hanso//.../lcdhitachi.pdf
  • edited November 2010
    roko wrote: »
    Yes, that's what inspired me! I was comparing the LCD here with a Spectrum and thinking it would just fit above the keyboard ;)
  • edited November 2010
    Is this a similar project?

    http://user.tninet.se/~vjz762w/laptop.html
  • edited November 2010
    We did this a while ago with the Ace, see here for info Jupiter Ace on LCD screen
  • edited November 2010
    jgharston wrote: »
    Yes, that's what inspired me! I was comparing the LCD here with a Spectrum and thinking it would just fit above the keyboard ;)
    I think that you can't go wrong when using an LCD with HD44780 compatible controller and 14 or 16 pins connector. For others models it will be difficult to start from scratch without datasheet. But then, think what you could tell the world in 8x40 characters!
  • edited November 2010
    I've interfaced a 4x40 LCD display with a Z80 single board computer of my own design. Really, all you need to do is decode an I/O port and follow the information in the data sheet.

    I think pretty much all of the typical character LCD displays are HD44780 compatible.

    (I also have a pile of mono 256x128 graphical LCDs, stripped from some redundant equipment. These are not-quite-raw panels, but they have to be refreshed almost like a display, i.e. with HSYNC, VSYNC signals and 8 bit wide data (putting in 8 pixels at a time). My plan for these is to make a frame buffer, giving a byte addressable screen).
  • edited November 2010
    Slightly off-topic:
    There is much more that would nicely fit, as soon as the heatsink got redundant by a Recom 'regulator'!
    http://www.biehold.nl/roelof/newroom.jpg
  • edited November 2010
    roko wrote: »
    There is much more that would nicely fit, as soon as the heatsink got redundant by a Recom 'regulator'!
    http://www.biehold.nl/roelof/newroom.jpg
    Yes, I have a joystick and external keybaord interface attached like that :)
Sign In or Register to comment.