chicken 630 Posted October 18, 2012 Share Posted October 18, 2012 I implemented a Stellaris grlib display driver for Adafruit's 320x240x18 TFT Touch display. http://adafruit.com/products/335 The code can be found on github https://github.com/a...uit-TFT-ILI9325 I tested it only with Lab 10 in the Stellaris Launchpad workshop (w/o touch). Please let me know if you run into issues and I'm glad to fix it. Wiring is a mess as the pins of individual ports are all over the place. Regards Adrian xpg and bluehash 2 Quote Link to post Share on other sites
bluehash 1,581 Posted October 18, 2012 Share Posted October 18, 2012 Thanks chicken. Do you have a pic to share. That would be great! Quote Link to post Share on other sites
chicken 630 Posted October 18, 2012 Author Share Posted October 18, 2012 Added picture to the original post. I'm tempted to do a little breakout booster pack before fixing touch as there's a lot of noise thanks to the messy cabling. Quote Link to post Share on other sites
bluehash 1,581 Posted October 18, 2012 Share Posted October 18, 2012 Are you running the display in parallel? Or spi serial Quote Link to post Share on other sites
chicken 630 Posted October 18, 2012 Author Share Posted October 18, 2012 Parallel, I think it's called "8080-style" interface. 8 data lines and 4 control lines (CS, C/D, read strobe, write strobe) Quote Link to post Share on other sites
xpg 127 Posted October 18, 2012 Share Posted October 18, 2012 That looks really great. I'm really tempted to get one of those displays. It looks like being of a good quality, and touch built-in is really neat. Quote Link to post Share on other sites
bluehash 1,581 Posted October 18, 2012 Share Posted October 18, 2012 That looks really great. I'm really tempted to get one of those displays. It looks like being of a good quality, and touch built-in is really neat. Rob is building a similar one in the other thread. Quote Link to post Share on other sites
xpg 127 Posted October 18, 2012 Share Posted October 18, 2012 Rob is building a similar one in the other thread. I saw that one as well, yes. But the display doesn't have any touch-layer as far as I can see, and that would be really sweet. So many options are nice, but at some point I have to make a choice :-) Quote Link to post Share on other sites
bluehash 1,581 Posted October 18, 2012 Share Posted October 18, 2012 I saw that one as well, yes. But the display doesn't have any touch-layer as far as I can see, and that would be really sweet. So many options are nice, but at some point I have to make a choice :-) He's working on it. gwdeveloper 1 Quote Link to post Share on other sites
xpg 127 Posted October 18, 2012 Share Posted October 18, 2012 He's working on it. Ohh, I somehow missed that. Thanks. Quote Link to post Share on other sites
chicken 630 Posted October 21, 2012 Author Share Posted October 21, 2012 I just committed an updated version to Github that fixes a glaring bug and adds touch calibration - Bug: Forgot to toggle CS in most places, dooh! (a miracle it ever worked :-) - Addition: Functions to calibrate touch display. After calibration the StellarisWare touch implementation works just fine with this display bluehash 1 Quote Link to post Share on other sites
chicken 630 Posted April 3, 2013 Author Share Posted April 3, 2013 I won't have time to look into it any time soon. But I think the Stellaris Launchpad shares the pins (and possibliy peripherals) for SPI and I2C, which would mean that you can't use both at the same time. Quote Link to post Share on other sites
chicken 630 Posted April 5, 2013 Author Share Posted April 5, 2013 Sorry, but I think I led you down the wrong path. Looking at my code, I actually don't use SPI. The display uses 8 lines to transfer bytes in parallel. The macro LCD_DATA_WRITE writes one byte to Port B. // Port and bitmask used for 8-bit data bus #define LCD_DATA_PERIPH SYSCTL_PERIPH_GPIOB #define LCD_DATA_BASE GPIO_PORTB_BASE #define LCD_DATA_PINS 0xFF #define LCD_DATA_WRITE(ucByte) { HWREG(LCD_DATA_BASE + GPIO_O_DATA + (LCD_DATA_PINS << 2)) = (ucByte); } HWREG is a method for fast access to memory mapped registers, which is a bit cryptic and I might have an error in here that causes the code to overwrite other locations than Port B. What pins is your I2C sensor connected to? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.