Skip to content

Fixed pin definitions for the ATMega1284p - #227

Merged
focalintent merged 1 commit into
FastLED:FastLED3.1from
aphelps:1284P
Nov 23, 2015
Merged

focalintent merged 1 commit into
FastLED:FastLED3.1from
aphelps:1284P

Conversation

@aphelps

@aphelps aphelps commented Nov 19, 2015

Copy link
Copy Markdown
Contributor

This came about from issue #121. After the hint about hardware SPI I looked into the FastLED pin definitions for this chip and they were all off. I've updated the definitions based on http://pighixxx.deviantart.com/art/Atmega1284p-352919461 (and a quick look at the spec sheet to verify these).

After these changes I now have FastLED driving my WS2801 strands with and without hardware SPI. I also did a quick test with a strip of WS2812B's and they appeared to work as well.

@aphelps aphelps mentioned this pull request Nov 19, 2015
@focalintent

Copy link
Copy Markdown
Contributor

The problem with pin definitions is they're fairly board specific - the initial 1284p pin definitions that I had put in were based on some board out there that let you drop a 1284p into the slot where a 328p had been in the original uno layout. What 1284 board are you using/working with - or are you just using a bare 1284? (Want to see if there's a way to refine the define checking to have both sets available)

@aphelps

aphelps commented Nov 23, 2015

Copy link
Copy Markdown
Contributor Author

These are custom boards I've been developing, using the generic Mighty 1284p bootloader (from https://github.com/JChristensen/mighty-1284p). I think that has the same pinout as the Mighty-Mini bootloader, as well as the MoteinoMega (http://lowpowerlab.com/blog/2014/08/09/moteinomega-available-now/) which I'd also tested this with when I was debugging why it wasn't working.

You're right that pin outs differ between boards, but this one seems pretty standard as its what is used in the "generic" hobbyist bootloader for this chip (and is a straight-forward mapping between the chip's pins and the software pin values). Since there isn't an official Arduino using this chip there isn't a right way, but I do think someone randomly developing using a 1284 is more likely to expect this set since its the first match if you google for "1284p bootloader" or "1284p pin map".

@focalintent

Copy link
Copy Markdown
Contributor

Sounds good to me :) Like i mentioned, my only exposure to the 1284 up until now had been the drop in chip someone else mentioned using. I'll pull the request in! Thanks again!

focalintent added a commit that referenced this pull request Nov 23, 2015
Fixed pin definitions for the ATMega1284p
@focalintent
focalintent merged commit fbfbe69 into FastLED:FastLED3.1 Nov 23, 2015
@aphelps

aphelps commented Nov 23, 2015

Copy link
Copy Markdown
Contributor Author

Glad to help. I've been working on switching a number of projects over to FastLED, its much nicer working with a single library for multiple LED chipsets so I can eliminate all the wrapper functions and #defs I'd been dealing with previously.

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