I suppose so, but both Coccoliso and bitfogav have a lot more experience with the graphics stuff than I do, so they might know better than I.Is there a way to use Hardware SPI with this (without modifying code too much)?
Sometimes these chips don't like faster speeds, and running SPI down a long wire isn't the best of arrangements.
Anyway, code-wise it looks like you would replace the routines in the driver with:
Code: Select all
Public Sub WriteCommand (pData As Byte)
_rw=0
_cs=0
SPI.WriteByte(pData)
'_cs=1
End Sub
Public Sub WriteData (pData As Byte)
_rw=1
_cs=0
SPI.WriteByte(pData)
_cs=1
End Sub
Public Sub WriteWordData (pData As Word)
_rw=1
_cs=0
SPI.WriteByte(pData.byte1)
SPI.WriteByte(pData.byte0)
_cs=1
End Sub
You'd have to change the connections to use the SPI RC3 (SCK) and RC5 (SDO) pins. Add code to init the SPI driver, and make sure the new pins are in digital mode.
Not sure if there's anything else needed... maybe somebody else has tried this already.