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 LGT8F cpu #313

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

jayzakk
Copy link

@jayzakk jayzakk commented Aug 6, 2020

Add support for the LGT8F-series of CPUs, which behave different from original Atmega due to 4 byte SPI buffer.
Before, SPI does not work, because DC changes level in the middle of a byte - the macro did not know of the SPI buffer and instantly returned instead of waiting for the full sent byte.

For minimal changes, just to make it work, I only changed the AVR_WRITESPI define.
I did not implement the 4 byte buffering (which would make the 16-bit-writes a little bit faster)

As a side note, I also changed the default SPI frequency to 16MHz (at 32MHz CPU speed) for this CPU.

Background:
The LGT8F-Series is a cheaper Atmega328D/P "clone" with more features and faster core, running up to 32MHz.
It's not unusual to get Arduinos with this chip if you buy some Nano or Pro.

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