http://www.ebay.com/itm/1-8-128-160-SPI ... 20ecc8ee25
http://sfcompiler.co.uk/phpBB3/viewtopi ... &hilit=TFT
Thats the same one I got (driver is ST7735). The nomenclature is a bit confusing, since I am used to using SCLK and SDA for I2C and Not SPI. I am more used to seeing SCLK, MOSI and MISO for SPI. Any way. I'm giving the code I found a shot. According to the source, RS (Im guessing is reset) goes to pin 1, RW goes to D/C, CS to CS and SCK and SDA to their perspective pins. It seems however that according to my scope, the clock is wayyy to fast for the data. It also seems that the original author is using software I2C (SPI?). I am almost tempted to rewrite the Driver (ST7735) to use hardware SPI.
Anyway. I cant get the display to do much of nothing, other than be a bright flashlight. Here is my code. Maybe I'm missing something. Any help will be greatly appreciated .
Code: Select all
Device = 18F2410 Clock = 8 Include "IntOSC.bas" Include "TFT.bas" Include "TftGraphic.bas" Include "Arial.bas" #option TFT_MODEL = ST7735 While true Tft.SetPenColor (255,255,255) Tft.Cls() Tft.FillRect(0,0,128,160) // Tft.SetFont(Arial) //Tft.SetBrushColor = BrushColor.Clear // Tft.WriteAt(10,10,"Verdana") Wend