kamocat Posted September 3, 2018 Report Share Posted September 3, 2018 Hi, I'm having trouble getting a display to work with uGFX. It's Adafruit's Raspberry pi 2.8" display, which uses an ili9341 over SPI. I am fairly confident that SPI is working, and that my wiring is correct. However, I'm not seeing anything show up on the screen. (My main.c uses the gdisp/basic demo, with a blinking LED in a seperate thread) So, I think there must be an issue with my board_ILI9341.h. Does it seem normal? I have it set up as simple as I could. I even dropped the clock speed all the way down. I did change the data and index variables to 8-bit integers, since it appeared it was 8-bit data being transferred into them in ili9341.c. Any ideas? board_ILI9341.h main.c chconf.h gfxconf.h halconf.h Makefile mcuconf.h Link to comment Share on other sites More sharing options...
kamocat Posted September 5, 2018 Author Report Share Posted September 5, 2018 Well, I made a simple test to see if i'm actually writing data to the display. It turns out I am. At least, something is getting through. int main(void) { int color = 0; gfxInit(); write_index( 0, 0x2C ); // Write to frame memory while( true ) { write_data( 0, color ); ++color; chThdSleepMilliseconds(100); } } What shows up on the screen is dark grey for 1s (with vertical lines), light grey for 18s (with vertical lines), and white for 3s. What I was expecting was a rainbow of colors. Hmm. I even slowed it down to be sure I wasn't overwriting the whole screen. Now say I change it to write the whole color word. You would think that would change the width of the lines, or something. But no change. while( true ) { write_data( 0, color>>8 ); write_data( 0, color & 0xFF ); ++color; chThdSleepMilliseconds(100); } So, I'm confused here. Something is clearly happening, but not what I expect. I can't blame the uGFX library - I'm below that level, just trying to write data to the screen. Maybe this actually is supposed to be a 16-bit write? Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted September 6, 2018 Report Share Posted September 6, 2018 Use the forum seach. You'll find that a lot of ILIxxcx users experience these kind problems. I've made a very verbose forum post about this just a few days ago. You'll find a lot of content about that. Link to comment Share on other sites More sharing options...
kamocat Posted September 6, 2018 Author Report Share Posted September 6, 2018 I see. That's kind-of funny. This one has read support. I'll try to get info back from it, and see if it says it's the display I think it is. Next I'll try a display that's really a knockoff. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted September 7, 2018 Report Share Posted September 7, 2018 well the most important thing is checking/changing the initialization sequence. Link to comment Share on other sites More sharing options...
kamocat Posted September 7, 2018 Author Report Share Posted September 7, 2018 I found the issue. I had the D/C pin polarity backwards. I finally noticed when I was reading the datasheet for my other display. Data is HI. Control is LOW. Oops. So, now I have it running beautifully on SPI at 21 MHz. A whole screen refresh takes about 0.5 seconds - not surprising, since it's a lot of data. Thanks for your patience. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted September 8, 2018 Report Share Posted September 8, 2018 Glad to hear that you managed to get it working! 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