Skip to content

Software serial #48

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

Merged
merged 21 commits into from
Aug 15, 2019
Merged

Software serial #48

merged 21 commits into from
Aug 15, 2019

Conversation

nseidle
Copy link
Member

@nseidle nseidle commented Aug 15, 2019

SoftwareSerial v1.0 is ready. I'm happy with the performance.

  • Any pin can be used for software serial receive or transmit at 300 to 115200bps and anywhere inbetween.
  • Any number of SoftwareSerial ports can be created (tested to five)
  • Works with enableBurstMode() (96MHz)

Limitations (similar to SoftwareSerial built into standard Arduino core):

  • RX on one pin at a time.
  • No TX and RX at the same time.
  • TX gets priority. So if Artemis is receiving a string of characters and you do a Serial.print() the print will begin immediately and any additional RX characters will be lost.
  • Uses Timer/Compare module H (aka 7). This will remove PWM capabilities on pad 11.
  • Parity is supported during TX but not checked during RX.
  • Enabling multiple ports causes 115200 RX to fail (because there is additional instance switching overhead)

I believe pads 11, 48, and 49 are disabled when we take over CMPR7. 48 and 49 are used as an actual UART so really only pad 11 is disrupted.

@oclyke - WRT pads loosing PWM capabilities: I remember you mentioned table 818 had a few duplicate outputs that perhaps you had programmed around? I don't see any other pads that are A7OUTB or whatever but realized you may have used output selection 3 on some pads. Please let me know if you pulled in a #7 pad and I'll add the note to 'does not work with pads 11, or X'.

@oclyke
Copy link
Contributor

oclyke commented Aug 15, 2019

@nseidle You're right that 11, 48, and 49 are affected -- additionally pad 37 uses 'REG_CTIMER_INCFG' set to 7 by default so it is affected as well. OTTOMH I can't see a way to move any of these pads to another default because they are already used by other pads.

@oclyke oclyke merged commit 365d1cb into master Aug 15, 2019
@oclyke oclyke deleted the SoftwareSerial branch August 15, 2019 20:37
@nseidle
Copy link
Member Author

nseidle commented Aug 17, 2019

Awesome. Thanks for checking that. FYI - I updated the notes on the library files and pushed to master the following:

* Uses Timer/Compare module H (aka 7). This will remove PWM capabilities
on pads 11, 37, 48, and 49.

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.

2 participants