What are you optimising at the moment? It seems quite fast when changing pages/scrolling the file listings, but decoding/displaying the bitmaps seem to take time. Is it reading the SD card that is slow, or sharing SPI with the LCD and SD card.
The LCD is not SPI but a 16Bit parallel bus. Its reading the SD Card thats taking the time. This LCD is 128*160 and so a full image is: (the 3 is Red,Green,Blue)
(128×160)3 = 61440 Bytes
So to load 1 image i have to read 61440 bytes from SD card. I have a buffer setup to read 1152 bytes at a time which is a lot. But the SPI0 only works at 6mhz so its slow on the SPI side. If i rewire it all i can use SPI1 which is 25mhz but then i have to recode the LCD part because SPI1 is in the middle of entire data bus like…
SPI1 are pins 14,19,20,21 and since the LCD is 16bits i would have to shift the data around to skip pin 14 and not hit pins 19:21.
its a small hassle but i will do it on v2 which i will make in a couple days.
What are you optimising at the moment? It seems quite fast when changing pages/scrolling the file listings, but decoding/displaying the bitmaps seem to take time. Is it reading the SD card that is slow, or sharing SPI with the LCD and SD card.
The LCD is not SPI but a 16Bit parallel bus. Its reading the SD Card thats taking the time. This LCD is 128*160 and so a full image is: (the 3 is Red,Green,Blue)
(128×160)3 = 61440 Bytes
So to load 1 image i have to read 61440 bytes from SD card. I have a buffer setup to read 1152 bytes at a time which is a lot. But the SPI0 only works at 6mhz so its slow on the SPI side. If i rewire it all i can use SPI1 which is 25mhz but then i have to recode the LCD part because SPI1 is in the middle of entire data bus like…
SPI1 are pins 14,19,20,21 and since the LCD is 16bits i would have to shift the data around to skip pin 14 and not hit pins 19:21.
its a small hassle but i will do it on v2 which i will make in a couple days.