MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

icon
Avatar
lumax
Posts: 4
Hello all!
First message for me

I'm building a new rig based on 7.8.2 release and I have found a problem with the newly added analog pin on MEGA 2560, pin 58 to 69 are not registered by the arduino firmware (no tx light when input is activated and no signal on the debug mode) but pin 54, 55, 56 and 57 does work correctly

Thanks
2020-01-05 00:23
Avatar
StephanHo
From: EDDG, Germany
Posts: 1439
Supporter
Hi lumax,

welcome to MobiFlight.

Would you be so kind to report the number of connections of your Mega. How many pins are used for what kind of device and how much are these in the sum?
There is a limit of devices on every board. 40 outputs or 50 inputs max but all in all not more than 58 (ie. 40 outputs and 18 inputs or 20 outputs and 38 inputs).
Grüße,
Stephan
2020-01-05 01:05
Avatar
lumax
Posts: 4
Hi StephanHo,

I got

16 - LED Output
1 - Serial display (3 Output)
Total 19 Output

and

5 - Encoder and push button (3 input each)
34 - Switch
Total 49 Input

All in all 68 IO

I probably overlooked the "all in all not more than 58" limitation...

Thanks for your help and your fast reply
2020-01-05 01:51
Avatar
lumax
Posts: 4
I now have 19 output and 39 input for a total of 58 and I got the same problem... input 54 to 57 (A0 to A3) are working but input 58 to 69 (A4 to A15) are not working
2020-01-05 18:59
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3070
Supporter
Apollogy for your trouble....

As i said last weeks it was not possible to me to do testings in case of busy work.
Badly the New release was in this periode so i also could not make Beta Testings.

Maby Stephan can still confirm problem..... If not we will need the mfmc file ( Board device settings) to reproduce the situation 1:1
Please save this file and store it. Next week i will start testing progress..... If needed i will request the file from you.
Good Luck !
2020-01-05 20:25
Avatar
lumax
Posts: 4
Ok, I will wait until it get confirmed, I don't want to rewire again if it's not necessary

I can send you the file if you need it
Thanks!
2020-01-06 21:01
Avatar
DeltaBravo
From: Schneeberg, Germany
Posts: 77
Hi guys.

I have a similar problem. I have connected the complete Audio Control Panel to one Mega board. I also did not know, that there ist a maximum number for used pins.
The problem started when I configured the first pins, which are connected to Analog Inputs.

Then I had an idea: maybe the GND is a different one?
I don't think so, but did not try it yet.

Before Version 7.8 we had 53Pins useable minus Pin 0 and Pin 1... =51 Pins
In fact we have not 16 new pins (A0-A15) with 7.8, but 7 more. Or do I misunderstood something?

Greetings,
Stephan
PMDG based 747 Homecockpit, 3 Beamer
P3Dv4.3 QOTSII FSUIPC 5full ArduinoMega vrinsight CDU2 + cpFlight 747MCP
2020-01-17 17:29
Avatar
StephanHo
From: EDDG, Germany
Posts: 1439
Supporter
Hi Stephan,

you counted right

but

you can only use a sum of totaly 56 pins, not the "old" 51 and additional the 16 "new" ones.
The next limit is a maximum of 40 outputs. Then you have further 16 pins for inputs.
Theoretical it is possible to use 67 pins only for inputs or 40 outputs and 27 inputs. But this is a thing that Sebastion has to decide.

The GND of a Mega is always the same GND. If you use more than one Mega, you should merge the GND in a star shape. This is also valid if you use other external circuits or power supplies.
Grüße,
Stephan
2020-01-17 23:17
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3070
Supporter
Hi guys....

Badly i already not find time to do this. Overall in not understand the logic myself and would think on first view same way like DeltaBravo.

We got 51 Pins in the Past ..... Get the posibility to use the 16 Analog Pins now in New Release...... So so only logical result would be to increase the MaxPin Number to 67.
So i not can understand the magical number "Maximum 56 Pins" ...... Sensless to implement 16 new Pins but just increase tha maximum by 5.
Maby there is a internel border so Mobiflight or Mega can only handle 56 Pins with our Firmware...... But then it would be much more logical to just implement Analog Pins 1-5 istead of all 16.


In case i have no time at the moment maby a OTHER User like to do the needed testings....

1. Use a new Mega ( or a clean old one by EEPROM)
2. Flash Firmware
3. Create 16 INPUTS ( Typ Button) and use all Analog Pins for it.
4. Upload to Board ( And make maby the unneeded Restart just to get sure all is fine)
5. Create 16 Input Configs..... Use for example on every Input "Key Send" and choose a,b,c,d,e, and so on.
6. TEST Your Inputs.

7. Delete all 16 Devices again and create 16 new devices for LED Outputs.... Again all the Analog Pins
8. UPLOAD and Restart
9. Create 16 Output Configs.... Read for example Parking Brake Offset or any other stuff.
10. TEST The Outputs.

11. If you like you can also test a Combination like 8 Inputs (A0-A7) and 8 Outputs ( A8-A15)

************
Summary.... We got a confirmation if all Analog Pins are working fine for INPUT or OUTPUT basicly......
If YES then all problems are just in case of "bad" limmits.... If NO there is a deeper Problem in Code Sebastian need to fix.
Good Luck !
2020-01-18 15:38
icon