Skip to content

Arduino Nano Every requires workaround #40

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
ColdFrontWI opened this issue Nov 16, 2022 · 3 comments
Open

Arduino Nano Every requires workaround #40

ColdFrontWI opened this issue Nov 16, 2022 · 3 comments

Comments

@ColdFrontWI
Copy link

I have a couple of PCBs that I designed for my Warthog pit (CMSP, CMSC, and ARC-210) that require an Arduino Nano Every with the ATMega4809 microcontroller.

The boards don't work using RS485, but they do work when directly connected via USB. However, I have found that I have to first open and close a serial monitor on each board via the Arduino IDE before it will communicate with DCS. The ports are recognized by socat, but they won't talk to DCS until after the serial monitor trick.

Any idea what might be causing this? Any suggested alternative approach to make these boards work without the extra step?

Thanks,
Eric

@ColdFrontWI
Copy link
Author

And in case anyone wonders why the "Every" instead of the normal Nano it's because I'm an idiot. I designed the PCBs with the Nano in mind without realizing that the Tx/Rx pins are needed for serial coms. The Every has a second Serial connection independent of those pins.

Separately, I also didn't realize that Pin 13 can't really be used as an input because it's tied to the on-board LED, but I managed to work around that by scratching off the LED/resistor. 😁 I may redesign the PCBs to work with the base nano and add a socket for a Max487 to use it with RS485, but that's way down on the priority list.

Thanks,
Eric

@WarLord211 WarLord211 transferred this issue from DCS-Skunkworks/dcs-bios Dec 24, 2022
@AerialElectron
Copy link
Contributor

If this is still an issue, I curious if you are already using, or have tried using #define DCSBIOS_DEFAULT_SERIAL rather than IRQ_SERIAL? That would be the easiest fix for a non ATMega328 chip. That being said, I'm not aware of any official support for megaAVR 0 chips in DCS BIOS, or anyone whose tried for that matter, so unless you enjoy being a beta tester it may be best to redesign the boards with an ATMega328 or 2560 and hope you can find some in stock. I'm looking to expand the list of known supported hardware and already have a PCB designed with support for 6-30VDC input, additional 5V power for servos, integrated RS485 and USB, and an onboard LED driver for panel backlighting, but I've yet to get any surface mount ATMega1284s for a decent price to test with. Do give us an update if you got that chip working, the more options DCS BIOS can provide people, the better.

@ColdFrontWI
Copy link
Author

ColdFrontWI commented Mar 29, 2023

Sorry I missed your comment.

I am able to use the Everys just fine, and I was already using #define DCSBIOS_DEFAULT_SERIAL. The only trick is that I have to open and close the serial connections before running DCS-BIOS. To do that I use Realterm and wrote a batch script to automate the process. One row for each board replacing <X> with the port number:

realterm port=<X> baud=250000 sendquit

As for switching to plain Nanos, I'd love to but some poor planning on my part makes it complicated. I designed PCBs for a few of my panels with the Nano in mind, but didn't understand at the time that I couldn't use pins 0 and 1 because they are for the serial connection. The Every has a separate USB serial connection so pins 0 and 1 work fine.

Thanks,
Eric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants