Hello.
I'm trying to connect GT21L16S2Y Font ROM IC to PIC16F886.
I have soldered connections, but have not written code yet, because this chip has separate IN/OUT pins for SPI.

Below is the draft code which I think should work (have not tried it yet).

Code:
SCLK	VAR	PORTB.5 'CLOCK
TC	VAR	PORTC.0 'TO CHIP - WRITE
FC	VAR	PORTC.6 'FROM CHIP - READ
RST	VAR	PORTB.4 'RESET
I VAR BYTE 'COUNTER VAR
X VAR BYTE 'TEMP VAR
FONT VAR BYTE [8] 'FONT ARRAY






Reader: 'Font reading outline
LOW RST         ' Ready for transfer
   Shiftout TC, SCLK, 5, [$03,$0] ' Send write command, set start offset 
For I=0 to 7 'read 8 bytes of data
   Shiftin FC, SCLK, 5, [x]
FONT[I]=X 'WRITE TO ARRAY
next
HIGH RST        ' Reset IC
Return
And here is screenshot from the datasheet. It is in chinese, but diagrams show things clearly.

So I'm on the proper way or not?

Name:  GTL.jpg
Views: 483
Size:  419.7 KB