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 support for the Arduino Leonardo (m32u4) #50

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

Conversation

skywodd
Copy link

@skywodd skywodd commented Jan 29, 2019

This commit add support for the Arduino Leonardo and other compatible boards with an ATMega32U4 microcontroller.

Changes: No change to the inline assembler code or timings were made, only a minor tweak of the memory layout was required.
This modification should not have any impact on performance. It's just a bits position modification.

All modified code is wrapped with if defined(AVR_ATmega32U4) to avoid any compilation error on others platforms.

Known limitations: Will not work with the Adafruit RGB Matrix Shield in the default jumpers wiring configuration. Cutting the jumpers and rewiring is required.

Pinout is

  • A5 -> R1
  • A4 -> G1
  • A3 -> B1
  • A2 -> R2
  • A1 -> G2
  • A0 -> B2

CLK can be used with the pin D12, D6, D4, D3, D2 or D0 / D1 (if you don't plan to use Serial1).

A, B, C, D can be on any other pins, but D8, D9, D10 and D11 are recommended for easy wiring.

The new code was tested with a 32x32 matrix, all examples are working.

This commit add support for the Arduino Leonardo and other compatible boards with an ATMega32U4 microcontroller.

No change to the inline assembler code was required, only a minor tweak of the memory layout.
Please see the diff for more details.

Pinout is 
+ A5 -> R1
+ A4 -> G1
+ A3 -> B1
+ A2 -> R2
+ A1 -> G2
+ A0 -> B2

CLK can be used with the pin D12, D6, D4, D3, D2 or D0 / D1 (if you don't plan to use Serial1).

A, B, C, D can be on any other pins, but D8, D9, D10 and D11 are recommended for easy wiring.
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.

1 participant