tft lcd hy28b read lcd factory
I have purchased the HY28B display as per the link below, this display uses the ILI9325 controller and has ability to interface via SPI/ 8 bit / 16 bit.
HAOYU Electronics 2.8 Touch Screen TFT LCD with all interface [HY28B] - a:link,a:visited{text-decoration:none;color:#0000FF;} Description LCD Controller ILI9325
I have previously used the UFTF lib to sucessfully configure another display that uses the ILI9325 controller with an 8 bit interface, however after implementing UTouch this left me with little usable pins, hence I would like to get the above display working via SPI if I can, however it would appear that UTFT only supports this controller (ILI9325C) in 8 bit mode, no serial support.
Anyone have any thoughts on how to get this working, or can I use a nasty hack similar to what is alluded to in the link below for the 1.5" TFT that uses the LPH9135 controller ?
Update - fbtft has now been included in the latest raspbian image and uses Device Tree - see this thread on how to configure the very latest raspbian os
This means that the console output goes to the TFT display much sooner into the boot sequence. Also he has created a ready-made image for you to download so that you do not need to go through the configuration procedure below
This new version 2 board was required because the original HY28A display has been discontinued and replaced by the HY28B. Although no major performance improvements exist, it is wired differently, so required a new pcb layout. The display board now uses the ili9325 control chip and also the touch panel is mounted 180 degrees out compared to the HY28A.
This is a cheap 320×240 2.8″ TFT LCD module that uses the ILI9320 controller for the display and the XPT2046 controller for the resistive touch panel. I purchased the module over a year ago but only had the opportunity to try it out recently. The module has since been phased out by the manufacturer and replaced with the HY28B that uses the ILI9325C controller.
To my disappointment, the connectors on this module use 2mm pitch, and not the standard 2.54mm (0.1″) pitch used by most hobbyist breadboards, sockets and connectors. I also tried to search eBay and could not find anything that might be useful, other than a few 6-pin connectors for the Zigbee module which also happens to use 2mm pitch, although I did find a photo here taken by someone who has jumper cables with small headers fitting the 2mm pin pitch of this module.
This is the time when some creativity is needed. Luckily since many of the parallel communication pins on the two 20-pin connectors on both sides of the module are not used in SPI mode, I am able to break some of the unused pins, leaving space for me to bend other pins and solder them to standard 2.54mm male connectors in order to fit a breadboard:
Although the ILI9320 supports both parallel and serial communications, the HY28A module is configured to only use SPI. Using the example source code provided by the seller, I was quickly able to make this LCD show some text and graphics:
Like most other resistive touch controllers, the XPT2046 will return a raw coordinate value when a press is detected on the panel. For the coordinate to be useful, the code must convert it to a coordinate within the LCD resolution. To make things simple, the code can just look at the maximum and the minimum values that are returned when a press is detected on each corner of the panel and perform a linear conversion of the values to LCD coordinates:
Reading of the touch points can be done when TP_IRQ is low, indicating that a touch is detected. To reduce noises and achieve better accuracy, it will be better to perform several reads (5~10) for every press and calculate the average coordinate of the touched points. TP_CS must remain low when reading is performed, and set to high when reading is done. Coordinates reading must be stopped as soon as TP_IRQ is high, indicating that touch presses are no longer detected.
If you can’t see it, the text reads “PPDS STMJ” and “BAHX MBA”. The isolated drawing points are from the noises due to breadboard stray capacitance. A median filter can probably be used to remove these isolated points for better accuracy.
The text reads “Hello ABC” in the first picture and “123” in the second picture. Ignoring the inappropriate connections between two adjacent characters (due to the inability to detect when the stylus is released from the screen to stop connecting points), the other problem is the zig-zag and not smooth shape of the drawing. This is probably because of the slow speed of the PIC24. At 16MHz SPI speed and 32MHz clock speed on my PIC24FJ64GA002, some precious time is wasted communicating with the touch controller, calculating the touched coordinates and plotting them. During this time, other points drawn by the user were lost and not plotted on the screen.
As it takes considerable time to read the touch points and plot them, it is not possible to migrate the entire process into an interrupt to increase touch sensitivity as an interrupt routine also needs to finish executing as fast as possible. The only solution for a smooth drawing would be a much faster clock speed, or perhaps to use Direct Memory Accessing (DMA), supported by this PIC. However, at this moment I do not yet have the time to explore either option.
Codes for both the LCD and the touch panel make use of my custom SPI library for the PIC24FJ64GA002 to facilitate SPI communication. Before working with the LCD or the touch screen, you will need to initialize the SPI modules using the spiInit method from my SPI library as shown below:
The LCD I am using is a 2.8″ TFT LCD with SPI communication. I also have another 16-bit Parallel TFT LCD but it will be another story for another time. For this post, let’s focus on how to display what you want on the 2.8″ LCD. You can find all details about this LCD from this page:http://www.lcdwiki.com/2.8inch_SPI_Module_ILI9341_SKU:MSP2807
First thing first, this LCD use SPI as the main communication protocol with your MCU. For STM32 users, HAL Library has already implemented this protocol which makes this project easier for us. But, a little knowledge about this protocol does not hurt anyone. SPI is short for Serial Peripheral Interface which, aside from two data lines, also has a clock line and select lines to choose between devices you want to communicate with.
This LCD uses ILI9341 as a single-chip SOC driver for a display with a resolution of 240×320. More details can be found in the official document of ILI9341. But the most important thing is that we have to establish astart sequencein order for this LCD to work. The “start sequence” includes many other sequences which are also defined in the datasheet. Each sequence starts when you send a command to ILI9341 and then some parameters to follow up. This sequence is applied for all communication between MCU and ILI9341.
For this project, I recommend using theSystem Workbench for STM32for coding and building the code. After installing and open the program, go to the source code you have just downloaded and double click the.cprojectfile. It will automatically be open in your IDE. Then build the program by right click on the folder you just open (TFTLCD) and chooseBuild Project. Wait for it to finish and upload it to the board by right clicking the folder, choose Run As and then clickAc6 STM32C/C++ Application. And that’s it for running the example.
The most important library for this project is obviously the ILI9341_Driver. This driver is built from the provided source code in the lcdwiki.com page. I only choose the part that we need to use the most in many applications like writing string, displaying image and drawing symbols. Another library from the wiki page is the TOUCH library. Most of the libraries I got from the Internet were not working properly due to some adjustments to the original one.
To draw symbols or even display images, we need a “byte array” of that image or symbol. As an illustration, to display an image from a game called Transistor, I have a “byte array” of that image stored in a file named transistor.h. You can find this file in the link below. Then, I draw each pixel from the image to the LCD by adding the code in the Display_Picture() function in the Display folder.void Display_Picture()
as you know (?) I"m very interested in using a touch screen together with the Raspi. This feature should be very interesting for choosing / starting scenes, sequences, ... already finished before at the PC.
At the moment I do so by using the web interface via smartphone and __Virtual Console__. That"s great already, but it would be nice if one could control that from the Raspi directly...
So, before buying one, carefully read the instructions to understand if eventually they will work in the QLC+ image. Or just point me to the instructions and I could tell if they will be OK.
Using the RPi along with QLC+ as a standalone solution (with the help of a TFT) would be nice, as there were no need for WiFi (router) at all (to use the web interface)!
Preparing a light show (more or less) off-line on a PC is very handy... Transferring such a project onto the RPi is already solved by your development... Controlling this light show via touchscreen would be very useful too.
In relation to this topic, could there be, or is there already a way to only show the Virtual Console? With these small touch screens it would be great to have this option and considering you keep mentioning that the Pi isn"t really meant for project editing anyway, some of the project editing features seem to be in the way on the Pi. I apologies in advance if this has already been brought up elsewhere!
Hello Patrik. Just to let you know that we do have now Lcd’s in stock but if you still need mcHF kit without display please email me at djchrismarc@genieprojects.co.uk so we can make custom invoice for your purchase.
I bought version 0.4 in 2016 and bought all the components including the LCD display. thus, having not yet assembled the rtx, is it possible to order only the two blank PCB version 0.6.3?
I have the tranceriver version 0.5. A HY28B model screen has broken down, I bought an identical model screen 2 years ago, and now that the test is broken, blank LCD. I have done several hours of testing with the other screen and all the work in bathroom. How would we do to get a new LCD that works well? Let’s see if there is any solution. Shipping is to Spain. Thank you
I wanted to say that I have the broken LCD, and one that I bought in another kit, when I put it on my MCHF it has a blank screen. All my work in vain. What solution can we give? can you send me another one?
Any word on when it will be ready? I was about to drop the money on a 0.7 kit when stock ran out. If it is going to be months more I may scream and drop the kilobuck+ on an IC-7200, which seems to have similar features + a 100W output.
I was wondering if the mcHF 0.6 components kit has the SMD components soldered on already. I assume (and hope) the answer is no, so that I will get to do some SMD soldering!
Hi, I just received my v0.6 boards and components last week, and have begun assembly of the UI board. I am wondering about the recommended LCD, where do I source one? What are the options
Hi Chris, I obtained an unstarted v0.5 kit from Israel. I then managed to install the LCD upside-down. Desoldering and removal has caused quite a bit of damage to LCD lands and tracks on the UI board. What options are open to me? Are there any v0.5 UI kit boards available on their own? Or even a v0.6 if it will still work?
Can I order just the U1 board from the surface mounted kit with the LCD? I got both boards together and U1 programmed but the LCD was bad and of course I had soldered it in. Got it out with only two traces ripped up and it is probably salvageable but.
I see that you are no longer offering the LCD as a part. Is it still included in the full kit? Also is there a simple way to determine what if any mods apply to the current kit?
Yes, two boards (UI and RF) with all SMD parts installed in the factory – by pick and place machine, then wave soldering. Also in the kit a LCD plus two plastic bags with extra parts – mostly through hole that you need to solder.
I have the boards from a former order from you and the display from ebay. I have read that you are out of boards and display. Does this mean you could send a full kit minus boards and displays? If yes, I would be interested to get one full-kit-minus-boards-and-display at a somewhat reduced price.
If you have any kits available please send it (since I have already paid for the international shipping, but if not, please refund the shipping and I will try to get one when you have more available (can you please place me on the “list” to get one in the future ?
I just ordered your complete mcHF kit with international shipping but it seems that you have already sold out of the radio’s, but I did successfully pay for the shipping.
You are not supposed to solder a header socket for the LCD, it is not part of the BOM and has never been. In theory you can solder one, keep in mind those are very expensive due to the non standard pitch, also your UI board will no longer fit in the 3D case. But if you make your own case, then you can use it. Soon i will list some RF packs only for sale. Check my page from time to time (also i post on Twitter).
I have ordered UI Board Kit and RF PCB several minutes ago. I’m surprised about the wonderful project and hope to read something about new features in future.
Hi, you can probably use different LCD, but will not match the UI board and the front panel. In theory you can add any LCD with QVGA resolution and similar size, and just update the LCD driver to support it. If you want it just as it is, please wait maybe another week, i will have the LCDs back in stock. 73
Dear sir, I’m new in the ham biz. Your project seems to beawesome and Exactly what I’m looking for as an underbudget beginner. I’d like to know if these 3 parts (2 pcb’s and a lcd) are all I need to build the transceiver? Is there a full kit available with the exact instructions?
You can order directly from China, np. Make sure you move the jumper before soldering the LCD to the UI board(need 16 bit mode). I do embedded development and Reverse Engineering for a living.
Just orderred for RF PCB + UI PCB + HY28B LCD. My PayPal transaction # 6KP04308DP576410H dated Dec 15, 2014. I can source for UI, but can you suggest where I can get RF PCB components from a single source or do you supply? Thank you
For soldering iron i use ERSA i-con nano, as for hot air, look on ebay for cheap Chinese ones – any that allow temperature and flow regulation with LCD will do.
I am a ham radio operator from India. I would like to get two sets of PCBS and LCD displays. Is it possible for you to send to me by courier ( FedEx or similar so that speedy delivery is possible)
I have read that by carefully selecting the mixer switching chips it is possible to achieve 50 and 70 Mhz. This will also require the more expensive SI570 versions that can go higher than 160 Mhz. From software point of view this is 10 mins coding, but for VHF you need much better front end, pre-amps, filtering, etc. Also i see in KX3 they push the same final for 50 Mhz as well, but not sure how efficient is the whole thing in 1-50 Mhz range, requires real knowledge in analogue design to make this.
As per today both boards and the LCD are available I just ordered the three items using PayPal for payment. If PayPal does not dieplay my adress please respond to my email adress!
arailabiltxy of boards: what a pity, now th UI board and LCD are available but the RF board is sold out! As the shipping costs to the outside of the UK is so high I waited for teh order of the RF board which was avaliable — last week? Now I can order the other baord and esseantila LCD but without the RF board the Transceiver is not complete. Is there a Chance when all three baords are avaliable at the same time???
Yes, i have some UI boards now, probably will update the site tomorrow as i am waiting for DHL to bring some LCDs as well. Those are the HY28B – dual interface version. The latest mcHF firmware supports all the three versions manufactured by hotmcu.com.
If HY28A is detected on boot up, the SPI is used, if HY28B – the parallel is in use. There is no change of the location of the 16 bit parallel port pins on the three different LCD modules.
I really like the idea of a kit (may be only the “hard to get” components) and suggest to introduce a list for people who want to buy a complete set of pcb´s / LCD and/or kits.
Soon will be available on the Order page, but limited quantity, based on what i have prepared already for sending, to prevent long wait, like the last two weeks.
1. A full-fledged screen interface with a panorama in the entire width of the display 320 × 240 (for displays 480 × 320, 800 × 480 this has already been implemented). I did not touch the default interface, only the BndMemory marker disappears if I hide it, see below. In marketing, this is called "comparative positioning" )). Switching between interfaces - long press F1 (MENU) if there were no saved configuration changes. The new interface can be specified as default - the first Display Menu option.
5. Adapted a virtual keyboard for direct dialing of the tuning frequency for the display 320x440 (for displays 480x420, 800x480 this has already been implemented), see screenshots. You will figure out how it works, everything is simple there. The keypad is hung by a long press of the touch zone of the "senior" signs of the tuning frequency indicator. It also works in the default interface 320x240!
If you are connected to a display (SPI / parallel), then mcHF corresponds to the wiring on you. The SPI board runs in parallel by default. However, most of the HY28B purchased on eBay seems to be soldered for use with SPI. Chris tuned to parallel mode. In any case, double checking will never hurt, right?
If you want to use firmware newer than 0.219.24 and not use LCD HY28A in SPI mode, you must delete R30 ... R32 on the ui-board, otherwise you will get a white screen.
Look photos of backside HY28B and HY28A. HY28B have Parallel amd SPI (serial) modes, look table "Notes" at the plate. IM0...IM2 - jumpers with R=0. HY28A have just SPI mode. You can see which display is installed in the menu - System Info, - the Dysplay option. On my rig I see "HY28B SPI". Your display is sealed or on connectors? And yet - there are nuances when the display is in SPI mode, you may have to take up the soldering iron again. I"m waiting for clarified information.
BUT when I was happy and had already closed the equipment (and when it was off), I inserted the cylindrical power connector to connect it as I always do, to my 13.8v power supply, and at that moment I hear an internal sound like a "CLICK", then I check that the green light on the power supply is off. however when I remove the connector from the radio, the green light on the source works again. But the radio no longer turns on. I have tried another source and the same thing happens. Nor does the radio start me up in battery mode.
I am about to install your latest 2.11.79m6 in my RS-918 to give it a go. I wonder, you mention in your post "(for displays 480x420, 800x480 this has already been implemented)". Does this mean that it will run a 5" touchscreen like this one? https://www.buydisplay.com/tft-5-inch-lcd-display-module-controller-board-serial-i2c-ra8875 ? Or another 5" touchscreen?
So far, I know I have v0.6, and HY28B Paralell,.. Do you think that if I conect the mentioned two cables (pin5 to R47b and pin9 to R47d) then my touchscreen should become active ..??.. or I must to do something more??. As Jake Merdich himself says, I prefer "modify as little as possible, because then you have an easier troubleshooting when something goes wrong"
This project started out with the simple idea of improving the temperature stability, and grew into a more elaborate controller with an LCD screen, water level sensing and pump control. This is an attempt to document the project (partly for my own notes), which I hope to update as I continue to tweak the design.
In this setup, the machine currently boots up automatically when powered on, regulates coffee temperature, displays current temperature, pressure and water level on an LCD and logs time, temperature, pressure and flow data to CSV files, which are accessible over the wireless network via Samba.
Caution: I’ve since read that some of these Fotek branded SSRs are fake, and may not meet the rated current. Take care in selecting a suitable SSR for your mains voltage and load current.
In this project, I originally used the Dallas DS18B20 Digital Thermometer, which has a number of advantages. First, it is already calibrated and accurate to +/-0.5°C. It also uses a serial digital interface that can be easily interfaced. Finally, it uses a 1-wire bus interface that means we can potentially add several temperature sensors to a single bus. This reduces the amount of wiring needed and, more importantly, the number of GPIO pins needed.
Originally, I spread the DS18B20 with thermal paste and cable tied it flush to the aluminium body of the boiler, in the vicinity of the existing thermostat. This performed well, and I ran the machine like this for several months.
Reading the sensor from user mode worked but was a little unreliable due to unpredictable OS interruptions. To improve reliability, I wrote a kernel driver to talk to the sensor, which I used for about 8 months. Later still, I re-implemented it again using the PIGPIO library, which is the current version used. The new sensor is now installed and running on the machine, and seems to perform very well.
The obvious way to do this is to add a flow sensor. Since an espresso shot is a relatively small volume (30ml to 60ml), we need a sensor with fairly high resolution. We can’t put it on the output side of the pump because of the high pressure (~15 bar) and the vibratory pump could give erratic readings, and perhaps damage the sensor. We also don’t want it in contact with the boiler. Ideally, we also want something non-toxic and “food safe” since it will be plumbed into the machine!
Eventually, I gave up on user mode and implemented a kernel driver which can achieve more accurate timing. This worked much more reliably (I would estimate about 2-3mm resolution), and gives a nice steady level indication on the LCD. More recently, I re-implemented the range finder with the PIGPIO library which makes the software much simpler to install and use.
The display is the HY28A which is a 2.8″ Colour Touch Screen TFT LCD with an SPI interface for both the LCD and the touch sensor. It has since been replaced by a newer model HY28B.
When I bought this, I fully expected to have to write the code to drive it, but was surprised to find that Linux Framebuffer drivers are already available for this display, and many others.
I have this configured so that it displays a console on the LCD as soon the Pi boots, so that any boot messages can be seen. Rather than running under X Windows, I decided that the controller would run under the console to reduce overhead and use SDL to draw on the LCD.
Note that the factory protective film is still stuck to the LCD screen in these photographs, which is a bit dirty/scratched. I’m planning to buy some new screen protection material to replace it when I’ve finished tinkering with the hardware.
Although the display has a touch-screen, I decided that wasn’t ideal for daily use in the kitchen, so I’ve added two stainless steel buttons. In the first version, these used 4K7 pull up resistors to 3.3V and were active low, pulling the GPIO pin to ground when pushed. As I added more equipment to the machine, I began to run out of GPIO lines. The latest version uses a single analogue input with a resistor ladder to read all the buttons as described here.
Here’s an (OUT OF DATE) circuit diagram for the old version. There were three 0.1″ (2.54mm) pin header connectors, P1 and P2 connected the Pi to the LCD touch-screen, and P3 connected the Pi to the machine (sensors and boiler/pump control).
The temperature regulator runs on a separate thread, as does the display controller. Most of the sensors (such as the flow sensor and ranger) also use threads. In places, the code makes use of edge triggered interrupts (for the flow sensor pulse counting, range finding etc), to avoid busy waiting.