7 segment display reverse digits
-
- Posts: 30
- Joined: Wed Dec 25, 2019 8:55 pm
7 segment display reverse digits
Have been using AM for many years. Recently purchase some high quality 4,5,6 digit 7 segment displays which have the Max7219 chips and board already attached.
Unfortunately the digits on the display are reversed. For example the transponder(Zibo737) should read "5236"- the display shows "6325).
hw_chr_display_set_text(display_chr_radio1, 0, 0, string.format("%07d", xsponder) ) works just fine. On the AM screen(bottom right) it display the proper INT readout from the sim, even when changing the squawk. I'm sure this has been discussed before but can't find the solution in the forum. Any help will be appreciated. Even with a test fixed code the digits are reversed. Photo of test bench.
Unfortunately the digits on the display are reversed. For example the transponder(Zibo737) should read "5236"- the display shows "6325).
hw_chr_display_set_text(display_chr_radio1, 0, 0, string.format("%07d", xsponder) ) works just fine. On the AM screen(bottom right) it display the proper INT readout from the sim, even when changing the squawk. I'm sure this has been discussed before but can't find the solution in the forum. Any help will be appreciated. Even with a test fixed code the digits are reversed. Photo of test bench.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: 7 segment display reverse digits
Hi,
Yes when using the MAX indexing is reversed.
Keith
Yes when using the MAX indexing is reversed.
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
-
- Posts: 30
- Joined: Wed Dec 25, 2019 8:55 pm
Re: 7 segment display reverse digits
Any suggestions on how to make it right? Works OK on 8 digit max7219 but these custom pcbs are reversed as you know.
I know that Mobiflight has a setting to reverse the digits. Unfortunately it is not too kind to Xplane
Thanks
I know that Mobiflight has a setting to reverse the digits. Unfortunately it is not too kind to Xplane
Thanks
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: 7 segment display reverse digits
Hi Just to clarify.
The MAX indices from the right to left whilst the 7 segs indices from left to right.
Some popular led/max boards take this into account. most others not.
This a dig of the MAX7219 and indixes from Right to left And these led's indixes from left to right. https://www.aliexpress.com/item/1005003 ... 1802zEjn9B
Keith
The MAX indices from the right to left whilst the 7 segs indices from left to right.
Some popular led/max boards take this into account. most others not.
This a dig of the MAX7219 and indixes from Right to left And these led's indixes from left to right. https://www.aliexpress.com/item/1005003 ... 1802zEjn9B
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
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: 7 segment display reverse digits
: and off to the races we go...Joe
Keith
Keith
Last edited by Keith Baxter on Sun Aug 21, 2022 4:45 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
Re: 7 segment display reverse digits
you asked...
It doesn't 'index' anything.
It all depends on how it is wired.
It is not a 'standard'. It is absolutely 100% up to the PCB designer.
eh ?Hi Just to clarify.
The MAX indices from the right to left whilst the 7 segs indices from left to right.
Some popular led/max boards take this into account. most others not.
It doesn't 'index' anything.
It all depends on how it is wired.
It is not a 'standard'. It is absolutely 100% up to the PCB designer.
Joe. CISSP, MSc.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: 7 segment display reverse digits
Yes but AM indexes from right to left because the popular 8 digit max7219 is configured such.jph wrote: ↑Sun Aug 21, 2022 4:44 pm you asked...eh ?Hi Just to clarify.
The MAX indices from the right to left whilst the 7 segs indices from left to right.
Some popular led/max boards take this into account. most others not.
It doesn't 'index' anything.
It all depends on how it is wired.
It is not a 'standard'. It is absolutely 100% up to the PCB designer.
However if one builds a custom display then the digits are reversed. I know that because i have had that experience.
@Ralph perhaps there should be an option in the hardware
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
-
- Posts: 30
- Joined: Wed Dec 25, 2019 8:55 pm
Re: 7 segment display reverse digits
Here is the screenshot from Mobiflight. It is a simple task to reverse the digits. It would be nice if
AM had this choice.
AM had this choice.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: 7 segment display reverse digits
@Corjan @Ralph Please.old pilot guy wrote: ↑Sun Aug 21, 2022 5:04 pm Here is the screenshot from Mobiflight. It is a simple task to reverse the digits. It would be nice if
AM had this choice.
mobiflight reverse digits.png
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
Re: 7 segment display reverse digits
I think this is where the power of Lua comes in:
More information here.
https://www.educative.io/answers/how-to ... ing-in-lua
Code: Select all
string.reverse(tostring(your_squawk))
https://www.educative.io/answers/how-to ... ing-in-lua