crteensy Posted November 27, 2015 Report Share Posted November 27, 2015 When implementing send_data(uint16_t data) for the ILI9341, is it supposed to send just 8 bits? If so, should the 8 MSBs or the 8 LSBs be sent?The encoding of the comments for that function and write_index() seems to be broken.and please please please turn off that filter:The following words in your search query were ignored because they are too common words: ili9341Regards,Christoph Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted November 28, 2015 Report Share Posted November 28, 2015 When implementing send_data(uint16_t data) for the ILI9341, is it supposed to send just 8 bits? If so, should the 8 MSBs or the 8 LSBs be sent?You always have to sent 16-bits. The implementation depends on whether you use the controller in 8-bit or in 16-bit mode. In 16-bit mode you just write the word to the bus and you are done. In case of 8-Bit mode you will write the high-byte first and then the low-byte. Here are two example implementations for the ILI9341 that we are using successfully:// ILI9342 in 8-bit modestatic inline void write_pixel(GDisplay* g, uint16_t pixel) { (void) g; LCD_DATA = (uint8_t)((pixel >> 8)); LCD_DATA = (uint8_t)((pixel >> 0));}// ILI9342 in 16-bit modestatic inline void write_pixel(GDisplay* g, uint16_t pixel) { (void) g; LCD_DATA16 = pixel;}Note that we hooked up our display controller to the FSMC peripheral of an STM32 CPU and therefore the timings are taken care of through the timings configuration.and please please please turn off that filter:The following words in your search query were ignored because they are too common words: ili9341Done.~ Tectu Link to comment Share on other sites More sharing options...
crteensy Posted November 28, 2015 Author Report Share Posted November 28, 2015 I've seen the fsmc code. however, I'd like to use it in 4-wire SPI mode because my display pcb only breaks out those pins and that's why looked for other files related to that chip.I'll have a close look at the datasheet as well Link to comment Share on other sites More sharing options...
inmarket Posted November 28, 2015 Report Share Posted November 28, 2015 The Mikromedia STM32 M4 board uses the ILI9341 in SPI mode (I think). If not the STM32F429iDiscovery uses that chip (but initialised in a strange way) in SPI mode. For the discovery board you can find that code in the board_STM32LTDC.h file as it is only used to initialise the display before the LTDC controller takes over.Although the code might be different at least the way it uses the bus should be the same. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now