7 segment display reverse digits

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Message
Author
User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: 7 segment display reverse digits

#31 Post by Keith Baxter »

Hi, @Corjan

I have been thinking on this a bit more. I am going to suggest that a rethink is done on how 7-segment decoder/displays are handled.

Facts.
1) The operation of the various 7-segment decoder IC never changes. It is the combo/board that changes.
2) The board manufacturers either index from the left or the right.
----------------------------------------------------------
Lets look at the common TM1637.
This IC is a 6DIG display.
The 4 dig display in the wiki most likely indexes from the right and the 6 digit one that everyone is asking for indexes from the left.
ice_screenshot_20220828-085934.png
This is the TM1638.
Note how it should index from the left.
ice_screenshot_20220828-084030.png

So I would think that rather than purchasing hundred of boards from all the various board manufacturers. Just buy a few different IC types and make more of the different IC type available.

If AM has a direction argument for the 7-segment decoder/displays, then the TM1637 6DIG would work by simply changing the index direction.
This should do the trick.
display_chr_id = hw_chr_display_add("NAV1 frequency", "MAX7219", "R",1)
display_chr_id = hw_chr_display_add("NAV1 frequency", "TM1637", "L",6)

Not sure I am explaining this well but if you want we could chat on the discord when you have some time.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

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

Re: 7 segment display reverse digits

#32 Post by jph »

no, not 'FACTS'

The common tm1637 6 digit module is NOT the one you show the schematic for.
The common module (6 digit) TM1637 is wired - if you want to use a convention the same as binary - where digit 0 (zero) is the RIGHT most digit then the display digits are in the order Right to left - 3,4,5,0,1,2

Or if you would prefer left to right ordering it is 2,1,0,6,5,4
Joe. CISSP, MSc.

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: 7 segment display reverse digits

#33 Post by Keith Baxter »

Hay Joe,
jph wrote: Sun Aug 28, 2022 9:01 am no, not 'FACTS' :roll:
I think you misunderstood. I said...
Facts.
1) The operation of the various 7-segment decoder IC never changes. It is the combo/board that changes.
2) The board manufacturers either index from the left or the right.
----------------------------------------------------------

And then I said..
The 4 dig display in the wiki most likely indexes from the right and the 6 digit one that everyone is asking for indexes from the left.

But yes if it is as simple as swapping the index around that should be what we should look to.

Corjan's previous post gives me the impression that he/they are planning on purchasing a bunch of display boards from various sources and having a whole bunch of different options. I might understand incorrect.

I do not know the ins and outs and workings of each IC, but I take it they work the same. Would it not be simpler to have one 7-segment decoder that caters for all, TC1637, TC1638, MAX7219 and the 74LS series, and any other one's, than a separate ones for each type? Then just have a indexing orientation argument?


Keith

EDIT: We must not loose sight of all the radios that the likes of prosimparts and others sell.
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: 7 segment display reverse digits

#34 Post by Keith Baxter »

jph wrote: Sun Aug 28, 2022 9:01 am The common tm1637 6 digit module is NOT the one you show the schematic for.
The common module (6 digit) TM1637 is wired - if you want to use a convention the same as binary - where digit 0 (zero) is the RIGHT most digit then the display digits are in the order Right to left - 3,4,5,0,1,2

Or if you would prefer left to right ordering it is 2,1,0,6,5,4
Joe,

I was only going from this which clearly shows the 4 digit and 6 digit wired different. The previous schematic is how it should be wired.

http://www.picbasic.co.uk/forum/showthread.php?t=23968

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

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

Re: 7 segment display reverse digits

#35 Post by jph »

Semantics ;)
I did not 'misunderstand' in the slightest. Your whole premise is based on incorrect information. 'Facts' are that it is not a matter of simply swapping the digits order left to right to right to left as you alluded to.
And no, I am not 'losing sight' of anything - ask my optician :lol:
I pointed out the very 'fact' to you earlier in this thread that you cannot cover every eventuality or choice that the use may make. If you code an instrument for something that has a digital display then are you expecting AM to give the user complete choice over whatever kind of display they choose to use and from whatever source - and even whatever structure ? - that includes commercial equipment !. The commercially available stuff - ? - say, even a Hispa pedestal instrument PCB - how do you intend to allow the user to connect this to your code and then to AM ? - are you going to provide conversion PCBs ? - should AM - perhaps - have a another option to select from any possible type of PCB so the pinout can be preset, for any connector, to any possible micro or breakout board ?.
You are making things way way too complicated imo. Where does it end ? Do you move on to hardware switches next ? - should there be pull down tick boxes to enter the type you use as many different types can perform the exact same function.
AM offers YOU the chance to code any option you want to.

Luckily there are only a limited number of available options for the totally incorrect 0.36 inch display out there. I estimate 3 or 4 worth types bothering with. NONE are used on commercially sourced panels though although the driver IC - usually though, the 7219 - is used in most offerings.
Joe. CISSP, MSc.

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

Re: 7 segment display reverse digits

#36 Post by jph »

Keith Baxter wrote: Sun Aug 28, 2022 11:33 am
jph wrote: Sun Aug 28, 2022 9:01 am The common tm1637 6 digit module is NOT the one you show the schematic for.
The common module (6 digit) TM1637 is wired - if you want to use a convention the same as binary - where digit 0 (zero) is the RIGHT most digit then the display digits are in the order Right to left - 3,4,5,0,1,2

Or if you would prefer left to right ordering it is 2,1,0,6,5,4
Joe,

I was only going from this which clearly shows the 4 digit and 6 digit wired different. The previous schematic is how it should be wired.

http://www.picbasic.co.uk/forum/showthread.php?t=23968

Keith
Hi Keith, that is not a 4 and 6 digit. That is a 4 digit DP block and a 4 digit TIME block with the centre colon for flashing the seconds. - and the schematic is just a random one from an early datasheet showing the K pins in use for key scanning.. but ..

Of the available units (not including the expensive propwash ones)The 4 digit is a single block formed 4 digit LED unit and
the 6 digits commonly sold cheaply are 2 x 3 digit LED single blocks side by side. PW units are full blocks. They could have wired it differently but it makes little difference in coding as the sending code will take care of it. The digits can be placed in any order really. It would be fractionally easier in code to write a driver for the 1637 with a logical order as the 'GRID' references are from hex C0 to C5 when address at register level.

Also, there is NO 'how it SHOULD be wired' as you put it, the schematic example takes no account AT ALL of digit order. That is up to the designer. Digit 0 can be the third digit along if you want it to be. It is a simple graphical representation. - an 'example' - not an instruction. If you chose to use 6 single digit blocks then they are all digit 0 on the diagram.....
Joe

ps - nearly time to see a reverse grid in f1 !! yay !! ;) (Cue - max max max - super max max max - etc etc)
Joe. CISSP, MSc.

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: 7 segment display reverse digits

#37 Post by Keith Baxter »

Hi,

lets look at the simple 8 segment Hw chr display add
These two are for 4 and 8 digits.
ice_screenshot_20220828-164716.png
.
ice_screenshot_20220828-164754.png
If this is in place. I have difficulty understanding why all the different IC cannot be lumped into one and just the index direction swapped when needed.
Yes one dictates the "character" in the Arduino pin. But nowhere does the wiki state what the index direction is.

From where I stand, I see the basics are in place.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

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

Re: 7 segment display reverse digits

#38 Post by jph »

Hi Keith, just for info - here's a pic of the 6 digit units (with a 4 in the background)
the 2 front 6 digits are identical apart from the left one I unsoldered the digit blocks and added header sockets as I use this board for testing. The other 6 digit on the right has the tint film on so looks different but is still made up of 2 x 3 digit blocks.
The 4 digit is a single 4 digit block.
TM1637.jpg
It really is, I believe, worth noting that if anyone is building a nav / com / radio whatever then the correct size is 0.3" digits.
ALL the 7219 TM1637 and 38 units commonly sold are 0.36" units
The difference is HUGE - literally.
Heres a pic of a 5 digit 0.3" unit next to a 6 digit 0.36" unit.
The 0.3" is the correct size for 99% of usage cases.

0.3 v 0.36.jpg
It is an enormous difference. Worth getting the right size.
Again the dark colouring is the filter on the 6 digit and the 5 digit has no filter but still has the protective film fitted.
Joe
Joe. CISSP, MSc.

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

Re: 7 segment display reverse digits

#39 Post by jph »

Keith Baxter wrote: Sun Aug 28, 2022 3:18 pm Hi,

lets look at the simple 8 segment Hw chr display add
These two are for 4 and 8 digits.


If this is in place. I have difficulty understanding why all the different IC cannot be lumped into one and just the index direction swapped when needed.
Yes one dictates the "character" in the Arduino pin. But nowhere does the wiki state what the index direction is.

From where I stand, I see the basics are in place.

Keith
Hi Keith, If doing something like that then you definitely do not need the segment part if using any dedicated IC as that part WILL 100% be fixed ! - THAT is a standard, digit layout isn't.
The addressing format and code between a 7219 / 1637 and 38 are also completely different so you would still need to identify the EXACT controller type, the hardware pins used for the serial control AND the digit ordering. These are all options you can do in code for the user to select.
There are, realistically only about 4 or 5 types in circulation anyway. Stacks of possible permutations, but only a limited amount actually in the wild (all of the wrong size :()
Joe
Joe. CISSP, MSc.

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: 7 segment display reverse digits

#40 Post by Keith Baxter »

Joe,

Thank you for that info.
I too have a bunch of 7 SEG displays in red, orange, yellow, and white with blue BG of various numbers of digits. Front right bin is MAX7219 IC's
led.jpg
led.jpg (63.74 KiB) Viewed 750 times

I drive these with MAX7219 and have learnt that the standard AM max <Hw chr display add> works indexing from right to left.
1) 8 digit display. MAX7219 0DIG output go's to 4DIG on the right (4 digit led display) There are two 4 digit led displays numbered 1 -> 4
2) Therefore using the standard AM max <Hw chr display add> on a 6 digit display, MAX7219 0DIG output go's to 6DIG on the 6 digit display and MAX7219 5DIG to 1DIG on the 6 digit display
3) Therefore using the standard AM max <Hw chr display add> on a 3 digit display, MAX7219 0DIG output go's to 3DIG on the 3 digit display and MAX7219 2DIG to 1DIG on the 3 digit display.
etc

As we both agree that it is the wiring of the displays. The boards are different.
If the chips handle coding different then be it. I still feel that a indexing direction argument would be helpful and provide for easier use.

I have assisted peeps convert their hispa and other radios for use with AM. This by changing IC type and hacking code. It would be so much easier for a simple index swap.

I know that @wendy makes displays and has asked for support on some other IC's. Would be nice to get her thoughts.

I just hope @Corjan has the appetite to read through all of this and we make sense to him.. ;)
Keith
Last edited by Keith Baxter on Sun Aug 28, 2022 8:39 pm, edited 1 time in total.
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Post Reply