-
Notifications
You must be signed in to change notification settings - Fork 298
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
Consider changing x7 pinmapping, which is particularly strange #12
Comments
Concerning that this is a large issue with this chip, as long as it is documented and highlighted, this could be beneficial. Since when I first programed the chip, I issued pin numbers just like the first example. It seems intuitive this way. Possible problem areas that come to mind:
I guess in the end, as long as it doesn't break anything currently working, I am for the change. |
|
I don't redefine the core constants, I meant more like... I create my own constant called "SPICLOCK" and define it as 13. That way if I copy/pasted my code into a new compiler or uploaded to a new chip, most of the code is constant. Yeah, software is whatever you tell it. I had to bit bang my own SPI code and just told each pin to output the right signals. My concern came from the library I am using right now, for the CC3000. In their example program they tell you to use hardware SPI, and don't allow you to specify the pin locations. They even have a note saying: // Use hardware SPI for the remaining pins Which kinda makes me concerned to change it, without thinking too hard about what that means. But if this is simple paranoia and hardware SPI takes care of that then it should be fine, or if the pin mapping on affects digitalWrite()/digitalRead(). |
As I read that (and looking at the code), what they mean is that you need to use the hardware SPI pins, and, if you're using an uno, those are the pins they're on. You shouldn't need to specify the pins, I don't think. In any event - there is now another submenu when x7 is selected to choose the pinmapping :-) Let me know what I screwed up, I'm sure I missed something. I also found and corrected a few issues in the pin mapping in general) |
This pin mapping is rather strange, and afaik, everyone whose used this core with the x7 has complained to me about it.
I propose renumbering the pins so that the arduino pin number matches the PCINT number. So the numbers will start at physical pin 1, PA0, as 0, and go down that side to PA7 on physical pin 10 as pin 7, then starting from the other side with arduino pin 8 mapped to PB0.
Only awkward bit is that if a crystal is used, that would take 12 and 13, but there'd still be a 14.
For easy reference, current mapping is:
The text was updated successfully, but these errors were encountered: