7 Segment Display 6 digits

Latest Information on Sim Innovation's flagship product Air Manager

Moderators: Ralph, russ

Message
Author
tpmor14
Posts: 6
Joined: Tue Jun 02, 2020 3:05 pm

7 Segment Display 6 digits

#1 Post by tpmor14 » Mon Jun 29, 2020 2:05 am

Hi guys,

I'm trying to use a 7 segment display with 6 digits, so at first I was having a hard time to put it to work since apparently AM only supports MAX7219, 8 Segment and HD44780. but found out a way to make it work which is

Code: Select all

display_chr_id = hw_chr_display_add("8SEGMENT", 6, "TRANSISTOR_COMMON_CATHODE", "ARDUINO_MEGA2560_A_D2","ARDUINO_MEGA2560_A_D3", "ARDUINO_MEGA2560_A_D4", "ARDUINO_MEGA2560_A_D5", "ARDUINO_MEGA2560_A_D6", 
                                    "ARDUINO_MEGA2560_A_D7", "ARDUINO_MEGA2560_A_D8", "ARDUINO_MEGA2560_A_D9", "ARDUINO_MEGA2560_A_D10", "ARDUINO_MEGA2560_A_D11", "ARDUINO_MEGA2560_A_D12", "ARDUINO_MEGA2560_A_D13", "ARDUINO_MEGA2560_A_D22", "ARDUINO_MEGA2560_A_D23")

-- Set text "1234"
hw_chr_display_set_text(display_chr_id, "1")
But now I have another problem, when I do hw_chr_display_set_text(display_chr_id, "1") all 6 digits shows me 1 so in this case I would have 111111 as an output. And if I do more than 1 digit so for example hw_chr_display_set_text(display_chr_id, "12") or even hw_chr_display_set_text(display_chr_id, "123456") the output is all the numbers overlapped.

So I'm kinda lost right now and I couldn't find anything that would help me with that. Not sure if it's related to my 7 segment display, or my wiring, or AM, no ideia to be hosnest.
btw hw_chr_display_add won't accept 7SEGMENT as first parameter, that's why I'm using 8SEGMENT as my first parameter.

Anyone know how I put it to work properly? is it possible?

I'm using:
https://hispapanels.com/tienda/en/leds- ... splay.html
https://hispapanels.com/tienda/en/kits/ ... s-set.html


thanks in advance
tpmor

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

Re: 7 Segment Display 6 digits

#2 Post by Sling » Mon Jun 29, 2020 2:53 am

Hi,

First up an 8 segment is what is commonly referred to as a 7 segment plus the decimal point. This works as a multiplexed display just like most control chips do. Look it up if you are not familiar with it’s operation. Essentially the individual segments are wired in parallel and each common has its own pin. See the wiki example.

Tony

tpmor14
Posts: 6
Joined: Tue Jun 02, 2020 3:05 pm

Re: 7 Segment Display 6 digits

#3 Post by tpmor14 » Mon Jun 29, 2020 11:30 am

I did follow the wiki example as much as I could, is the way I’m programming it for a 7 segment 6 digits correct? Because the example on the wiki is 4 digit display and I couldn’t find any 6 digit example. So I did in an intuitive way, the wiring I think it’s right since it is showing the numbers and working properly if I enter a single digit input.

It seems like the problem might be in the code, because when I do hw_chr_display_set_text(display_chr_id, "1") it works properly but instead of the number 1 show up at position 6 only, all the digits would show me number one.

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

Re: 7 Segment Display 6 digits

#4 Post by Sling » Mon Jun 29, 2020 12:46 pm

Can you explain how you have it wired. I suspect the common cathodes are incorrectly wired. You should be using transistors to drive the cathodes I suppose there could be a problem with the function itself. Not many people seem to use 8 segment directly so an issue may of not been noticed before. The code looks fine if indeed you have it wired correctly and are using transistors for the cathodes.

Tony

wdmonitor@gmail.com
Posts: 39
Joined: Fri Mar 01, 2019 8:23 pm

Re: 7 Segment Display 6 digits

#5 Post by wdmonitor@gmail.com » Wed Sep 30, 2020 5:52 pm

I know this an old thread, but if 6-digit 7-segment displays are a must (they are for me) I use the TM1637 modules connected with either SimVim or my own Arduino code, using the AM Message Port to send the subscribed dataref(s) to the external Arduino NOT running AM. The TM1637 modules are great. They only use 2 I/O lines, and they come in multiple colors and different digit counts. The digits and displays themselves are also physically smaller than the popular MAX7219 modules. I use them in my radio panels and they work great.

User avatar
jph
Posts: 638
Joined: Fri Apr 10, 2020 12:50 pm
Location: Portugal

Re: 7 Segment Display 6 digits

#6 Post by jph » Sat Oct 03, 2020 10:00 am

wdmonitor@gmail.com wrote:
Wed Sep 30, 2020 5:52 pm
I know this an old thread, but if 6-digit 7-segment displays are a must (they are for me) I use the TM1637 modules connected with either SimVim or my own Arduino code, using the AM Message Port to send the subscribed dataref(s) to the external Arduino NOT running AM. The TM1637 modules are great. They only use 2 I/O lines, and they come in multiple colors and different digit counts. The digits and displays themselves are also physically smaller than the popular MAX7219 modules. I use them in my radio panels and they work great.
Yup, agreed, the 1637 and 38 are superb. I use the 0.3 and 0.32 height modules which are a far more realistic size than the 7219 ready made 'modules'
the readily available and ubiquitous 7219 module is really good, but looks totally out of place. Most of the commercial ready made units for the '37 are 0.36 height which is still ok, but I have decided to go down the route of using the 0.28", 0.3" and 0.32" modules and move the driver chip from the board (or the driver 'board' from the LED module which is easier) . The added ability to have the use of 8 buttons and outputs on the same data-lines is also neat. Loads of great arduino code out there ready to be hooked up to sim message port at a time when needed.
these units are superb for arduino with 8 inputs and 8 outputs and also 8 x 7 segs on 3 lines. There are 16 key modules for the 1638 but there CAN be issues with multiple simultaneous button presses that are not present on the 8 button units. - (due to lack of routing diodes)

https://www.banggood.com/pt/5Pcs-TM1638 ... rehouse=UK Note for FIVE units !

or of course the far cheaper AliX for the exact same units but a slightly longer delay in delivery ( no issue really)
https://www.aliexpress.com/item/3280148 ... 5MmJC&mp=1 for 10 pieces ! BARGAIN

You can simply remove the components and use them as remote pcbs as only the main controller ic and matrix diodes are surface mount, the rest is through hole.

VERY neat units. I gave up on the 'normal' 7219 'modules years ago as being far too big (on the display at 0.56") to be useful.

8 x 7 seg display, 8 simultaneous outputs and 8 simultaneous inputs - on 3 pins !!! amazing - and can be daisy chained with 1 extra pin per module.

edit - oh, and yes I forgot doh ! :) ... the other huge reason that I looked at these in the first place was the ability to use Common Anode as well as CC as I bought a rake of CA specialist units that were only available in that format. that means a specialist board approach, but as the external circuitry required is essentially non existent and you can mount the SOIC on a DIL/ DIP converter and use with standard 2/54mm vero board or similar. adding the additional inputs and outputs is again a really nice feature..
“Everything in moderation, including moderation.”
“Experience is merely the name men gave to their mistakes.”
Joe (CISSP) -IT security consultant

Mike Horsten
Posts: 79
Joined: Tue Dec 01, 2020 8:50 am

Re: 7 Segment Display 6 digits

#7 Post by Mike Horsten » Tue Feb 16, 2021 10:47 am

How hard is to implement these boards, with the switches and led's. I see a radio, com and nav unit appearing in my head that can easly be workable. OK its not the real thing but ten boards for 13Euro is amazing. (If they work)

I understand messageport, but AM should look into this driver chip as it available in many places.

Mike
Building a home Cessna 172SP Steam. X-plane/MFS2020
(ex Name on Airmanager forum Polarair)

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

Re: 7 Segment Display 6 digits

#8 Post by Sling » Tue Feb 16, 2021 11:18 am

Mike Horsten wrote:
Tue Feb 16, 2021 10:47 am
How hard is to implement these boards, with the switches and led's. I see a radio, com and nav unit appearing in my head that can easly be workable. OK its not the real thing but ten boards for 13Euro is amazing. (If they work)

I understand messageport, but AM should look into this driver chip as it available in many places.

Mike
The issue is not how hard but as has been explained many times on these forums its how much memory space is left on the Arduino. I've not studied the protocal in depth but if people don't fancy getting to grips with message port then i suppose another micro could be used as a translator.

Tony

User avatar
jph
Posts: 638
Joined: Fri Apr 10, 2020 12:50 pm
Location: Portugal

Re: 7 Segment Display 6 digits

#9 Post by jph » Tue Feb 16, 2021 11:32 am

Sling wrote:
Tue Feb 16, 2021 11:18 am
Mike Horsten wrote:
Tue Feb 16, 2021 10:47 am
How hard is to implement these boards, with the switches and led's. I see a radio, com and nav unit appearing in my head that can easly be workable. OK its not the real thing but ten boards for 13Euro is amazing. (If they work)

I understand messageport, but AM should look into this driver chip as it available in many places.

Mike
The issue is not how hard but as has been explained many times on these forums its how much memory space is left on the Arduino. I've not studied the protocal in depth but if people don't fancy getting to grips with message port then i suppose another micro could be used as a translator.

Tony
If you open library manager in Arduino, then you can input TM1637 / TM1638.
You will find suitable libraries. You can also search google for such libraries, there are quite a few depending on which board you use.
There isn't an issue at all with memory 'space' etc, (on message port - But I fully understand what Tony is saying re inclusion in the normal 'load') it is a neat, small library. But, yes, you need to use message port. Have a look at the libraries and see if it is for you. You wouldn't need a translator micro unless you needed a TM to 7219 (or supported) device in AM where it could be used as a pre-programmed device which would be extremely difficult - to say the least due to differing board layouts (around3 that I know of - maybe 4!)- . but that would also be extremely difficult due to the superb button input and also digital output support that would need to be also added to the bridge. It is though, a great device. but again, be aware that there are around 3 - or more - different boards offering different layouts. This obviously leads to problems with any form of standardisation, although, most libraries support all types if you select the type you have. - it is also fairly easy to decide on a supported type.
The 'issue' is also that there is apparently no need to use this in AM as a direct interface, as 99.9% of people (I am guessing but hey :) ) use the ubiquitous 7219. - and to be honest, it is a great, cheap and readily available device.
I asked about this quite a while back - as to including support in AM the answer was per - as above.

Joe
“Everything in moderation, including moderation.”
“Experience is merely the name men gave to their mistakes.”
Joe (CISSP) -IT security consultant

Mike Horsten
Posts: 79
Joined: Tue Dec 01, 2020 8:50 am

Re: 7 Segment Display 6 digits

#10 Post by Mike Horsten » Wed Feb 17, 2021 10:35 am

Thank Tony and Joe for the background info.

If memory is an issue (sorry have see this but dont know how much mem is left), why not use a ESP with 4mb of memory with multiplexers for more access and more possibilities. The ESP32 has about 4MB of internal flash memory and since the data stored within the flash memory is retained even when power is recycled, it becomes super useful for applications where you need to keep certain amount of data even after power off. This could mean plug in and forget for leds, displays, buttons, switches and pod's all that dont need a visual display. Do i see this correctly or is this the wrong path.

Mike
Building a home Cessna 172SP Steam. X-plane/MFS2020
(ex Name on Airmanager forum Polarair)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest