raspberry pi pico lcd display manufacturer
Microcontroller boards based on the RP2040 chipset, the same SoC that powers the $4 Raspberry Pi Pico(opens in new tab)are becoming very popular among makers. Newer boards are popping up with extra features appearing on them, such as this 1.14 inch color display, the $10 LILYGO T-Display spotted by CNX Software(opens in new tab).
It"s not the first(opens in new tab) such board, of course, with the Arducam Pico4ML(opens in new tab) pulling a similar trick - and with a resolution of 240×135 pixels it’s hardly HD - but it comes in at just under $10 with the RP2040 board attached. Along with the ST7789V SPI controller needed to run the screen, you get all the usual Pico accoutrements such as the dual-core Cortex M0+ processor, 2 x UART , 2 x SPI and 2 x I2C connections, along with a generous 4MB of flash storage. Power and data connectivity is via USB-C, a good choice of connector as it is now becoming the norm on maker boards. Where the LILYGO T-Display falls short is the GPIO. The board looks to be wider and a different pin layout to the traditional Raspberry Pi Pico, so creative hacking is required to connect accessories designed for the Pico.
There’s also support for powering the board, and its screen, with a battery thanks to a two-pin 1.25mm pitch JST connector - you get a connector cable in the package along with an expansion header. The board is programmable through MicroPython and C like any other Pico(opens in new tab), and CNX speculates that Arduino support could be coming soon, thanks to the existence of an Arduino-liking ESP32 board(opens in new tab) by the same manufacturer with the same display. Right now CircuitPython support is unknown, but it won"t be long until a member of the community ports CircuitPython to this board.
This is a new Pi Pico display from Waveshare with many more pixels. It is a 2inch LCD display module, designed for Raspberry Pi Pico, with an embedded ST7789VW driver, 65K RGB colours, 320x240 pixels and an SPI interface. A Pi Pico can be plugged into the rear of the screen for very easy connection without any soldering. It sports 4 simple button switches for user input. It is bright, colourful and easy to program. The makers supply an example program (see below), which includes the display driver, making it very easy to get started. The manufacturer"s wiki can be found at:
To control an LCD with a microcontroller as the Raspberry Pi Pico can be a quite complicated job. Well, if your display is equipped with an IC2 module and specific MicroPython libraries are available, it’s not that difficult to connect to the display to the Raspberry Pi Pico. Learn with this tutorial how to connect and to program an 1602 LCD with a Raspberry Pi Pico.
There are many types of LCD displays. In this tutorial we are using the popular and affordable 1602 LCD. The LCD has an IC2 module soldered on it (see the pictures below). If your LCD is of the same type, but has a different size, it won’t be a problem to continue with this tutorial. You’ll just have to correct some parameters in the MicroPython script. But if it is from a different type or it has no I2C module, you better look for another tutorial.Prepare the hardware
– First you need a computer to run Thonny. In this tutorial we’ll use a Raspberry Pi 4 as our computer. And Thonny is a user-friendly Python IDE to interact with the Raspberry Pi Pico board. If you never used Thonny to program the Raspberry Pi Pico, before continuing, you better have a look at our tutorial “How to start programming the Raspberry Pi Pico“.
– You also need a Raspberry Pi Pico of course. And as we’ll connect another device to the Pico, we need pin headers soldered to the GPIO-pins of our board.
In this tutorial we are using the popular and quite basic 16×2 or 1602 LCD. It can display 16 characters per line on 2 lines. Each character is made from a matrix with 5×7 dots. It is equipped with a backlight for easy reading. Besides sending text, thanks to specific commands, we can give instructions to the display, as to switch on/off the backlight for example.
The display we use in this tutorial is equipped with a I2C-module (black part on the picture below). I2C is a communication protocol which allows an easier connection between the display and the Raspberry Pi Pico. Indeed, instead of having to wire all the pins on the top of the screen, we only have to connect the display with 4 wires to our Raspberry Pi Pico.
Each I2C device has its own I2C address. Often this address is hard-wired in the device and will vary from manufacturer to manufacturer. Have a look at our tutorial ‘Find out an I2C address with the Raspberry Pi Pico‘ to get the very basics of I2C.
If you bought one of our kits, the hexadecimal address of the LCD is ‘0x27’. And if you don’t know the address, you can find it out with the help of our tutorial ‘Find out an I2C address with the Raspberry Pi Pico‘. We will need the I2C address from the display to insert it in our MicroPython code.
To avoid extensive and complicated code writing, libraries are often used. For our LCD, we will also be using a library. We found the most appropriate library at GitHub from Tyler Peppy. And he based his work on the Python library created by Dave Hylands. As these files from this quite specific library don’t come automatically with MicroPython, we have to install them ourselves.
So, before writing the code, we’ll have to upload the files to our Raspberry Pi Pico. You can download a ZIP-folder containing the 2 files to be installed here.
Once downloaded and unzipped on our computer, we upload these files to our Raspberry Pi Pico. If you don’t know how to do that, have a look at our tutorial ‘Transfer files between computer and Raspberry Pi Pico‘. If you have multiple folders on your Raspberry Pi Pico, make sure you upload them in the same folder as the new file we will create for our main code. And don’t change the filenames of the library of course.
And before running the script, it’s important to adjust the contrast of your LCD. If the contrast isn’t adjusted well, it’s possible you don’t see appearing anything. You can adjust it by turning with a small screwdriver at the blue potentiometer at the back of your LCD (see the pictures here above). Make sure the backlight of the display is on to see the result. If the LCD’s contrast is adjusted right, you can just see the darker rectangles for the characters appear.
Besides the commands we used in the last lines of our script, there are more possibilities to communicate with the LCD. If you want to learn more about, have a look at this Github webpage.
-Select-AfghanistanAlbaniaAlgeriaAmerican SamoaAndorraAngolaAnguillaAntigua and BarbudaArgentinaArmeniaArubaAustraliaAustriaAzerbaijan RepublicBahrainBangladeshBarbadosBelarusBelgiumBelizeBeninBermudaBhutanBoliviaBrazilBritish Virgin IslandsBrunei DarussalamBulgariaBurkina FasoBurundiCambodiaCameroonCanadaCape Verde IslandsCayman IslandsCentral African RepublicChadChileChinaColombiaComorosCongo, Democratic Republic of theCongo, Republic of theCook IslandsCosta RicaCroatia, Republic ofCyprusCzech RepublicCôte d"Ivoire (Ivory Coast)DenmarkDjiboutiDominicaDominican RepublicEcuadorEgyptEl SalvadorEquatorial GuineaEritreaEstoniaEthiopiaFalkland Islands (Islas Malvinas)FijiFinlandFrench GuianaFrench PolynesiaGabon RepublicGambiaGeorgiaGermanyGhanaGibraltarGreeceGreenlandGrenadaGuadeloupeGuamGuatemalaGuernseyGuineaGuinea-BissauGuyanaHaitiHondurasHong KongHungaryIcelandIndonesiaIraqIrelandIsraelItalyJamaicaJapanJerseyJordanKazakhstanKenyaKiribatiKorea, SouthKuwaitKyrgyzstanLatviaLebanonLesothoLiberiaLibyaLiechtensteinLithuaniaLuxembourgMacauMacedoniaMadagascarMalawiMalaysiaMaldivesMaliMaltaMarshall IslandsMartiniqueMauritaniaMauritiusMayotteMexicoMicronesiaMoldovaMonacoMongoliaMontenegroMontserratMoroccoMozambiqueNamibiaNauruNepalNetherlandsNetherlands AntillesNew CaledoniaNew ZealandNicaraguaNigerNigeriaNiueNorwayOmanPakistanPalauPanamaPapua New GuineaParaguayPeruPhilippinesPolandPortugalPuerto RicoQatarReunionRomaniaSaint HelenaSaint Kitts-NevisSaint LuciaSaint Pierre and MiquelonSaint Vincent and the GrenadinesSan MarinoSaudi ArabiaSenegalSerbiaSeychellesSierra LeoneSingaporeSlovakiaSloveniaSolomon IslandsSomaliaSouth AfricaSpainSurinameSwazilandSwedenSwitzerlandTaiwanTajikistanTanzaniaThailandTogoTongaTrinidad and TobagoTunisiaTurkmenistanTurks and Caicos IslandsTuvaluUgandaUnited Arab EmiratesUnited KingdomUnited StatesUruguayUzbekistanVanuatuVatican City StateVenezuelaVietnamVirgin Islands (U.S.)Wallis and FutunaWestern SaharaWestern SamoaYemenZambia
We are the manufacturer of led/lcd screen products, we have our own professional R&D group and manufacture workshop, support OEM/ODM, can customize logo, parameters and designs as customer requests, support sample custom board. For more information, you can enquiry our customer service . Looking forward to cooperate with you!
I found my problem. It was a noob problem and it was in how i set up the hardware. I didn"t ground the pico and the LCD together. I thought that i could wire them separately and connect them only at SDA and SCL. But thats wrong. I ended up using this library from github:https://github.com/cristiancristea00/Pico-I2C-LCD
Alluvodna strankaRaspberry PiEnclosures Boxes CasesLCD TFT OLED Display for RPiAccessories Cables Power SuppliesmicroSD Memory Card & AdapterRaspberry PI Single-board ComputerCamera for Raspberry PiShield & Board for Raspberry PiWiFi for Raspberry PiKeyboard & Touchpad for Raspberry PiRaspberry Pi Kit Pack bundleRELAY BOARDGSM/GPRS/3G/4G/LTE/WiMax/5G/GSM BOARDS FOR RASPBERRY PIRaspberry Pi 400 (Pi400 RPI400)Raspberry Pi Compute ModuleRaspberry Pi PicoRaspberry Pi Zeromicro:bitmicro:bit KITArduinoBREAKOUT BOARDS, Accessories & CablesArduino KitOriginal ARDUINO BoardsOriginal ARDUINO ShieldsARDUINO BoardsARDUINO ShieldsARDUINO Box EnclosuresESP32 ESP8266Development Tools8051 Development ToolsMicrochip AtmelBREAKOUT BOARDS & SHIELDSARM Development ToolsCypress PSoC DevelopmentProgrammersData LoggersSTMICROELECTRONICSWeb ServerAndroid MINI PC / Development Kit.NET Micro FrameworkFPGA ALTERA Intel Xilinx Lattice Microchip CPLD ASICSingle board Linux computerJTAG ToolsMAXQ2000System On ModulesFREESCALEParallax Basic Stamp PropellerBeagleBoard BeagleBoneCubieboard Cubietruckx86 Vortex86Banana PiODROIDFTDI Chip’s FT90x, ..OLIMEXOnion (Omega2)Základné doskyAI - Deep Learning - Neural NetworkJetson (NVIDIA)SparkFun MicroModBIOMETRIC MEDICAL E-Health Sensor EEG EKGEnclosures Boxes CasesWearable electronic / E-TextilesPrototyping SADY STAVEBNICECompilers & SoftwareSingle Board ComputerMotor DriverElectronic Components / Battery / Memory cardM5StackMeasuring instrumentsDigital OscilloscopesSpectrum AnalyzersWaveform GeneratorsDigital MultimetersPower SuppliersUniversal CountersLogic AnalyzersLCR MeterPower MeterHandheld Digital MultimeterNon-invasive AC Current SensorData loggerData AcquisitionImaging IR ThermometerDC ELECTRONIC LOADS - Elektronická záťažLCD TFT OLED e-paper0.9 - 5" LCD display5 - 8" LCD display8 - 16" LCD displaye-Paper / E-INKOLED / AMOLEDCOG, VFD, Character/Monochrome LCDDisplay AccessoriesIoT (THE INTERNET OF THINGS)SONOFFComplete Robots3D Printer, Bluetooth Printer, Thermal PrinterGaming System ArcadeVyberame / WE LOVE TRENDUnipiNUMATO
Connecting an SPI LCD display your MicroPython enabled Raspberry Pi Pico is quite a straightforward project. You only require six connections and thanks to some great micro Python libraries, driving the display is just a simple. In this tutorial I’ll show you how to connect the LCD panel, how to add the library to your project and then how to use the primitive shape and line tools to create a simple game.
The Raspberry Pi Pico offers a wide array of interfaces to allow you to connect to various devices. Our LCD panel uses an SPI interface so will need to use one of the two hardware SPI channels. We can use software to allow us to turn any GPIO pins into an SPI channel, but these run much slower and use up much more processing power than the hardware drivers.
If we look at the Raspberry Pi Pico pinout diagram we’ll see that the SPI0 and SPI1 interfaces can be set to use a number of different pins. So our first design decision is to decide which configuration we’re going to use for our SPI connections.
From this list of connections you’ll notice that our standard SPI connection on the Pico doesn’t include the DC and RESET pins, so I’m going to use GP15 for DC and GP14 for RESET.
All we need now is a way of driving the LCD panel from our software. There are a number of MicroPython packages we can use, and I’ll actually be making a video after this one where I’ll take you through the whole process of creating your own driver package. So please make sure you subscribe to my YouTube channel so you don’t miss the next tutorials.
Once you open it in PyCharm don’t forget to go to the project settings and enable MicroPython support and then let it load in the required packages. If you’re not sure how to set up PyCharm then please watch my setup video for programming your Raspberry Pi Pico.
A really good feature of this library is the great selection of demo programs. So we can try a couple of these to make sure that we got everything connected correctly and that our Raspberry Pi Pico is able to drive the display.
We then need a few functions from the random library and the utime library, but the main one we are interested in is the ili9341 library which lets us import the Display object and the color565 function.
The ILI9341 is the driver chip used inside the LCD panel I’m using. There are a number of different ILI93xx driver chips depending on your LCD panel resolution but they all use the same basic set of commands. Indeed quite a few other manufacturer LCD driver chips use the same common command set so you should find that this driver is able to control most LCD panels.
The Display class that we are importing contains all the code to not only handle communication with the LCD panel, but also many primitive shape drawing functions that we can use to put things on the screen.
The code mainly consists of a Box class which simply models a coloured rectangle bouncing around the screen. The important bit for us is the draw method which uses the Display class fill_hrect method to draw a coloured rectangle on the screen.
The test() procedure is the main entry point that contains the programme loop. It starts by setting up the SPI interface using the built-in SPI library.
The code contained in the display driver library example is designed for a different circuit board so we need to modify this to get it to work on the Raspberry Pi Pico. The constructor function for the SPI class takes number of parameters.
The next parameter sets the baud rate for our SPI interface. This value is in hertz so will start with a 10 MHz clock signal that is well within the operating specification for both the Pico and the LCD screen.
The next parameter is the polarity which tells the SPI channel what voltage level to set the clock signal to when we’re not sending data. Usually this will be high.
The bits parameter sets the number of bits per data value and the firstbit parameter tells the interface in which order multiple byte data should be sent. Our LCD panel expects the data to be sent in big-endian format with the most significant byte sent first.
After that we tell the SPI channel which GP pins we are going to be using for the clock, mosi and miso signals. If you have a look at the example code you’ll see that the author doesn’t specify a miso pin. In this demo we are never sending data from the LCD panel to the Pico so this signal isn’t really needed.
Once we got the SPI channel initialised the code them instantiates an object of the Display class supplying it with a reference to our SPI channel and then telling it which pins we are using for the other data signals.
The main programme loop simply moves each of the boxes calling its draw method to display the animation and then has a short delay to keep the code running at 30 frames per second.
If we look at the project structure we can see that we’re now using a number of different files, some of which might be contained within separate folders. To get the software to run we need to make sure that all the files used by our code are uploaded to the Raspberry Pi Pico. We can either do this manually, copying each file one by one, or we can tell PyCharm how we’ve structured our project and get it to do everything for us.
On the right hand side you’ll see the main list detailing the project root folder and then any source folders and excluded folders. At the moment the venv folder is marked as excluded as this contains the virtual environment used by the project when running on the main PC. The fonts and images folders contain source code and assets that are used by other demos in the main LCD driver package. If you right click on one of these you can mark it as a source folder so that PyCharm knows that the files in this folder need to be transferred to the Pico. If you then do this for the other folder we’ve got our project set up to allow PyCharm to manage our project uploading.
If you apply those changes and then go back to your project we should be able to right click on our project root folder and then flash the entire project to our Raspberry Pi Pico.
Once all of the files have been uploaded to the Raspberry Pi Pico we need to tell it to run the bouncing box demo. By default the Pico will try to run the main.py file in your project. Because we don’t have one it will just sit there doing nothing. To run the code we need to log onto the REPL interface for the Pico and start the demo code manually.
The REPL interface is basically a console app that runs on the Raspberry Pi Pico. It lets you talk directly to the MicroPython operating system so we can see what’s happening on the Pico as well as asking it to perform various operations for us.
If everything is working, great! If not check your wiring and that you got the correct pins defined in the demo code. If you do need to make any changes to the code make sure you read upload any files you changed and then try running the code again.
When using the REPL console in PyCharm you must close that window before you can upload any other files. The basic rule is that you can only have one communication link with your Pico open at any one time. You’ll also find that the backspace key but strange control characters in the console. It’s actually deleting characters but unfortunately for every character it deletes it displays a couple of extra ones. They’re not actually typed in but it does make it hard to see what you currently got typed into the console. The easiest way if you make a mistake is to backspace the whole line or press return and then try again.
The LCD driver library has most of the basic drawing functions that you’ll need to build your project. These include rectangles, lines, circles, text and bitmap images. Each of these functions is demonstrated in one of the demo programs so have a look through those to see how each of them works. You can also look through the actual library source code to see how each of these functions has been implemented.
If you do want to run the other demos don’t forget to update the SPI class constructor call parameters to the Raspberry Pi Pico version. You should then be able to upload that demo file and start it from the REPL command line. If you use one of the image based demos you should already have the image folder uploaded, but if nothing shows make sure those files are added to the Pico.
So that should give you enough information to get your SPI LCD screen attached your Raspberry Pi Pico so that you can create some great user interfaces or start coding some games.
When you draw objects on screen you need to overwrite them to change them. This involves blanking out the current image before you draw the new one. Each of these drawing operations needs the Pico to communicate with the LCD screen to send the data across.
Because we’re using a serial SPI channel any data transfers will be limited by the baud rate of this interface. As we saw in the constructor function for the SPI object we can set the baud rate, but the maximum the Raspberry Pi Pico can manage is 31 MHz. Although this is a fast transmission rate when we have a lot of larger objects being animated on the screen it can cause the whole system to slow down, especially as the processor core has to wait for the SPI channel data to be sent before it can continue with your application code.
So my next tutorial will start to look at how we can optimise this code to create a bitmapped display that uses a frame buffer to allow us to use frame by frame animation techniques rather than this overdraw technique. So please make sure you subscribe to my YouTube channel to get hold of that video as soon as I publish it.
You can easily use this screen specially produced for Pico with your projects. It helps you to use it easily with C/C++ and MicroPython Demo with its embedded ST7789 Driver using SPI bus.
Screen models compatible with Raspberry Pi are waiting for you at SAMM Market with affordable price advantages. Raspberry Pi Pico 1.3 inch LCD Display - 240×240 - SPI supports you in many areas that require visualization in your projects. You can make all the projects you do with your Raspberry Pi card more visible by placing your order now.
From the Raspberry Pi official distributor SAMM Market, you can find all the electronic parts and kits you are looking for, prototyping kits for all levels. Moreover, all orders you place until 15:00 are delivered to the cargo on the same day, and orders of 150 TL or more are delivered to your address with the advantage of free shipping.