Jump to content

Ka50 BS3 - DCSBIOS and Max7219 displays


Jocman

Recommended Posts

Posted (edited)

Briefly: I designed the RS485 interface so to: host a nano onboard, a power input (+12, +5, GND), a RS485 input, a +5/GND power rail all around the arduino pins, a +12V/GND power rail, a sort of "RS485 output" to connect a mega (instead of the onboard nano). Nano or mega are powered only by 12V (this voltage is only to power all the arduino microcontrollers).
As the double power is provided by a PC PSU, both voltages share the GND (and this could fix the problem of a shared common GND).
The MAX487 chip is powered by +5V coming from arduino regulated out (to be sure the RS485 chip gets constant voltage).
All the other stuffs (LEDs, pots, etc, and obviously MAX7219 boards) needing someway power, are powered directly by the +5V power rails (+5V and GND)

Before moving anything, I wish to try something else. As everything worked fine when the MAXs got the +5V directly from the mega, I'll try the same with the original nano, and see what happens.....


Edited by Jocman

Jocman

"For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return" (L. Da Vinci)

Prev. Projects:

https://forums.eagle.ru/showthread.php?t=50071

Link to comment
Share on other sites

GOT IT !!!!

Or I hope so.

2 days ago I connected the boards, but, for some reasons (unknown), that time the mega neither worked. No way to let him work properly.

My test with the +5V even on the nano failed; more, the nano got frozen when tried to rotate the encoders (all the boards with switches, encoders, etc keep working fine).

So yesterday and today (at work 😆😆) I've been thinking about the only things to do: work on software side of the problem.

So I deleted all the code related to the 3rd MAX7219 (just for information, I don't know how, but I fried the 3rd MAX......) and re-wrote it by using external custom function (really stupid, but effectives...) instead of an endless "if" checks, and after some test (messed) everything works !!! on a nano !!!. With no freezing, or strange behaviours or anything else. I turned and re-turned all the encoders, continuously, quickly, slowly, everyway, but the displays (all the displays !!!!) work perfectly. The displays are really quick responsive.

At least via direct USB.

Tomorrow I'll try on RS485 (single board then all the boards) and we'll see what happens.

I'll post the news....

Anyway, I passed from about 700 code lines to the half.

  • Like 1

Jocman

"For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return" (L. Da Vinci)

Prev. Projects:

https://forums.eagle.ru/showthread.php?t=50071

Link to comment
Share on other sites

UPDATE.

I tried with the RS485 bus.

But, unfortunately, nothing changed. Or more precisely: now the board (the display's nano) doesn't freeze anymore (and this is a great goal).

But still now:

- if the board is the only one on the RS485, it works (even if I've some problem with some displayed numbers when changing some value, but is not so relevant, only annoying)

- If just a second board is connected to RS485, the 3rd MAX keeps stop working.

The only way to have all the boards correctly working is to switch the display board to IRQ SERIAL. Doing so, everything works great: all the switches, LEDs, pots and so (RS485) work correctly, all the displays (IRQ) work smootly, quickly and correctly.

And via IRQ I don't have the annoying issue with the displayed numbers...... 🤔

BTW, after all this experiments, I think there should be an issue with the RS485 coding; I'll pin the issue on github.

Anyway, attached is the new sketch version, if someone is curious. And if you have some question about my code, or if you see something to make better, let me know.

NewDisplays.ino

  • Like 1

Jocman

"For once you have tasted flight you will walk the earth with your eyes turned skywards, for there you have been and there you will long to return" (L. Da Vinci)

Prev. Projects:

https://forums.eagle.ru/showthread.php?t=50071

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...