@Corjan
I know
@Ralph mentioned that you guys were having issues testing with the MAX7219
Just a heads up of some of the issues we see.
1) I am having stability issues where all the digits are lighted sometimes and random numbers other times.
2) A few of us on the Discord cannot daisy chain more than 3 MAX7219. If we split 5 displays 3-2 then one display does not light. Yes we use an external 5v PSU
Here is some test code that we are having issues with. I do not want to go to the expense of creating a PCB if this is going to be an ongoing issue.
Code: Select all
--Zibo 737 OVHD ELEC PANEL DISPLAY
-- Add two or more characters displays, All can be daisy chained except for VCC 5V.
OVHD_elec_displays = hw_chr_display_add("OVHD Electrical","MAX7219",5)
--Function to add characters to the displays
xpl_dataref_subscribe("laminar/B738/dc_amp_value", "FLOAT",
"laminar/B738/dc_volt_value", "FLOAT",
"laminar/B738/ac_amp_value", "FLOAT",
"laminar/B738/ac_freq_value", "FLOAT",
"laminar/B738/ac_volt_value", "FLOAT",
"laminar/B738/electric/panel_brightness","FLOAT[4]",function(dc_amps, dc_volts, ac_amps, cps_freq, ac_volts, bright)
--Add tables to determine what com is displayed
local display_dc_amps = string.format("%9.0f",dc_amps)
local display_dc_volts = string.format("%9.0f",dc_volts)
local display_ac_amps = string.format("%9.0f",ac_amps)
local display_cps_freq = string.format("%9.0f",cps_freq)
local display_ac_volts = string.format("%9.0f",ac_volts)
--Set the characters and opacity of the displays
hw_chr_display_set_text(OVHD_elec_displays, 0, 0,display_dc_amps)
hw_chr_display_set_text(OVHD_elec_displays, 1, 0,display_dc_volts)
hw_chr_display_set_text(OVHD_elec_displays, 2, 0,display_ac_amps)
hw_chr_display_set_text(OVHD_elec_displays, 3, 0,display_cps_freq)
hw_chr_display_set_text(OVHD_elec_displays, 4, 0,display_ac_volts)
hw_chr_display_set_brightness(OVHD_elec_displays,0,bright[4])
hw_chr_display_set_brightness(OVHD_elec_displays,1,bright[4])
hw_chr_display_set_brightness(OVHD_elec_displays,2,bright[4])
hw_chr_display_set_brightness(OVHD_elec_displays,3,bright[4])
hw_chr_display_set_brightness(OVHD_elec_displays,4,bright[4])
end)
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