Rhab 1 Posted August 31, 2015 Share Posted August 31, 2015 (edited) I think i have SPI Which protocol-example? protocol100 or protocol_Terminal? if i choose protocol Termina and #define K35_SPI i get this compilation-error: In file included from /home/patrick/sketchbook/libraries/LCD_screen/Screen_ILI9340.cpp:22:0: /home/patrick/sketchbook/libraries/LCD_screen/Screen_ILI9340.h:73:17: fatal error: spi.h: No such file or directory #include "spi.h" ^ compilation terminated. i don't understand why Screen_ILI9340.h is used... what am i doing wrong? EDIT: ok found a solution and was able to compile and upload: i had to replace #include "spi.h" with #include "SPI.h" or #include <SPI.h> in Screen_ILI9340.h, screen_ST7735.h and Template_screen_font.h then it worked... what i now can see is a bright screen, is this what i should see? and i have a terminal-output: *** LCD_protocol (All times in ms) LCD_screen release 225 begin... done Kentec 3.5" SPI screen 320x240 --- Points(128) 7573 feedArea 398 Ratio% 1902 fps(256^2) -0.5 sp1000f(256^2) 1904.8 Square(200) 953 Square(100) 239 Square(50) 60 Font Number 4 Font Average 34 No storage No storage No storage No storage 10xFontSolid(true) 4975 10xFontSolid(false) 4543 Ratio% 109 Original(=1) 136 point(readPixel()) Not readable copyPaste() Not readable copyArea()+pasteArea() SD/SRAM No storage Touch --- Edited August 31, 2015 by Rhab Quote Link to post Share on other sites
Rei Vilo 695 Posted August 31, 2015 Author Share Posted August 31, 2015 Glad you've found a solution. So you're using the SPI version of the Kentec 3.5" screen. By default, Energia seems to compile all the files in the folder of the library, hence the Screen_ILI9340.h. The SPI.h capitalisation issues comes from older releases of Energia. Now SPI is always capitalised. White screen... that's strange. Have you checked the jumpers on the BoosterPack are configured in 4-wire 8-bit SPI? Rhab 1 Quote Link to post Share on other sites
Rhab 1 Posted August 31, 2015 Share Posted August 31, 2015 i am pretty sure that the boosterpack is connected well. i can read the x/y coordinates and print them to terminal: while (counter) { if (myScreen.getTouch(x, y, z)) { x = checkRange(x, 1, myScreen.screenSizeX()-2); y = checkRange(y, 1, myScreen.screenSizeY()-2); myScreen.dRectangle(x-1, y-1, 3, 3, myColours.yellow); Serial.print("x:\t"); Serial.print(x, DEC); Serial.print(" /\t y:\t"); Serial.println(y, DEC); counter--; } } how to check the jumpers? Quote Link to post Share on other sites
Rei Vilo 695 Posted August 31, 2015 Author Share Posted August 31, 2015 See the data-sheet of the screen at http://www.ti.com/lit/pdf/slau601'>BOOSTXL-K350QVG-S1 QVGA Display BoosterPack Quote Link to post Share on other sites
Rhab 1 Posted August 31, 2015 Share Posted August 31, 2015 ok... i don't understand much (i am not good with hardware) but By default the BOOSTXL-K350QVG-S1 comes configured as a "4-wire" 8-bit SPI. and i did not change anything, so it should be ok right? Quote Link to post Share on other sites
Rei Vilo 695 Posted August 31, 2015 Author Share Posted August 31, 2015 Ok, that's fine! Quote Link to post Share on other sites
Rhab 1 Posted August 31, 2015 Share Posted August 31, 2015 i am very desperate, i have to finish a project with this display... but a white screen is not what i wanted... any ideas how to check if they sold me a broken screen? Quote Link to post Share on other sites
Rei Vilo 695 Posted August 31, 2015 Author Share Posted August 31, 2015 Check the pin maps of the LaunchPad TM4C and Kentec 3.5" SPI BoosterPack, there's a catch! Hint 1: TM4C123 LaunchPad Pins Map Hint 2: 0? jumpers Hint 3: Read Some Misconceptions about Libraries Hint 4: Quote Link to post Share on other sites
Rhab 1 Posted September 1, 2015 Share Posted September 1, 2015 Sorry but i don't find the catch. I studied both pin-maps... seems to be allrigth... can't find any catch I think i found a 0 ? jumper R9 (but as i told before, i am not good with hardware) but i don't know what this means, i think this should be ok because it is needed for 4-wire SPI, 8-bit rigth? Do i Have to rename some PINS? I did not find the document where they are named... and i don't understand hint 4 sorry for beeing that incapable Quote Link to post Share on other sites
Rei Vilo 695 Posted September 1, 2015 Author Share Posted September 1, 2015 That's the way for learning! The LaunchPad TM4C has two 0 ? resistors R9 and R10. R9 connects pin 23 to 14 and R10 connects pin 24 to 15. Rhab 1 Quote Link to post Share on other sites
Rei Vilo 695 Posted September 1, 2015 Author Share Posted September 1, 2015 The solution was clearly described at http://www.kentecdisplay.com/uploads/soft/Products_spec/BOOSTXL-K350QVG-S1_UserGuide_04.pdf. Reading the data-sheets is key for electronics. Ask your teacher to focus on that point. Rhab 1 Quote Link to post Share on other sites
Rhab 1 Posted September 1, 2015 Share Posted September 1, 2015 Thanks. If i want to use touch, option 2 is not possible, but i want to try if it works before "destroying" my hardware... but i don't now what to comment... the function void Screen_K35_SPI::_getRawTouch(uint16_t &x0, uint16_t &y0, uint16_t &z0) has no content i think... Quote Link to post Share on other sites
Rei Vilo 695 Posted September 1, 2015 Author Share Posted September 1, 2015 Comment the function of delete it. Quote Link to post Share on other sites
Rhab 1 Posted September 1, 2015 Share Posted September 1, 2015 this leads to compilation error: LCD_protocol_Terminal_test.cpp:125:16: error: cannot declare variable 'myScreen' to be of abstract type 'Screen_K35_SPI' Screen_K35_SPI myScreen; ^ In file included from LCD_protocol_Terminal_test.cpp:124:0: /home/patrick/sketchbook/libraries/LCD_screen/Screen_K35_SPI.h:76:7: note: because the following virtual functions are pure within 'Screen_K35_SPI': class Screen_K35_SPI : public LCD_screen_font { ^ In file included from /home/patrick/sketchbook/libraries/LCD_screen/Screen_K35_SPI.h:62:0, from LCD_protocol_Terminal_test.cpp:124: /home/patrick/sketchbook/libraries/LCD_screen/LCD_screen_font.h:545:18: note: virtual void LCD_screen_font::_getRawTouch(uint16_t&, uint16_t&, uint16_t&) virtual void _getRawTouch(uint16_t &x0, uint16_t &y0, uint16_t &z0) =0; // compulsory ^ comment virtual void LCD_screen_font::_getRawTouch(uint16_t&, uint16_t&, uint16_t&) leads to /home/patrick/sketchbook/libraries/LCD_screen/Screen_K35_SPI.cpp: In member function 'virtual void Screen_K35_SPI::begin()': /home/patrick/sketchbook/libraries/LCD_screen/Screen_K35_SPI.cpp:292:28: error: '_getRawTouch' was not declared in this scope _getRawTouch(x0, y0, z0); ^ /home/patrick/sketchbook/libraries/LCD_screen/Screen_K35_SPI.cpp: At global scope: /home/patrick/sketchbook/libraries/LCD_screen/Screen_K35_SPI.cpp:519:75: error: no 'void Screen_K35_SPI::_getRawTouch(uint16_t&, uint16_t&, uint16_t&)' member function declared in class 'Screen_K35_SPI' void Screen_K35_SPI::_getRawTouch(uint16_t &x0, uint16_t &y0, uint16_t &z0) and so on, thats why i tried another way... i changed "#define TOUCH_YP 24" to "#define TOUCH_YP 25" , compilation was no problem but i had again a white screen... so i went through all the errors and commented every getRawTouch... and it seems to work, but now the screen is flickering in multi-coulours before beeing white again... is this what i should see? Quote Link to post Share on other sites
Rei Vilo 695 Posted September 1, 2015 Author Share Posted September 1, 2015 The screen shouldn't flicker. Are you sure pin 24 isn't initialised somewhere else? The official solution provided at http://www.kentecdis...serGuide_04.pdf is very clear: 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.