| Electronics > Projects, Designs, and Technical Stuff |
| LCD display interface 4-bit vs 8 bit vs SPI |
| (1/2) > >> |
| ricko_uk:
Hi, with ref to the attached alphanumeric display, it has 3 interfaces available 4-bits, 8-bits and SPI. 1) Assuming you have plenty of pins and also SPI available on the micro, which one would you choose and why? 2) why do they have an 8-bits interface when if you want to use parallel then the 4-bits offer the same and save pcb traces? I don't think it is for speed reasons because the amount of data is so tiny even in the worst case scenario. Maybe that's not the case? Maybe for fast display update for fast animations? Even then the maximum refresh speed required to perceive smooth animation is only 30 to 50 Hz... Thank you :) |
| T3sl4co1l:
Handy to toss on a bus? Oh, hey, it's HD44780 compatible, isn't it -- command set and everything? Though a lot slower, at 600us max per instruction... which is pretty disgusting to write 80 characters in one go, that's a 20 FPS refresh rate? Yuck... Hopefully it can go faster on some operations, but who knows... So that, and they've tacked on SPI too, which is nice. I recently did a project with a parallel bus to RAM and DAC; the display was HD44780 based anyway, and I didn't have many spare IOs after allocating the bus, so it was a natural fit. It would be hard to do serial (DAC, display or other things) on that particular project, but with more pins available it would've been fine. If on the other hand, you're doing just a lot of stuff with the GPIOs, and can't easily afford to multiplex them -- saving a few pins here and there with a serial bus is an excellent idea. Tim |
| thm_w:
What is the maximum SPI speed of the display, and of your controller? If that is enough to reach the required refresh rate then go with that. Since it is a character display it seems likely. In some cases SPI will not let you read display memory. Or have other limitations that would make you want to use 4/8bit. I don't know specifically why they offer both 4 and 8, but it gives the most flexibility. Some displays will offer I2C/SPI/parallel even. Maybe legacy compatibility. |
| jpanhalt:
There is virtually no difference in speed between 4-bit and 8-bit interfaces. 8-bit just requires more wires/port pins. The biggest difference between the serial and 4-bit is whether the screen and busy pin can be read with a serial interface. For a lot, perhaps the vast majority of such devices, that is not possible. I didn't spend a lot of time on your datasheet. It does not appear you can read the busy pin or the display ram. For a character display, reading the display is relatively unimportant. I do have routines to clear "rest of line" which read the display. Reading the busy flag can speed things up a tiny bit. If you do any sort of graphics (I realize it is a character display), then reading the display can be a bigger help as you can read, modify, and write. For a character display, I would use the 4-bit parallel or SPI interface depending on whichever you are more comfortable with and how many pins your MCU has to spare. |
| mariush:
Could be spi input uses a microcontroller to convert spi to 4 bit or 8 bit and route it to the actual lcd driver that talks hd44780 You get the processing latency of the micro PLUS the latency of the actual lcd driver. As for 8bit vs 4 bit ... 4 bit saves io pins, but twice as slow ... from memory i think it's at least 100ns per update ... so 200ns vs 100ns for every character. |
| Navigation |
| Message Index |
| Next page |