-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Mobiflight allows pins A6 and A7 for digital use on Nano boards #1766
Comments
Same as #1757 |
We should also prevent D13 from being used as an output on Mega boards. The way to do this is:
Note that this could cause issues with existing configurations that might use these pins in an incorrect way. The code would somehow need to also make sure that the pin shows in the dropdown if it's the current pin, even if it isn't valid per the new rules. |
The original Arduino MEGA 2560 has an OpAmp connected to Pin D13, means this Pin can be used as Input and Output without any restrictions schematic Clones don't have this OpAmp, so there are some restrictions:
I would not restrict the use of Pin 13 as it's usable on original ones, but clearly state that the above mentioned restrictions apply for clones. The information that pins A6 and A7 are only useable for analogIn and not digital for the Nanos are also widely spread in the internet. I would do the same as for the Mega, clearly state this restriction. Now the question is where to do it. Maybe we could add an information in the board.json file which gets displayed in the Configured Modules window. This would be shown everytime the board is selected as an additional information. |
Also Pro Micro does not have a LED on D13, so not applicable to this board. |
Wouldn't installing an external pull up resistor on D13 solve the low voltage that causes the bad input readings on this pin? |
You have to be above > 0.6 * Vcc to get a stable H signal and < 0.3 * Vcc to get stable L signal. So for H signal 0.6*5V = 3V is required, Rled is 1K and let's assume LED is ideal (voltage drop 1.5V, no resistor). This means 3.5V must be split up for the 1k resistor and the pullup resistor while the voltage drop for the 1k resistor must be 1.5V to get the stable H signal. That would also be roughly a 1k resistor. So yes, it should be possible. But my calculation has to be tested before ;) The build in pullup resistor from the board is 10k. So 3.5V has to be split up 1:10, means voltage drop on Rled is 0.35V. |
we have individual board json files. So any restriction on the pin would be specific to a single board |
Describe the bug
Current UI allows assignment of pins A6 and A7 for digital input and output. These pins can only be used for analog input. Reported by user in Discord.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
Assignment to digital input or output should not be allowed.
Actual behavior
Assignment is allowed.
Details
Additional context
None.
The text was updated successfully, but these errors were encountered: