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: 1488
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: 3325
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: 1488
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: 3325
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
Avatar
Challenger
Posts: 33
Today i tested all analogports as inputs with buttons on a original Arduino Mega:

1. No digital ports configured
2. A0 to A3 assigned: all 4 ports are working correct
3. A4 to A7 assigned: only A4 is working
4. A0 to A7 assigned: only A0 to A3 are working NOT A4
5. A0 to A15 assigned: only A0 to A3 are working
6. A8 to A15 assigned: no ports are working

So there is not only a limitation of the numer of ports i think
[Last edited by Challenger, 2020-05-16 08:21]
2020-04-07 18:24
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3325
Supporter
Thanks for testing.

Hopefully Sebastian response.... Maby in time of Corona and chaotic situation all over the world he priors his famaily at the moment ( and thats absolutly right) . I also have no personal contact since weeks.

So i just can say.... Stay patient ! :love:
Good Luck !
2020-04-07 22:07
Avatar
tunarda
Posts: 8
Hello

i am having the same problem i just plugged the arduino A15 pin one button but it didn't work.
Does not work after A4
2020-04-24 20:47
Avatar
Joe_Snuffy
Posts: 4
Ok, I ran into a similar issue, I couldn't get most of the analog pins to work when I was setting up the last of the switches I wanted on my current board. I quick checked some voltages and was getting strange readings, but with all the wires in the way it could've been just poor access to the wiring. I eventually found this thread and noticed someone did an input test but nobody did an output test. So I did, here's the video of it if it helps.

https://youtu.be/uyMjW1cc3I8

I didn't test the voltages on the lights, but they are all going through the same 100ohm resister since only one is lit at a time. You can see that A0-A4 are getting the full voltage, and A5-A15 are getting some voltage, just not enough, that could be our issue. I'm still new at this and not sure if there is a way to increase the voltage out on those pins. But, Mobiflight is definitely sending info to the pins.

I'm not sure if this helps anyone.
2020-05-20 18:53
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3325
Supporter
Thats interesting ! Thank you Sir !

We must talk about this as soon as possible when Sebastian find time to join a meeting.
I already said "Analog Pin Bug" and "Missing Config Items" are the most important priority Bugs we must fix in the next release !
Good Luck !
2020-05-20 19:43
Avatar
Joe_Snuffy
Posts: 4
Thanks for looking at that, I did go back and test the outputs. They all seem to be putting out about 2.5V.
2020-05-20 20:08
icon