[s1mp3-dev] Writing to the LCD screen

Gary Tait taitg at hurontel.on.ca
Wed Jun 21 08:14:05 CDT 2006


Mateus Del Bianco wrote:
> I was tring to figure out how can I write to the "other" lines of the
> screen, not just the last one.
> I read the ATJ2085 incomplete datasheet, several pdf's from zilog, the
> schematics from the wiki...
> But I Still haven't found... what I was looking for! (yes, from U2 ;) 
> 
> Could someone, with z80 asm and ATJ2085 background, pleeease explain to me
> what the code below do?
> 
> 
> Mateus
> 
> 
> --- CUT HERE (test-bw.asm) ---
> ; this is the part that I do not understand.. I saw that the OUT instruction
> output's something to the "I/O".
> ; Where can I find what these IO's (0x5, 0x70, 0xee, 0x2) do? Is this
> related to the s6b0724 LCD chip?
> 

http://www.s1mp3.org/wiki/index.php/Port_map

It is related to the register and IO of the ATJ chip

IMO, not accessing more area on the screed is probably related to what 
you are sending, or neglecting to send to the display, so look up its 
datasheet.

> start:
>     
> 	ld a,0x7
> 	out (0x5),a

Sram

> 	ld a,0x30
> 	out (0x70), a

MCU control
	
> 	ld a,0x1f
> 	out (0xee),a

GPIO control

	
> 	ld a, 0x18
> 	out (0x2),a
MCU control

	
> 	in a,(0xee)
> 	or 1
> 	out (0xee),a

GPIO control
  	
> 	ld h,0
> 	ld l,0xff
> 

GPIO (likely the data/command register)

> loop:
> 	ld (0x8001),a  ; put the value of register a in the screen (using
> memory address 0x8001)
> 	inc a          ; increment a
> 	dec hl         ; decrement hl (what for!?)
> 	djnz loop      ; decrement b and jump while b > 0 (assuming b was ff
> when this loop started)
> 
> 
> 	ret
> 
> ; stop the program
> hang:
> 	di
> 	in      a,(0x4e)
> 	or      0x08 
> 	out     (0x4e),a
> 	jr hang
> 
> 
> _______________________________________________
> s1mp3-dev mailing list
> s1mp3-dev at s1mp3.org
> http://s1mp3.org/mailman/listinfo/s1mp3-dev_s1mp3.org
> 
> 




More information about the s1mp3-dev mailing list