element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Forum Need an example of  SPI- TFT touchscreen for pocketbegle
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
BeagleBoard requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 14 replies
  • Answers 5 answers
  • Subscribers 97 subscribers
  • Views 3970 views
  • Users 0 members are here
  • TFT LCD
  • pocketbeagle
  • linux
Related

Need an example of  SPI- TFT touchscreen for pocketbegle

chrischristian14
chrischristian14 over 3 years ago

Hi, I am after adding a touchscreen TFT display to pocketbeagle.

I am already using I/O in C via iobb library, so I am not sure if using a TFT LCD with fbtft driver will conflict with iobb.

There are lot of LCDs available for RPi which should work for pocketbeagle but I am not sure

- How to install fbtft driver - as a module, not built with kernel, I mean use insmod after bootup

- How to modify the driver to tell it to use a specific SPI connectors and how to make sure the driver doesn't mess up existing I/O configuration.

- What are the steps to redirect Xfce environment to the LCD

- And of course the hardware connection.

 

Thanks

  • Sign in to reply
  • Cancel

Top Replies

  • shabaz
    shabaz over 3 years ago in reply to chrischristian14 +2 suggested
    Hi Chris, Are you sure about this, because it seems odd to me that a GPU is needed for a driver for SPI to read the normal framebuffer. I'm no expert on it either, so don't want to mislead you if you're…
  • geralds
    geralds over 3 years ago in reply to chrischristian14 +2
    Hi, please look here: Home - Nextion Nextion displays may a solution. They have a controller and communicate via serial connections. But.... it is not cheap because you need something to realise your application…
  • chrischristian14
    chrischristian14 over 3 years ago in reply to geralds +2
    Thanks Gerald, I'll check it out.
Parents
  • chrischristian14
    0 chrischristian14 over 3 years ago

    It seems pocketbeagle can't work with lcd because there is no GPU, so there is no way to have a full desktop environment on LCD.

    Should I use beaglebone instead ? I managed to get he VNC working and access the GUI desktop that way but, I really need LCD.

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • chrischristian14
    0 chrischristian14 over 3 years ago in reply to chrischristian14

    After long time I managed to get back on to this project, I am trying

    https://github.com/danjulio/lepton/tree/master/pocketbeagle/littlevgl_demo

    with this LCD http://www.lcdwiki.com/2.8inch_RPi_Display

    I edited the demo c code in the first link to only initaliize LCD and not the touch screen, as I am first focusing only on the LCD part, however all I get the white blank screen (because of backlight), I am adding the modified main.c here

    #include "lvgl/lvgl.h"
    #include "lv_drivers/display/fbdev.h"
    #include "lv_drivers/indev/evdev.h"
    #include "lv_examples/lv_apps/demo/demo.h"
    #include <unistd.h>
    
    #define DISP_BUF_SIZE (320*240*2)
    
    int main(void)
    {
    	/*LittlevGL init*/
    	lv_init();
    
    	/*Linux frame buffer device init*/
    	fbdev_init();
    
    	/*Linux touchscreen device init*/
    //	evdev_init();
    
    	/*A small buffer for LittlevGL to draw the screen's content*/
    	static lv_color_t buf1[DISP_BUF_SIZE];
    	static lv_color_t buf2[DISP_BUF_SIZE];
    
    	/*Initialize a descriptor for the buffer*/
    	static lv_disp_buf_t disp_buf;
    	lv_disp_buf_init(&disp_buf, buf1, buf2, DISP_BUF_SIZE);
    
    	/*Initialize and register a display driver*/
    	lv_disp_drv_t disp_drv;
    	lv_disp_drv_init(&disp_drv);
    	disp_drv.buffer = &disp_buf;
    	disp_drv.flush_cb = fbdev_flush;
    	lv_disp_drv_register(&disp_drv);
    
    	/*Initialize and register an input device*/
    	/*
    	lv_indev_drv_t indev_drv;
    	lv_indev_drv_init(&indev_drv);
    	indev_drv.type = LV_INDEV_TYPE_POINTER;
    	indev_drv.read_cb = evdev_read;
    	lv_indev_t * my_indev = lv_indev_drv_register(&indev_drv);
    	*/
    
    	 /*Create demo*/
    	demo_create();
    
    	/*Handle LitlevGL tasks (tickless mode)*/
    	while(1) {
    		lv_tick_inc(5);
    		lv_task_handler();
    		usleep(5000);
    	}
    
    	return 0;
    }

    Unfortunately I can't find a simple helloworld  over SPI for the LCD chip ILI9341 as shabaz mentioned before, that would have been a good start but the only example that is simple enough is the above one. The worst case would be to go through datasheet of ILI9341 and write the code from scratch.

    Can anyone please see the above link and my modified code ? If you have any tips it will be great before I start from scratch.

    p.s. : Upon running demo code I can see the framebuffer driver is loaded successfully, and I have checked the connections multiple times.

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • chrischristian14
    0 chrischristian14 over 3 years ago in reply to chrischristian14

    After long time I managed to get back on to this project, I am trying

    https://github.com/danjulio/lepton/tree/master/pocketbeagle/littlevgl_demo

    with this LCD http://www.lcdwiki.com/2.8inch_RPi_Display

    I edited the demo c code in the first link to only initaliize LCD and not the touch screen, as I am first focusing only on the LCD part, however all I get the white blank screen (because of backlight), I am adding the modified main.c here

    #include "lvgl/lvgl.h"
    #include "lv_drivers/display/fbdev.h"
    #include "lv_drivers/indev/evdev.h"
    #include "lv_examples/lv_apps/demo/demo.h"
    #include <unistd.h>
    
    #define DISP_BUF_SIZE (320*240*2)
    
    int main(void)
    {
    	/*LittlevGL init*/
    	lv_init();
    
    	/*Linux frame buffer device init*/
    	fbdev_init();
    
    	/*Linux touchscreen device init*/
    //	evdev_init();
    
    	/*A small buffer for LittlevGL to draw the screen's content*/
    	static lv_color_t buf1[DISP_BUF_SIZE];
    	static lv_color_t buf2[DISP_BUF_SIZE];
    
    	/*Initialize a descriptor for the buffer*/
    	static lv_disp_buf_t disp_buf;
    	lv_disp_buf_init(&disp_buf, buf1, buf2, DISP_BUF_SIZE);
    
    	/*Initialize and register a display driver*/
    	lv_disp_drv_t disp_drv;
    	lv_disp_drv_init(&disp_drv);
    	disp_drv.buffer = &disp_buf;
    	disp_drv.flush_cb = fbdev_flush;
    	lv_disp_drv_register(&disp_drv);
    
    	/*Initialize and register an input device*/
    	/*
    	lv_indev_drv_t indev_drv;
    	lv_indev_drv_init(&indev_drv);
    	indev_drv.type = LV_INDEV_TYPE_POINTER;
    	indev_drv.read_cb = evdev_read;
    	lv_indev_t * my_indev = lv_indev_drv_register(&indev_drv);
    	*/
    
    	 /*Create demo*/
    	demo_create();
    
    	/*Handle LitlevGL tasks (tickless mode)*/
    	while(1) {
    		lv_tick_inc(5);
    		lv_task_handler();
    		usleep(5000);
    	}
    
    	return 0;
    }

    Unfortunately I can't find a simple helloworld  over SPI for the LCD chip ILI9341 as shabaz mentioned before, that would have been a good start but the only example that is simple enough is the above one. The worst case would be to go through datasheet of ILI9341 and write the code from scratch.

    Can anyone please see the above link and my modified code ? If you have any tips it will be great before I start from scratch.

    p.s. : Upon running demo code I can see the framebuffer driver is loaded successfully, and I have checked the connections multiple times.

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube