Skip to content

RS485 and MAX7219 #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
Jocman opened this issue Jul 13, 2024 · 2 comments
Open
1 task done

RS485 and MAX7219 #68

Jocman opened this issue Jul 13, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Jocman
Copy link

Jocman commented Jul 13, 2024

Version

  • I am using the latest version

Aircraft

KA-50 BS3

Control


Description

I'm using 3 MAX daisychained (2 custom boards: double MAX and a single MAX, daisychained in this order), driven by a nano (only these displays on the nano, nothing else).
If the nano is the only one on the RS485 bus, the displays work correctly (now only some minor issue with the displayed number, only annoyng). But if I connect even just a second board on the bus, the 3rd MAX (the single one) stops working (no display at all - all off).

Initially I tought about a coding issue, to heavy (for the nano and for the way I made it...), but even when I made it lighter (from 700 code lines to about currently 350), i fixed only the freezing problem (even if it was the only one board on RS485 / IRQ SERIAL, in my first attempts after some continuous values changes it freezes; it was really to heavy - to not say stupid -, the microprocessor was getting crazy, I suppose...)

If I switch the displays nano on the IRQ SERIAL and the other boards (by now, in these tests, 4 nano boards, only switches, LEDs, pots and encoders) on RS485, everything works fine: all the displays work smoothly, quickly and correctly (and there's no more the annoying number issue.....).

Considering the tests I made, I can only suppose that the issue is someway related to te RS485 side of DCSBIOS. (sorry, I'm not able to check it)

I've other MAX7219 in my cockpit; without considering the 3 of this issue, there are 3 more but all single, not daisychained, and all wired to their own nano driving also switches, LEDs, and so, and all working. Well, when I tested the panels they worked. There's a 4th one MAX more, but still not tested.

For the sake of honesty, all the tests I'm performing are not really intensive, I mean, I'm testing the panels; they are grouped in 6 stacks, and until now I tested only 4 stacks (individually) but without a "massive" use of DCS, just 10-15 minutes a time, to check if the single stacks works properly. When all stacks will be tested and working, the next step will be to connect all the stacks togheter to RS485 (but the nano of this issue, by now it will run on IRQ SERIAL), and, if everything will work, a massive test.

BTW, here's the link on my posts about the issue (with attached arduino sketches) on DCS forum:
https://forum.dcs.world/topic/352777-ka50-bs3-dcsbios-and-max7219-displays/

Steps to reproduce

No response

Expected behavior

No response

Screenshots

No response

Additional context

No response

@Jocman Jocman added the bug Something isn't working label Jul 13, 2024
@charliefoxtwo charliefoxtwo transferred this issue from DCS-Skunkworks/dcs-bios Jul 13, 2024
@charliefoxtwo charliefoxtwo removed their assignment Jul 13, 2024
@charliefoxtwo
Copy link
Member

Transferring this to the arduino library repo as this doesn't seem related to core dcs-bios functionality.

@talbotmcinnis
Copy link
Collaborator

I'm wondering if this fix might help. Can you try out 0.3.11 and add #define DCSBIOS_DEFER_RS485_PROCESSING to your sketch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants