Hi all. I have disassembled a Nokia 7250 and now im trying to make the display work together with an Spartan 3 FPGA.
Im using a Picoblaze softcore processor to send the data via a "homemade" spi module.
The PCB on the display is green so I assume that the chipset used is made by Epson. I have tried both the Philips and the Epson init code. When Im using the Philips code the display is completely dead. When im using the Epson code the display seems to react to the DISPON command.
The display goes from all black to a little brigther.
Code:
NAMEREG sA, high
NAMEREG sB, low
CONSTANT cmd, 00
CONSTANT data, 01
init:
LOAD high, 01
LOAD low, 00
main:
initlcd:
;---------RESET---------
OUTPUT low, 0D
CALL del20ms
OUTPUT high, 0D
CALL del20ms
;---------DISCTL---------
LOAD sE, CA
CALL spi_cmd
OUTPUT low, 0B
;---------00---------
LOAD sE, 03
CALL spi_data
OUTPUT low, 0B
;---------20---------
LOAD sE, 20
CALL spi_data
OUTPUT low, 0B
;---------00---------
LOAD sE, 0C
CALL spi_data
OUTPUT low, 0B
;---------COMSCN---------
LOAD sE, BB
CALL spi_cmd
OUTPUT low, 0B
;---------01---------
LOAD sE, 01
CALL spi_data
OUTPUT low, 0B
;---------OSCON---------
LOAD sE, D1
CALL spi_cmd
OUTPUT low, 0B
;---------SLPOUT---------
LOAD sE, 94
CALL spi_cmd
OUTPUT low, 0B
;---------PWRCTR---------
LOAD sE, 20
CALL spi_cmd
OUTPUT low, 0B
;---------0F---------
LOAD sE, 0F
CALL spi_data
OUTPUT low, 0B
;---------DISINV---------
LOAD sE, A7
CALL spi_cmd
OUTPUT low, 0B
;---------DATCTL---------
LOAD sE, BC
CALL spi_cmd
OUTPUT low, 0B
;---------01---------
LOAD sE, 01
CALL spi_data
OUTPUT low, 0B
;---------00---------
LOAD sE, 00
CALL spi_data
OUTPUT low, 0B
;---------02---------
LOAD sE, 02
CALL spi_data
OUTPUT low, 0B
;---------VOLCTR---------
LOAD sE, 81
CALL spi_cmd
OUTPUT low, 0B
;---------20---------
LOAD sE, 20
CALL spi_data
OUTPUT low, 0B
;---------03---------
LOAD sE, 03
CALL spi_data
OUTPUT low, 0B
;---------RGBSET---------
LOAD sE, CE
CALL spi_cmd
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 00
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 02
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 04
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 06
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 08
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 0A
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 0C
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 0E
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 00
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 02
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 04
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 06
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 08
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 0A
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 0C
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 0E
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 00
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 04
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 08
CALL spi_data
OUTPUT low, 0B
;--------DATA--------
LOAD sE, 0c
CALL spi_data
OUTPUT low, 0B
CALL del20ms
LOAD s9, 01
OUTPUT s9, 06
loops: INPUT s4, 03
COMPARE high, s4
JUMP NZ, loops
ADD s9, 01
OUTPUT s9, 06
;---------DISPON---------
LOAD sE, AF
CALL spi_cmd
OUTPUT low, 0B
;---------TEST---------
LOAD sE, 2B
CALL spi_cmd
OUTPUT low, 0B
;---------04---------
LOAD sE, 04
CALL spi_data
OUTPUT low, 0B
;---------0B---------
LOAD sE, 0B
CALL spi_data
OUTPUT low, 0B
;---------TEST---------
LOAD sE, 2A
CALL spi_cmd
OUTPUT low, 0B
;---------02---------
LOAD sE, 02
CALL spi_data
OUTPUT low, 0B
;---------09---------
LOAD sE, 09
CALL spi_data
OUTPUT low, 0B
;---------WRMEM---------
LOAD sE, 2C
CALL spi_cmd
OUTPUT low, 0B
;--------RED---------
LOAD sE, FF
CALL spi_data
OUTPUT low, 0B
;--------RED---------
LOAD sE, F0
CALL spi_data
OUTPUT low, 0B
lops: INPUT s4, 03
COMPARE high, s4
JUMP NZ, lops
;---------VOLUP---------
LOAD sE, D6
CALL spi_cmd
OUTPUT low, 0B
ADD s9, 01
OUTPUT s9, 06
JUMP loops
end:
JUMP end
spi_cmd: OUTPUT low, 0A
OUTPUT sE, 09
OUTPUT high, 0B
s_done: INPUT sF, 0C
COMPARE high, sF
RETURN Z
JUMP s_done
spi_data: OUTPUT high, 0A
OUTPUT sE, 09
OUTPUT high, 0B
s_done2: INPUT sF, 0C
COMPARE high, sF
RETURN Z
JUMP s_done2
delms: INPUT s0,07
delmslp:INPUT s1,07
COMPARE s0,s1
JUMP Z, delmslp
RETURN
del20ms: LOAD s2, F5 ; 255 - 10 = 245
del20mslp: CALL delms
ADD s2, 01
JUMP NZ, del20mslp
RETURN
When executing this code on the board Im only getting a black (+a little illuminating background). I was expecting to see some coloured pixels.
Hope you can help me on the right way with this display
Thanks