AM4 and LCD Displays

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

Message
Author
RobinB
Posts: 6
Joined: Sat Sep 18, 2021 4:00 pm

AM4 and LCD Displays

#1 Post by RobinB »

Hi, couldn’t find an answer to this elsewhere, so will ask it here!

Can AM4 use the Arduino I2C bus to write to lcds?

I want to use a 40 x 2 lcd for a project but can only source ones with a piggyback I2C board already soldered on here in UK.

If this is not currently possible, might it be a useful add-on for future releases? It seems to be the way a lot of displays are going and is certainly a tidier way of hooking up, needing only four connections from the Arduino.

Here’s asking! :)
Robin

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: AM4 and LCD Displays

#2 Post by Sling »

Simple answer is yes. However that would be via message port and not the standard API methods.

Another option is to desolder the add on board and access the display pins directly using the standard API.

The I2C question has been asked before and it’s to do with memory limitations across the suite of currently supported boards.

Tony

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: AM4 and LCD Displays

#3 Post by jph »

Sling wrote: Mon Sep 20, 2021 2:55 am Simple answer is yes. However that would be via message port and not the standard API methods.

Another option is to desolder the add on board and access the display pins directly using the standard API.

The I2C question has been asked before and it’s to do with memory limitations across the suite of currently supported boards.

Tony
I agree with Tony,
If possible for you then remove the I2C board from the display and use it as normal with AM. You may chose to solder a pin header to the LCD module if you want - or solder the wires to the board.
Do you have a soldering iron and de-soldering sucker or braid ? It depends on if it is the single row connector although AFAIK then all are 8x8 dual row connector on the 40*02 format.
You can also get the displays here if needed - https://www.aliexpress.com/item/1704895 ... 2394%22%7D
the boards are fully HD44780 compatible and 4 or 8 wire interface so no issues. You would also need to add a pot' for contrast as normal.

What is your source in the UK out of interest ? - perhaps they will supply them without the I2C board on request ?. If you ever wanted to replace the I2C boards they are less than a quid each.
Joe
Joe. CISSP, MSc.

RobinB
Posts: 6
Joined: Sat Sep 18, 2021 4:00 pm

Re: AM4 and LCD Displays

#4 Post by RobinB »

Tony and Joe,

Thanks for the responses.

I have spoken with my supplier, Digitalclure in London, and they have agreed to supply the boards without the I2C modules just leaving the 2x8 holes at the end to which I will solder suitable headers…… even refunded me £1.36 for each board! Apparently they solder the modules on themselves because, quote, that’s what the majority of their customers want.

The I2C modules they use have an on-board pot for contrast control so they are literally a four wire connection. For info, I use UNOs for development work and MEGA2560s in the final implementation.

The project I am working on is a complete hardware implementation of the autopilot / flight director control panel and EFIS control panel for the Beech King Air, initially for the default C90B in X-Plane with development opportunities for the Carenado B200 and AirfoilLabs King Air 350. That panel was never ideally placed in the real aircraft but is a nightmare to use in flight sim mode! I have already developed a software version for the C90B which works well as a touch screen module on my iPad. Can share if anyone interested…….

Robin

Got a few thousand hours of real King Air time under my belt!

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: AM4 and LCD Displays

#5 Post by jph »

Hi Robin,
Great result. They sound like a very helpful supplier. I must confess a google search didn't give any results for their name ?. But anyway, great customer service.
Your project sounds super fun.
Yikes :D , that's a lot of hours in the King Air. ! very nice. Which one was it ? I once got a very short opportunity to play in the left seat of a King Air 200 whilst visiting my bro in Canada. It was a 200 Air Ambulance. They also had a 100 for a while but that suffered an unfortunate accident. That was about 30 years ago though.
Were you flying for the RAF with their Shadow units in the 350 ?

Joe
Joe. CISSP, MSc.

RobinB
Posts: 6
Joined: Sat Sep 18, 2021 4:00 pm

Re: AM4 and LCD Displays

#6 Post by RobinB »

Hi Joe,

Think I’ve flown them all except the 100 in my time. Non-military, corporate and air taxi work mostly. Type Rating Examiner on the whole family. Not much experience on the 350, but managed to wangle my way onto a course at Flight Safety in Montreal. Most of my time i/c was on the 200.

Keep the blue bit at the top!!

Robin

RobinB
Posts: 6
Joined: Sat Sep 18, 2021 4:00 pm

Re: AM4 and LCD Displays

#7 Post by RobinB »

@jph wrote “ Great result. They sound like a very helpful supplier. I must confess a google search didn't give any results for their name ?”

Apologies Joe! That’s because I can’t spell……… Try Digitalcure, they deal through ebay mostly.

Robin

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: AM4 and LCD Displays

#8 Post by jph »

Thanks Robin. I thought it was me :D .. getting old ya' know.
I retired in Portugal so tend to not buy from the UK since brexit. Pah ! .. ;) .. mainly use Aliexpress especially since they do the prepaid VAT now so they arrive in a couple of weeks with no hassle. I have my own list of quality suppliers from Ali-ex so tend to get good stuff.
One thing I forgot to mention re the I2C adapter board is that it actually limits the characters that can be sent and displayed - ie- some characters and codes cannot be sent with the I2C chip - so its mostly always better to use the 4 bit interface when needed.
That is one heck of a lot of King Air time !. nice aircraft. Must have been a nice way to make a living. I would rather be out flying than in an office. ;)
Looking forward to seeing the results as it progresses.
Joe
Joe. CISSP, MSc.

RobinB
Posts: 6
Joined: Sat Sep 18, 2021 4:00 pm

Re: AM4 and LCD Displays

#9 Post by RobinB »

@jph

Morning Joe,

As a matter of interest, have you ever used a 40 x 2 display with AM4? I just cannot get it to display anything……..

I have checked the wiring over and over, the display works fine with the Arduino IDE. Flashed the UNO again from AM4, double checked that the hw_character_display_add() statement exactly matches the display type, size and pin wiring but still only get a sullen blank display. Even adjusted the contrast control to make sure it wasn’t hiding the characters……..

Change it back to a 16 x 2 display using same pin wiring and that works fine from AM.

Running out of hair to pull out!!

Hope life in Portugal is suiting you well? Done a few air ambulance pick-ups from Faro in my flying days - usually old gits who had put their backs out trying to impress younger talent!! :roll: :roll:

User avatar
Corjan
Posts: 2936
Joined: Thu Nov 19, 2015 9:04 am

Re: AM4 and LCD Displays

#10 Post by Corjan »

Hi,


Not sure if a 40 x 2 would work, because of the memory mapping inside the HD44780.
That is a bit weird, different manufacturers can use different memory mappings.

AM uses 0x00 (line 0) and 0x40 (line 1) for normal 2 line display.
4 line displays are weirder, and have an additional offset based on the max character width.

If you have any datasheet for your device, you might at least find out what memory offset the characters should be.


Corjan

Post Reply