gen4 Primary Displays for Raspberry Pi
DATASHEET
DOCUMENT DATE:
17th June 2022
DOCUMENT REVISION: 1.8
gen4-4DPi-43T (4.3 “ Resistive Touch)
gen4-4DPi-50T (5.0 “ Resistive Touch)
gen4-4DPi-70T (7.0 “ Resistive Touch)
gen4-4DPi-43CT-CLB (4.3 “ Capacitive Touch w/ CLB)
gen4-4DPi-50CT-CLB (5.0 “ Capacitive Touch w/ CLB)
gen4-4DPi-70CT-CLB (7.0 “ Capacitive Touch w/ CLB)
Uncontrolled Copy when printed or downloaded.
Please refer to the 4D Systems website for the latest
Revision of this document
W W W . 4 D S Y S T E M S . C O M . A U
Table of Contents
Table of Contents
1.
Description ...................................................................................................................4
2.
Features .......................................................................................................................4
3.
Pin Configuration and Summary ....................................................................................5
4.
Connecting the Display to the Pi ....................................................................................7
4.1. Hardware Connection ............................................................................................................. 7
4.2. Software Download/Installation ............................................................................................. 7
4.3. Calibrating the Touch Screen .................................................................................................. 9
4.4. Change the Display Orientation .............................................................................................. 9
4.5. gen4-4DPi-Adaptor Push Button ............................................................................................. 10
4.6. SPI Frequency and Compression ............................................................................................. 10
4.7. Backlight Control ..................................................................................................................... 10
4.8. Parameters Listing .................................................................................................................. 10
4.9. HDMI or 4DPi Output .............................................................................................................. 11
4.10. DPI Adjustment ..................................................................................................................... 11
5.
Display Module Part Numbers ..................................................................................... 11
6.
Cover Lens Bezel Mounting ......................................................................................... 11
7.
Standard FFC cable specification ................................................................................. 12
8.
Latest Kernel Versions ................................................................................................ 12
9.
Mechanical Details gen4-4DPi-43T .............................................................................. 13
10. Mechanical Details gen4-4DPi-50T .............................................................................. 14
11. Mechanical Details gen4-4DPi-70T .............................................................................. 15
12. Mechanical Details gen4-4DPi-43CT-CLB ...................................................................... 16
13. Mechanical Details gen4-4DPi-50CT-CLB ...................................................................... 17
14. Mechanical Details gen4-4DPi-70CT-CLB ...................................................................... 18
15. Schematic Diagram gen4-4DPi (Display module) .......................................................... 19
16. Schematic Diagram gen4-4DPi-Adaptor (Display Adaptor)............................................ 20
17. Specifications ............................................................................................................. 21
18. Appendix 1 – Code Examples – Push Buttons ............................................................... 25
18.1. Example for communicating to Push Buttons, for C: ............................................................ 25
18.2. Example for communicating to Push Buttons, for Python: ................................................... 26
18.3. Example for Shutdown and Reset buttons, for C: ................................................................. 27
gen4-4DPi
Page 2 of 30
www.4dsystems.com.au
Table of Contents
18.4. Example for Shutdown and Reset buttons, for Python: ....................................................... 28
19. Hardware Revision History .......................................................................................... 29
20. Document Revision History ......................................................................................... 29
21. Legal Notice ................................................................................................................ 30
22. Contact Information ................................................................................................... 30
gen4-4DPi
Page 3 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
1. Description
2. Features
The gen4-4DPi range are Primary Display’s for the
Raspberry Pi A+, B+, Pi2, Pi3, Pi3 B+, Pi4, Pi Zero, Pi
Zero W and Pi Zero 2 W, which display the primary
output of the Raspberry Pi, like what is normally sent
to the HDMI or Composite output. It features an
integrated Resistive Touch panel or Capacitive Touch
panel, enabling the gen4-4DPi to function with the
Raspberry Pi without the need for a mouse.
• Universal Primary Display for the Raspberry Pi.
Communication between the gen4-4DPi and the
Raspberry Pi is interfaced with a high speed 48 MHz
SPI connection, which utilises an on-board processor
for direct command interpretation and SPI
communication compression, and features a
customised DMA enabled kernel. This combination
allows this display to output high frame rate compared
to other SPI display solutions, when displaying a
typical image/video, and can achieve higher
depending on if the image can be compressed.
The gen4-4DPi is designed to work with the Raspberry
Pi Operating System (previously named Raspbian OS)
running on the Raspberry Pi, as that is the official
Raspberry Pi operating system. It is also compatible
with Pixel and Scratch.
Please note that the display resolution of the 4.3” is
480x272 pixels, while the 5.0 and the 7.0” are 800x480
pixels, and thus may not display all menus in the
desktop fully, without some downscaling.
• Compatible with Raspberry Pi A+, B+, Pi2, Pi3, Pi3
B+, Pi4, Pi Zero, Pi Zero W and Pi Zero 2 W.
• 480x272 Resolution (4.3”)
• 800x480 Resolution (5.0” & 7.0”)
• TFT Screen with integrated 4-wire Resistive Touch
Panel (T), or Capacitive Touch Panel (CT) with Cover
Lens Bezel (CLB).
• Display GUI output / primary output, just like a
monitor connected to the Raspberry Pi
• High Speed 48MHz SPI connection to the Raspberry
Pi, featuring SPI compression technology.
• Typical frame rate of 20 Frames per second (FPS) –
4.3”, or 7 Frames per second (5” & 7”), higher if
image can be compressed further by the kernel.
Lower if no compression is possible.
• Powered directly off the Raspberry Pi, no external
power supply is required.
• On board EEPROM for board identification,
following the HAT standard.
• 4x 4.0mm Mounting holes on Non-Touch and
Resistive Touch modules, or via adhesive for
Capacitive Touch model.
• RoHS and CE Compliant – note CE EMC has not been
conducted on these modules.
The gen4-4DPi range connect to the Raspberry Pi’s 40
pin header using the gen4-4DPi Adaptor, which then
connects to the gen4-4DPi display module using a 30way FFC Cable.
Note*: Raspberry Pi is a trademark of the Raspberry Pi
Foundation, and all references to the words
‘Raspberry Pi‘ or the use of its logo/marks are strictly
in reference to the Raspberry Pi product, and how this
product is compatible with but is not associated with
the Raspberry Pi Foundation in any way.
gen4-4DPi
Page 4 of 30
Resistive Touch Display configuration shown.
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
3. Pin Configuration and Summary
H1 Pinout (Raspberry Pi Connector on gen4-4DPi-Adaptor) – Female Connetor
Pin Symbol I/O Description
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
+5V
+3.3V
+5V
SDA1
GND
SCL1
GPIO14
GPIO4
GPIO15
GND
GPIO18
PENIRQ
GND
KEYIRQ
GPIO23
GPIO22
GPIO24
+3.3V
GND
MOSI
GPIO25
MISO
SPI-CS0
SCK
SPI-CS1
GND
ID-SC
ID-SD
GND
GPIO5
GPIO12
GPIO6
GND
GPIO13
GPIO16
GPIO19
GPIO20
GPIO26
GPIO21
GND
P
P
P
I/O
P
O
I/O
I/O
I/O
P
I/O
I
P
I
I/O
I/O
I/O
P
P
O
I/O
I
O
O
O
P
O
I/O
P
I/O
I/O
I/O
P
I/O
I/O
I/O
I/O
I/O
I/O
P
+5V Supply Pin, connected to the main 5V supply of the Raspberry Pi.
+3.3V Supply Pin, connected to the main 3.3V supply of the Raspberry Pi.
+5V Supply Pin, connected to the main 5V supply of the Raspberry Pi.
I2C SDA1
Ground Pin, connected to the main system Ground of the Raspberry Pi.
I2C SCL1
GPIO on the Raspberry Pi - unused
GPIO on the Raspberry Pi - unused
GPIO on the Raspberry Pi - unused
Ground Pin, connected to the main system Ground of the Raspberry Pi.
GPIO on the Raspberry Pi – Can be used for PWM Backlight, else unused
Interrupt for the touchscreen controller
Ground Pin, connected to the main system Ground of the Raspberry Pi
Interrupt for the push buttons
GPIO on the Raspberry Pi - unused
GPIO on the Raspberry Pi - unused
GPIO on the Raspberry Pi - unused
+3.3V Supply Pin, connected to the main 3.3V supply of the Raspberry Pi
Ground Pin, connected to the main system Ground of the Raspberry Pi
SPI MOSI Pin
GPIO on the Raspberry Pi - unused
SPI MISO Pin
SPI Chip Select 0 – Used for Xilinx Processor for Display, to Raspberry Pi
SPI SCK Clock Pin
SPI Chip Select 1 – unused
Ground Pin, connected to the main system Ground of the Raspberry Pi
I2C ID EEPROM
I2C ID EEPROM
Ground Pin, connected to the main system Ground of the Raspberry Pi
GPIO on the Raspberry Pi - unused
GPIO on the Raspberry Pi - unused
GPIO on the Raspberry Pi - unused
Ground Pin, connected to the main system Ground of the Raspberry Pi
GPIO on the Raspberry Pi – unused
GPIO on the Raspberry Pi - unused
GPIO on the Raspberry Pi - unused
GPIO on the Raspberry Pi - unused
GPIO on the Raspberry Pi - unused
GPIO on the Raspberry Pi - unused
Ground Pin, connected to the main system Ground of the Raspberry Pi
I = Input, O = Output, P = Power
gen4-4DPi
Page 5 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
Note: The on-board Xilinx processor of the gen4-4DPi utilises one of the Chip Select (CS) pins on the Raspberry Pi’s SPI
Bus (SPI-CS0). There is SPI-CS1 still available for use by the User.
Note: The on-board Resistive Touch Screen Controller or on-board Capacitive Touch Controller, utilises the I2C bus
(SDA1, SCL1) to communicate to the Raspberry Pi. The I2C bus is capable of communicating with other devices also,
so isn’t restricted to only the 4DPi’s touch controller.
gen4-4DPi 30-way FFC Interface, between gen4-4DPi-Adaptor and gen4-4DPi Display
Pin Symbol I/O Description
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
GND
SDA1
SCL1
GND
MOSI
SCK
MISO
SPI-CS0
GND
ID-SC
ID-SD
GND
PENIRQ
KEYIRQ
GND
SW5
SW4
SW3
SW2
SW1
JTAG-TMS
JTAG-TDI
JTAG-TDO
JTAG-TCK
GND
+5V
+5V
+3.3V
+3.3V
GND
P
I/O
O
P
O
O
I
O
P
O
I/O
P
I
I
P
I
I
I
I
I
P
P
P
P
P
P
Ground Pin, connected to the main system Ground of the Raspberry Pi
I2C SDA1
I2C SCL1
Ground Pin, connected to the main system Ground of the Raspberry Pi
SPI MOSI Pin
SPI SCK Clock Pin
SPI MISO Pin
SPI Chip Select 0 – Used for Xilinx Processor for Display, to Raspberry Pi
Ground Pin, connected to the main system Ground of the Raspberry Pi
I2C ID EEPROM
I2C ID EEPROM
Ground Pin, connected to the main system Ground of the Raspberry Pi
Interrupt for the touchscreen controller
Interrupt for the push buttons
Ground Pin, connected to the main system Ground of the Raspberry Pi
Button 5 (Not present on Adaptor), connected to Xilinx Processor on display
Button 4 on gen4-4DPi-Adaptor, connected to Xilinx Processor on display
Button 3 on gen4-4DPi-Adaptor, connected to Xilinx Processor on display
Button 2 on gen4-4DPi-Adaptor, connected to Xilinx Processor on display
Button 1 on gen4-4DPi-Adaptor, connected to Xilinx Processor on display
Special Pins for Factory Programming of Xilinx Processor only – Do Not Connect
Special Pins for Factory Programming of Xilinx Processor only – Do Not Connect
Special Pins for Factory Programming of Xilinx Processor only – Do Not Connect
Special Pins for Factory Programming of Xilinx Processor only – Do Not Connect
Ground Pin, connected to the main system Ground of the Raspberry Pi
+5V Supply Pin, connected to the main 5V supply of the Raspberry Pi
+5V Supply Pin, connected to the main 5V supply of the Raspberry Pi
+3.3V Supply Pin, connected to the main 3.3V supply of the Raspberry Pi
+3.3V Supply Pin, connected to the main 3.3V supply of the Raspberry Pi
Ground Pin, connected to the main system Ground of the Raspberry Pi
I = Input, O = Output, P = Power
gen4-4DPi
Page 6 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
4. Connecting the Display to the Pi
4.1. Hardware Connection
The gen4-4DPi is easily connected to a Raspberry Pi.
Ensure the Raspberry Pi is powered off when
connecting the gen4-4DPi display or adaptor.
Simply align the Female 40-way header on the gen44DPi-Adaptor with the Raspberry PI’s Male 40-way
header and connecting them together – ensuring the
alignment is correct and all pins are seated fully and
correctly. The gen4-4DPi-Adaptor should be
overhanging inward of the Raspberry Pi.
Next simply connect the 30-way FFC cable between
the FFC Connector of the gen4-4DPi and the gen44DPi-Adaptor, ensuring the copper pins of the FFC are
facing upward in the connector.
over your existing OS installation, or it can be applied
over a fresh image. It is recommended to apply over a
fresh image.
If you are starting from a fresh image, start from Step
1, else skip to step 3 if you already have an OS image
and which to apply this kernel to that. Please note, it
is impossible for us to know what you have done to
your OS, if you are not installing from a fresh image –
so if you encounter issues, please try, and use a fresh
image to determine any modifications which are
conflicting with our kernel release. If you are running
an OS with a Kernel version later than our Kernel Pack,
you are very likely to encounter problems. Please
contact support if you have problems. If you already
have a custom Kernel, then applying our Kernel Pack
over the top will likely stop your previous
modifications from working, you will need to build the
kernel from scratch using our Source – link available
on our website.
1) Install a fresh operating system as discussed in the
Raspberry Pi website. Enable SSH and Wi-Fi as
preferred.
Note 1: If you encounter any issues with the latest
version, it is advisable to use the Raspberry Pi OS
release with matching kernel version as one of the
latest 4DPi packages that you plan to use. If there
is a newer version than what we have available,
please raise a ticket and we will do our best to
generate an update as soon as possible.
Note 2: At the time of writing, the latest release
which is based on Debian Bullseye is not fully
compatible with our kernel release. It is advisable
to use the latest Legacy version which is based on
Debian Buster instead.
2) Connect the gen4-4DPi and insert the uSD card
into the Raspberry Pi. You will need network
connectivity to proceed with the installation. A
monitor, keyboard and mouse are required if not
using SSH. SSH can be configured in Step 1. Power
on the Raspberry Pi and make sure it is connected
to your network.
Please note that hardware connection to the Pi is not
recommended until the Pi has been set up. Please see
instructions below.
4.2. Software Download/Installation
4D Systems has prepared a custom DMA enabled
kernel for use with the Raspberry Pi Operating System
(previously named Raspbian OS), which is available for
download as a single package. This can be installed
gen4-4DPi
Page 7 of 30
3) Login to the Raspberry Pi using the standard ‘pi’
and ‘raspberry’ credentials or as configured in
Step 1. If SSH is not used, open the Terminal app.
4) You are welcome to perform a system update if
prompted, but please take note that if you install
a newer kernel than what our Kernel Pack offers,
then you could encounter problems. It is
therefore advisable to NOT do a system update,
as this could update the Kernel.
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
5) Typically, on modern versions of the Pi OS, this
following step is not required or is done
automatically. However, it is here for reference.
Expand the file system on downloaded image
using raspi-config (submenu Expand Filesystem).
After exiting raspi-config a reboot is needed.
The package selects the kernel required the
Raspberry Pi model used automatically. If you
want to check for the kernel packages released by
4D systems, proceed to Section: Latest Kernel
Versions
9) Reboot the Raspberry Pi by running the command
sudo raspi-config
sudo reboot now
sudo reboot
6) Once rebooted, this is the last opportunity for you
to do an apt-get upgrade, as doing this after
applying the Kernel Pack will render the 4DPi
modifications disabled. Please note that doing an
upgrade could change your current Kernel which
could make the version installed be newer than
the Kernel Pack you are about to install next. The
Kernel pack must be applied to a kernel very close
(newer Kernel Pack is generally OK) if not identical
to the kernel your OS is running, or there will be
issues.
Warning: An upgrade should only be done after
making sure that the latest kernel is supported by
the latest kernel pack from 4D. Otherwise,
installing the 4D kernel pack will downgrade the
kernel and problems are almost certain to occur.
7) Log into your Raspberry Pi again, you will need to
download and install the Kernel Pack which
supports the gen4-4DPi. The following step
requires sudo ‘root’ access.
8) To download and install files, enter the following
commands in terminal/shell /SSH to download
the kernel from the 4D Systems Server:
10) The desktop should begin to show on the gen44DPi once the Raspberry Pi has booted.
11) Doing an apt-get upgrade after the Kernel Pack
has been installed, will typically disable the 4DPi,
as the modules and Kernel likely would be
updated in this process, which would disable the
4DPi modifications. To enable the 4DPi again, be
sure to download the latest Kernel Pack from the
4D Website (check this datasheet again if there
has been an updated version) and perform the
same steps and you should get up and running
again. Your results may vary, and its always
advisable to apply the 4DPi Kernel Pack to a fresh
image, but this is not always possible.
12) ADVANCED USERS: If you need to make custom
modifications to your Kernel, and want the 4DPi
to function also, you will need to build the Kernel
from source, and include the 4DPi files in the
process. The link to our source is on our website,
along with steps required to add in the 4DPi files
so this can be enabled in menuconfig while
building the Kernel.
wget https://4dsystems.com.au/media/download
s/4DPi/All/gen4-hats_5-15-32_32bit.tar.gz -O
gen4-hats.tar.gz
Then extract the kernel pack:
sudo tar --keep-directory-symlink -xzvf gen4
-hats.tar.gz -C /
If you encounter issues running this command, try
adding --no-same-owner
sudo tar --no-same-owner --keep-directory-sy
mlink -xzvf gen4-hats.tar.gz -C /
gen4-4DPi
Page 8 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
Perform the calibration and copy results. The
result should be something like this:
4.3. Calibrating the Touch Screen
Each gen4-4DPi which is shipped from the 4D Systems
factory is slightly different, in the sense that each of
the touch screens has a slightly different calibration.
To get the best from your gen4-4DPi, you will need to
calibrate the display, so it is as accurate as possible.
This is typically only required for Resistive Touch
models.
To calibrate the touch screen, the xinput_calibrator is
required, and the following steps should be carried
out. Make sure the Desktop is not running before you
start, quit desktop if it is and return to the terminal
prompt. Please note that only resistive touch display
modules could be calibrated.
1) Install xinput_calibrator (if not installed by
default) by running this from terminal:
Section "InputClass"
Identifier
"calibration"
MatchProduct
"AR1020 Touchscreen"
Option "Calibration" "98 4001 175
3840"
Option
"SwapAxes" "0"
EndSection
7) You may test the changes after xinput calibrator
ends. To make the changes permanent, paste the
results to
/etc/X11/xorg.conf.d/99-calibration.conf
sudo nano /etc/X11/xorg.conf.d/99-calibratio
n.conf
8)
Save the file and perform a reboot
sudo reboot now
sudo apt-get install xinput-calibrator
2) Install the event device input driver:
The Display should now be calibrated.
sudo apt-get install xserver-xorg-input-evde
4.4. Change the Display Orientation
v
3)
To change the display orientation, simply edit the
/boot/cmdline.txt file
Rename 10-evdev.conf file to 45-evdev.conf.
sudo mv /usr/share/X11/xorg.conf.d/10-evdev.
conf /usr/share/X11/xorg.conf.d/45-evdev.con
f
Add the parameter below after the console parts in
the parameter list:
4d_hats.rotate = 90
4) Check if evdev.conf has a higher number than
libinput.conf.
And change this to have the value of 0, 90, 180 or 270.
It should look something like:
console=serial0,115200 console=tty1
4d_hats.rotate=90 root= (etc etc)
ls /usr/share/X11/xorg.conf.d/
Save the file and restart your Raspberry Pi.
The user should get something like this:
10-quirks.conf
40-libinput.conf
evdev.conf 99-fbturbo.conf
5)
45-
The touch screen will automatically remap the
alignment thanks to the custom kernel.
After changing the Display Orientation, you need to
calibrate again the screen.
Perform a reboot
sudo reboot now
6)
Reconnect to SSH and run xinput calibrator.
DISPLAY=:0.0 xinput_calibrator
gen4-4DPi
Page 9 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
4.5. gen4-4DPi-Adaptor Push Button
4.7. Backlight Control
The gen4-4DPi-Adaptor features 4 push buttons,
which are connected to the Xilinx Processor. These can
be used to trigger events on the Raspberry Pi. Please
refer to the Appendix for code examples on how to
utilize these buttons.
The backlight brightness can be controlled from the
terminal, or from a bash script. The following
command can be used to set the backlight from 0 to
100%.
sudo sh -c 'echo 31 > /sys/class/backlight/4
4.6. SPI Frequency and Compression
d-hats/brightness'
The gen4-4DPi can be adjusted to work with a range of
SPI Frequencies and levels of compression, depending
on the requirements of the product/project.
The above will set the backlight to 100% (default).
Simply change the ‘echo 31’ to be anything from 0 to
31.
Increasing the frequency can result in a higher Frame
Rate (FPS), however will use more power and
processor time. Increasing the level of the
compression can also result in a higher FPS but may
cause the display to corrupt. By default, a SPI
Frequency of 48Mhz is used, with a Compression level
of 7.
The following parameters are the defaults in the
/boot/cmdline.txt file and can be edited to adjust the
Frequency and Compression level.
4d_hats.sclk=48000000
4d_hats.compress=7
Setting compress to be 1 will enable the kernel to
control the level of compression based on the
frequency selected. This however is not guaranteed to
have a good result and may require manually setting
the compression level if corruption on the display is
experienced.
If corruption or display anomalies occur at any given
compression level, try to lower it by 1 value and check
if this has improved.
Note, changing the frequency and compression
require a restart of the Raspberry Pi.
4.8. Parameters Listing
The following is a list of all the custom parameters
used by the gen4-4DPi.
rotate: Screen rotation 0/90/180/270 (int)
compress: SPI compression 0/1/2/3/4/5/6/7 (int)
sclk: SPI clock frequency (long)
Valid SPI Frequency values (4d-hats.sclk):
Values can be almost anything. This has been tested
up to 64Mhz. Common values would include
64000000 (64MHz), 48000000 (Default), 32000000,
24000000 etc.
Valid Compression values (4d-hats.compress):
0 (compression off)
1 (compression on, auto set based on sclk value)
2 (lowest), 3, 4, 5, 6, 7 (highest compression)
These parameters can be set or read from the
/boot/cmdline.txt file, and they can be read from the
/sys/module/4d_hats/parameters/ directory.
For example:
cat /sys/module/4d_hats/parameters/rotate
Will display the current rotation saved.
gen4-4DPi
Page 10 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
4.9. HDMI or 4DPi Output
Reboot the Pi, and your changes should take effect.
To switch the X Windows output being displayed on
4DPi or HDMI output, X can be launched using either
of the following commands:
Changing the DPI can make the screen blurry, so take
care when adjusting these values. If you get to a point
where it is unreadable, SSH into your Pi and change the
value back to something reasonable.
Ideally DPI is set based on your resolution, however for
small resolution displays, it can be desirable to make
the DPI smaller so you can fit more on the screen.
startx -- -layout TFT
startx -- -layout HDMI
Alternatively, these commands do the same thing:
5. Display Module Part Numbers
FRAMEBUFFER=/dev/fb1 startx
The following is a breakdown on the part numbers and
what they mean.
startx
Example:
gen4-4DPi-70CT-CLB
4.10. DPI Adjustment
login as pi and open terminal
gen4
4DPi
70
T
CT
CLB
Check the current DPI settings by
•
xrdb -query -all
•
It is possible to change the DPI output of the 4DPi the
same way as other LXDE based systems.
The current dpi is listed next to the Xft.dpi listing.
To change the DPI, it can be done like this. Edit the
following file, and then merge it:
- gen4 Display Range
- Display Family
- Display size (7.0”)
- Resistive Touch.
- Capacitive Touch
- Cover Lens Bezel
For part numbers which do not include T or CT,
these are non-touch variants.
Cover Lens Bezels (CLB) are glass fronts for the
display module with overhanging edges, which
allow the display module to be mounted directly
into a panel using special adhesive on the
overhanging glass. These are available for
Capacitive Touch only.
nano ~/.Xresources
6. Cover Lens Bezel Mounting
Add this line:
The perimeter of the CLB display modules features
double-sided adhesive tape, designed to stick directly
onto a panel, enclosure, box etc without the need for
any mounting screws or hardware.
Xft.dpi: 75
This will set the DPI to be 75
Save and exit the file.
Merge it so the value gets used, by doing the
following:
The tape used is 3M 9495LE tape, which uses the wellknown and strong 3M 300LSE adhesive.
The double-sided adhesive has a thickness of 0.17mm
once the backing has been removed.
xrdb -merge ~/.Xresources
More information on this adhesive can be found on
the 3M website.
Check again by doing the query
https://multimedia.3m.com/mws/media/545361O/hi
gh-stength-dc-tape-w-adhesive-300lse-9475le9475leb.pdf
xrdb -query -all
gen4-4DPi
Page 11 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
7. Standard FFC cable specification
8. Latest Kernel Versions
Between the gen4-4DPi-Adaptor and the gen4-4DPi
Display Module, the following FFC cable is supplied:
Here is the list of the kernel patches released by 4D
systems.
30 Pin Flexible Flat Cable, 150mm Long, 0.5mm
(0.02") pitch
Cable Type: AWM 20624 80C 60V VW-1
Heat Resistance 80 Degrees Celsius
Connections on the opposite side at each end (Type
B)
Latest releases:
gen4-hats_5-10-103.tar.gz
gen4-hats_5-15-32_32bit.tar.gz (see note 2)
All FFC connectors on the gen4-4DPi are ‘Top Contact’
meaning the FFC cable has the metal ‘fingers’ pointing
upward in the connector, blue stiffener on the back of
the FFC cable is down on the PCB side.
Previous releases:
gen4-hats_5-10-76-4DPi.tar.gz
gen4-hats_5-10-63.tar.gz
gen4-hats_5-4-68.tar.gz
gen4-hats_4-19-57-v7l+_v1.0.tar.gz
gen4-hats_4-14-34_v1.1.tar.gz
gen4-hats_4-9-80_v1.1.tar.gz
gen4-hats_4-9-59_v1.2.tar.gz
Note: (1) It is highly advisable to use a Raspberry Pi OS
release with matching kernel version (first 2 numbers,
and 3rd number needs to be less than or equal) as the
Kernel Pack you decide to use. Please refer to section
4.2 point #1 regarding current recommendations.
For example, if your OS uses Kernel 5.4.60, then
applying our 5.4.68 Kernel Pack is a good match.
Example 2, If your OS uses 5.4.79, or 5.5.10, then
applying 5.4.68 Kernel Pack likely would not be the
best idea as it would be a downgrade, and some things
may not function correctly.
Note: (2) This kernel package is versions higher than
the recommended latest Buster (legacy) version
release. This was built to be able to update the Buster
version to a matching kernel version of the Bullseye
release. To match the kernel, you can use the
command: sudo rpi-update
sudo rpi-update
Git hash must be the commit in the Raspberry Pi
Firmware Files repository with the same kernel version
as the 4DPi package.
Note: (3) Some older kernel releases may be available
upon request. Please contact 4D Systems Support
Team for more information:
www.4dsystems.com.au/support
gen4-4DPi
Page 12 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
9. Mechanical Details gen4-4DPi-43T
gen4-4DPi
Page 13 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
10. Mechanical Details gen4-4DPi-50T
gen4-4DPi
Page 14 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
11. Mechanical Details gen4-4DPi-70T
gen4-4DPi
Page 15 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
12. Mechanical Details gen4-4DPi-43CT-CLB
gen4-4DPi
Page 16 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
13. Mechanical Details gen4-4DPi-50CT-CLB
gen4-4DPi
Page 17 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
14. Mechanical Details gen4-4DPi-70CT-CLB
gen4-4DPi
Page 18 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
15. Schematic Diagram gen4-4DPi (Display module)
gen4-4DPi
Page 19 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
16. Schematic Diagram gen4-4DPi-Adaptor (Display Adaptor)
gen4-4DPi
Page 20 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
17. Specifications
ABSOLUTE MAXIMUM RATINGS
Operating ambient temperature ................................................................................................... -20°C to +70°C
Storage temperature ...................................................................................................................... -30°C to +80°C
NOTE: Stresses above those listed here may cause permanent damage to the device. This is a stress rating only
and functional operation of the device at those or any other conditions above those indicated in the
recommended operation listings of this specification is not implied. Exposure to maximum rating conditions for
extended periods may affect device reliability.
RECOMMENDED OPERATING CONDITIONS
Parameter
Supply Voltage (+3.3V)
Supply Voltage (+5V)
Conditions
Stable supply from Raspberry Pi Bus
Stable supply from Raspberry Pi Bus
Min
Typ
Max
Units
3.0
4.5
3.3
5.0
4.0
5.5
V
V
GLOBAL CHARACTERISTICS BASED ON OPERATING CONDITIONS
Parameter
Conditions
Min
Typ
Max
Units
Supply Current Estimates
(Display portion only)
(RPi current not included)
Idle home screen
gen4-4DPi-43T (Max Brightness)
gen4-4DPi-43CT-CLB (Max Brightness)
gen4-4DPi-50T (Max Brightness)
gen4-4DPi-50CT-CLB (Max Brightness)
gen4-4DPi-70T (Max Brightness)
gen4-4DPi-70CT-CLB (Max Brightness)
-------
250
270
360
380
640
750
-------
mA
mA
mA
mA
mA
mA
Display Endurance
Hours of operation, measured to when
display is 50% original brightness
30000
--
--
H
--
1M
--
Touches
--
100K
--
Slides
82
--
--
%
Capacitive Touch
Only use Finger or Stylus, do not use
anything sharp or metal
90
--
--
%
20
--
100
Gf
Cover Lens Bezel Glass Hardness
--
6
--
H
Touch Screen Endurance
(Resistive Touch)
Touch Screen
Transparency
Touch Screen Operational
Force (Resistive Touch)
CLB Hardness
(Capacitive Touch)
gen4-4DPi
Number of touches/hits with a 12.5mm
tip at a rate of 2x per second with 250gf
force
Slide stylus on screen, 100gf force,
60mm/s speed with a 0.8mm polyacetal
tip stylus pen
Resistive Touch
Page 21 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
LCD DISPLAY INFORMATION (TN DISPLAY)
Parameter
Display Type
Conditions
Specification
All displays produced before IPS release
date in IPS table below, or any modules
not specified are therefore TN type
displays.
TN - TFT Transmissive LCD
Display Sizes
Display Resolution
Display Brightness
gen4-4DPi-43T (Max Brightness)
gen4-4DPi-43CT-CLB (Max Brightness)
gen4-4DPi-50T (Max Brightness)
gen4-4DPi-50CT-CLB (Max Brightness)
gen4-4DPi-70T (Max Brightness)
gen4-4DPi-70CT-CLB (Max Brightness)
4.3”, 5.0” or 7.0” Diagonal
480 x 272 (Landscape Viewing) – 4.3”
800 x 480 (Landscape Viewing) – 5” & 7”
400 cd/m2
475 cd/m2
400 cd/m2
475 cd/m2
400 cd/m2
475 cd/m2
Display Contrast Ratio
Typical
500:1
Display Viewing Angles
Above Centre
Below Centre
Left of Centre
Right of Centre
gen4-4DPi-43xx Models
70 Degrees
60 Degrees
70 Degrees
70 Degrees
12 o’clock Display
(Optimal viewing is from above when in
Landscape/Wide mode)
2x5 Parallel LED’s
gen4-4DPi-50xx Models
2x6 Parallel LED’s
gen4-4DPi-70xx Models
9x3 Parallel LED’s
4.3”
0.198 x 0.198mm (Square pixels)
5.0”
0.135 x 0.135mm (Square pixels)
7.0”
0.1925 x 0.179mm (non-Square pixels)
4.3”
128 DPI/PPI
5.0”
183 DPI/PPI
132 DPI/PPI (Horizontal)
142 DPI/PPI (Vertical)
Display Viewing Direction
Display Backlighting
Pixel Pitch
Pixel Density (Number of
pixels in 1 row in
25.4mm)
gen4-4DPi
TN displays
7.0”
Page 22 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
LCD DISPLAY INFORMATION (IPS DISPLAY)
Parameter
Display Type
Conditions
Display Sizes
Display Contrast Ratio
Display Viewing Angles
Display Viewing Direction
Display Backlighting
Pixel Pitch
Pixel Density (Number of
pixels in 1 row in
25.4mm)
IPS - TFT Transmissive LCD
gen4-4DPi-43T (Max Brightness)
gen4-4DPi-43CT-CLB (Max Brightness)
gen4-4DPi-50T (Max Brightness)
gen4-4DPi-50CT-CLB (Max Brightness)
4.3”, 5.0” or 7.0” Diagonal
480 x 272 (Landscape Viewing) – 4.3”
800 x 480 (Landscape Viewing) – 5” & 7”
510 cd/m2
540 cd/m2
510 cd/m2
540 cd/m2
gen4-4DPi-43xx Models – Typical
800:1
gen4-4DPi-50xx Models - Typical
1000:1
Above Centre
Below Centre
Left of Centre
Right of Centre
gen4-4DPi-43xx Models
80 Degrees
80 Degrees
80 Degrees
80 Degrees
ALL
(Viewing from all directions)
2x5 Parallel LED’s
gen4-4DPi-50xx Models
3x6 Parallel LED’s
4.3”
0.198 x 0.198mm (Square pixels)
5.0”
0.135 x 0.135mm (Square pixels)
4.3”
128 DPI/PPI
5.0”
183 DPI/PPI
Display Resolution
Display Brightness
Specification
gen4-4DPi-43T – Modules produced March
2021 onwards.
gen4-4DPi-43CT-CLB – Modules produced
March 2021 onwards.
gen4-4DPi-50T – Modules produced March
2021 onwards.
gen4-4DPi-50CT-CLB – Modules produced
September 2020 onwards.
IPS Displays
PERFORMANCE
Parameter
Frame Rate (FPS)
(4.3” only)
Frame Rate (FPS)
(5.0” & 7.0” only)
gen4-4DPi
Conditions
Video Playback, Full Screen, 480x272.
A higher FPS can be achieved if display
outputting lots of blocks of the same
colour. See Section 4.6
Video Playback, Full Screen, 800x480.
A higher FPS can be achieved if display
outputting lots of blocks of the same
colour. See Section 4.6
Page 23 of 30
Min
Typ
Max
Units
--
20
--
FPS
--
7
--
FPS
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
ORDERING INFORMATION
Order Code:
gen4-4DPi-43T
gen4-4DPi-50T
gen4-4DPi-70T
gen4-4DPi-43CT-CLB
gen4-4DPi-50CT-CLB
gen4-4DPi-70CT-CLB
Packaging: Module sealed in a 4D Systems Box
gen4-4DPi
Page 24 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
18. Appendix 1 – Code Examples – Push Buttons
18.1. Example for communicating to Push Buttons, for C:
// test program to read state of buttons on 4D Systems 4DPi displays
#include
#include
#include
#include
#include
#include
#define LCD4DPI_GET_KEYS _IOR('K', 1, unsigned char *)
void print_keys(int fd)
{
unsigned char keys;
if (ioctl(fd, LCD4DPI_GET_KEYS, &keys) == -1)
{
perror("_apps ioctl get");
}
else
{
printf("Keys : %2x\n", keys);
}
}
int main(int argc, char *argv[])
{
char *file_name = "/dev/fb1";
int fd;
fd = open(file_name, O_RDWR);
if (fd == -1)
{
perror("_apps open");
return 2;
}
print_keys(fd);
printf("Ioctl Number: (dec)%d
(hex)%x\n", LCD4DPI_GET_KEYS, LCD4DPI_GET_KEYS);
close (fd);
return 0;
}
gen4-4DPi
Page 25 of 30
www.4dsystems.com.au
gen4 Primary Displays for Raspberry Pi
18.2. Example for communicating to Push Buttons, for Python:
#!/usr/bin/python
import array, fcntl
from time import sleep
# test program to read state of buttons on 4D Systems 4DPi displays
#LCD4DPI_GET_KEYS = -2147202303
_IOC_NRBITS
= 8
_IOC_TYPEBITS = 8
_IOC_SIZEBITS = 14
_IOC_DIRBITS = 2
_IOC_DIRMASK
= (1