Non-OLED HD44780 1602 display

General support for the Pi-Star System
Post Reply
M7YTH
Posts: 22
Joined: Sat Aug 08, 2020 9:27 am

Non-OLED HD44780 1602 display

Post by M7YTH »

Does pi-star work with 1602 or 1604 display that are commonplace for Arduino and Pi?

My display has a PCF8574 board which I have connected to SCL/SDA on the simplex radio board and Vcc and GND up to 5V and GND. I have selected HD44780 from the display menu but nothing appears on the display. I am not sure what option to use for Modem as this does not appear to be relevant. Neither does Nextion layout so I have left these alone. I don't see any option to choose between OLED and non-OLED displays nor I2C and non-I2C connections so I'm not sure what to do next? I have seen a couple of questions on here regarding these displays but no answers, although one posted did say he got his working so I presume it must be possible.
M7YTH
Posts: 22
Joined: Sat Aug 08, 2020 9:27 am

Re: Non-OLED HD44780 1602 display

Post by M7YTH »

Ok, I have figured out what to do and it is actually quite simple. Here are the steps:

1. Determine the I2C address of your display. On my 1602 display with PCF8574 I2C converter board it was 0x27, although I understand that some boards may have an I2C address of 0x3F. Those two addresses are worth trying first. If you have an Arduino, the page here provides an Arduino script that will detect the board and return its I2C address.
https://www.makerguides.com/character-i ... -tutorial/

2. Connect the display to the pi-star: SDA to SDA, SCL to SCL, VCC to 5V, GND to GND. According to the datasheet, the IO pins on the ST32F103 are 5v tolerant (max 5.5v) but ideally, a level shifter should be used to connect SDA and SCL. This was relatively straightforward to do.

3. Connect to the pi-star using your browser

4. Go to Configuration

5. For the MMDVM Display Type select "HD44780"

6. Click "Apply Changes". Make sure the change has been applied

7. Next, from the configuration page go to Expert -> MMDVMHOST

8. Scroll all the way down to the HD44780 section

9. Change the I2C address to 0x27 (or to the address of your display). Note, there is no need to change anything in the pins field.

10. Click "Apply Changes"

Once the changes have been applied, the display should spring to life. You should see your callsign, CCS7/DMR ID, radio board type e.g. MMDVM and the current time on the display.

The contrast of the display can be adjusted using the potentiometer on the I2C daughterboard.
M7YTH
Posts: 22
Joined: Sat Aug 08, 2020 9:27 am

Re: Non-OLED HD44780 1602 display

Post by M7YTH »

Thanks. Worked fine on the Pi 2 with ssh access enabled and display connected.

It would be useful also if I could control the brightness of the display. The contrast can be set using the pot on the back of the PCF8574 board. It is also easy enough to add another 10k pot by removing the jumper and connecting the pin marked LED to the wiper, the other pin to one side of the pot and the connecting the remaining side of the pot to ground, however it would be nice to be able to control the brightness programmatically. There appear to be some settings available in the HDD44780 configuration section to do this, but I couldn't get anything to work.

I am not quite sure why pin 21 is selected by default as this appears to be wired to the reset button on the pi-star hat. Instead I tried using GPIO13 which seems n/c and unused. I tried both the GPIO number (13) and the physical pin number (33) in the "PWMpin" field but neither number worked. There was no PWM signal being generated. I also tried GPIO 25, but to no avail. I did also try setting the value in the "PWM" field to 1 assuming this would enable the PWM function. Finally, I also tried a standalone Python script which did what I wanted it to do, but only for a split second because the pi-star took control of the display back immediately, returning it back to its previous settings.

It would be handy to be able to switch the display backlight on and off as well as adjust its brightness via the configuration tool or else using a terminal. If anyone knows how to configure this section and further insight would be appreciated.
Post Reply