| Electronics > Projects, Designs, and Technical Stuff |
| My cheap controller for 320x240 LCD |
| (1/3) > >> |
| rhodges:
I recently opened up a box of 320x240 LCD modules. They do not have controllers, just row and column drivers. Some years back, I made a controller using a PIC microcontroller and a 4-bit serial RAM chip. Why not see what I can do with my latest friend, the STM8S family? There is clearly not enough RAM for a graphic bitmap (9600 bytes), but the STM8S103 has enough for a 20x40 ASCII framebuffer (800 bytes). And there is enough flash memory for 256 font characters of 8x12. Does it have the speed to feed the LCD? The LCD needs at least 60 hz refresh, one new row loaded every 69 microseconds. That is 80 4-biit nybbles per row. And after looking up the pixels in the font table. Yes, it can! With 15 to 18 uSeconds to spare. I have a writeup and source code on Github: https://github.com/unfrozen/stm8_lcd_320x240/wiki https://github.com/unfrozen/stm8_lcd_320x240 --- Quote ---The font map is 256 characters, 12 pixels high and 8 wide. 96 are the usual ASCII characters. Six are line segments and corners for drawing rectangles. And 64 characters are pseudo-graphic building blocks with the 12x8 characters divided into six blocks of 4 pixels square. The library includes a function to plot these dots anywhere in the 80x60 dot area of the LCD. --- End quote --- Why did I do this project when I only have 25 of these? (And they need -21 volts for contrast?) For the satisfaction of doing it! |
| Darkwing:
Congrats, that's cool! :-+ I wished, I could already do stuff like this. ;) Btw: You should add a licence to your GitHub projects, to let people know whether they can use them. |
| rhodges:
Good point, thanks. Since I do have 25 of them, I will make the offer to send some to any interested people here. |
| james_s:
That is pretty cool, seems like driving one of those would make a good FPGA project. I have too many projects on my plate already though. |
| rhodges:
It probably would make a good FPGA project. War story follows. ;D Two and a half decades ago, I made a controller for the Hitachi LM215 out of a Z80, 62256 SRAM, 27256 EPROM, and some logic. We were using the LM213 LCD which had its own controller and worked fine. But it cost $60 or $70 each. I found a huge surplus of the LM215 for dollars each, so this looked like a great deal. But the LM215 did not have a controller. And a controller card cost something like $50 each. The Hitachi LM215 is the work of the devil. The display is divided into 4 quadrants, each 64x128 if I remember right. The controller had to send four pixels at a time, ONE FOR EACH QUADRANT. So the memory map was a complete mess. My controller "worked" and had a good display, but mangling the pixels was too much work for the Z80, which was spending most of its time refreshing the pixel rows. So close, yet so far away. This display has the decency to go top to bottom, left to right :-+ |
| Navigation |
| Message Index |
| Next page |