Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working on original Pi model B with Adafruit 2.8 inch resistive screen #312

Open
xunker opened this issue Sep 14, 2023 · 0 comments
Open

Comments

@xunker
Copy link

xunker commented Sep 14, 2023

Just a note that I have got your tool working on my original (2011.12) Pi Model B. Thank you for putting all the effort in to making it work!

Test System

Video Modes

Here are the video modes I've tested, along with the applicable lines from /boot/config.txt.

512x342 (for Mac Plus/Mini vMac), 10 fps

gpu_mem=32 # optional, just to free up memory
hdmi_cvt=512 342 10 1 0 0 0 # [width] [height] [framerate] [aspect] [margins] [interlace] [rb]
hdmi_group=2
hdmi_mode=87

640x480, 10 fps

gpu_mem=32 # optional, just to free up memory
hdmi_cvt=640 480 10 1 0 0 0 # [width] [height] [framerate] [aspect] [margins] [interlace] [rb]
hdmi_group=2
hdmi_mode=87

800x600

hdmi_group=2
hdmi_mode=9

1024x768

hdmi_group=2
hdmi_mode=16

Build options

Here are the options I used:

# DMA
cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DADAFRUIT_ILI9341_PITFT=ON \
      -DBACKLIGHT_CONTROL=OFF -DSINGLE_CORE_BOARD=ON \
      -DARMV6Z=ON -DSTATISTICS=0 \
      -DUSE_DMA_TRANSFERS=ON -DDMA_RX_CHANNEL=4

# Non-DMA
cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DADAFRUIT_ILI9341_PITFT=ON \
      -DBACKLIGHT_CONTROL=OFF -DSINGLE_CORE_BOARD=ON \
      -DARMV6Z=ON -DSTATISTICS=0 -DUSE_DMA_TRANSFERS=OFF

On my machine, the the default RX DMA channel was used, and 4 was the next channel that worked.

I haven't tried backlight control yet, that the reason for -DBACKLIGHT_CONTROL=OFF.

Installation Notes

I used the systemd install instructions, but needed to do a couple of things extra:

  • symlink "/etc/systemd/system/fbcp-ili9341.service" in to "/etc/systemd/system/multi-user.target.wants"
    • cd /etc/systemd/system/multi-user.target.wants; sudo ln -s /etc/systemd/system/fbcp-ili9341.service
  • install the executable in the system path
    • sudo install -m 0755 -t /usr/local/sbin fbcp-ili9341

After those two extra steps, fbcp started up properly on boot.

CPU Usage

I watched the CPU usage in 640x480@10fps for one minute with an static screen. Here is the CPU usage I recorded:

  • With DMA: 1.3-2.9% cpu usage
  • Without DMA: 3.6-5.9% cpu usage

Even without DMA, the CPU usage is 1/3rd of Notro/fbtft with the same resolution and fps! Nice work!

adafruit28r-pimac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant