Skip to content
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

Add inverse_logic capability as per SoftwareSerial. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Matthew-Marks
Copy link

I had to add this functionality for the hardware I have, and it seems to work on that. I have not tested it in non-inverse mode!

@SlashDevin
Copy link
Owner

Thanks for adding a feature!

Have you tried all three baud rates? The changes should have minimal impact on the timing, but you should probably use a second Arduino to try both inverse & normal modes and all 3 baud rates.

If you don't have one, there's a test program (for a Mega) in the test subdirectory. It tries a few different things (all character values, RX only, TX only, TX then RX, RX then TX), with Serial3 connected to the NeoSWSerial port. There is a certain amount of synchronization with this kind of test, so it's not the best. A second Arduino (fully asynchronous) is the only way to catch some timing issues.

Thanks again.

@Matthew-Marks
Copy link
Author

You're welcome. I tested on a 328 with 19200. No spare serial ports, but I also have a 168 board (should be compatible with the 328) so I'll add that to the same #define and connect them together.

@sandervandegeijn
Copy link

Would like to have this feature as well.

@SlashDevin
Copy link
Owner

I'm concerned about the timing impact at 38400. If it adds too many cycles, the inverse option may have to be selected at compile-time, not passed in as a run-time argument. Sorry I don't have time to test it. @neographikal, is it something you could test?

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

Successfully merging this pull request may close these issues.

3 participants