kinpa / glcd-arduino

Automatically exported from code.google.com/p/glcd-arduino
0 stars 0 forks source link

Support for Arduino Micro #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Attempt to compile the GLCD demo example program with the Arduino Micro 
board selected as target

What is the expected output? What do you see instead?
Compilation errors that "Arduino pin mapping not defined for this board"

What version of the product are you using? On what operating system?
GLCD 3 on Arduino 1.0.2 on Ubuntu

Please provide any additional information below.

Original issue reported on code.google.com by wes.r.gr...@gmail.com on 9 Dec 2012 at 7:07

GoogleCodeExporter commented 8 years ago
This board is new. (Hadn't seen it yet) It is a very slight variation of 
leonardo.
I already have leonardo support working. It isn't available in a release yet.
My question on this is would it be acceptable if the leonardo, micro and the 
lillypad-USB all shared the leonardo config files or do you think they all need 
to have separate config files?

It could be argued either way.

Original comment by bperry...@gmail.com on 9 Dec 2012 at 7:49

GoogleCodeExporter commented 8 years ago
I agree.

I am fuzzy on the differences and was going to spend some time working out a 
config file myself.  

The compiler flag is identifying the card as atmega32u4 which causes the 
config/ks0108_Teensy.h file to load.  

Original comment by wes.r.gr...@gmail.com on 9 Dec 2012 at 4:10

GoogleCodeExporter commented 8 years ago
It isn't as simple as defining a config file.

The current available distribution simply looks at the processor type. This 
breaks when there are collisions. The new header files are smarter by looking 
at other defines to better detect which board/core/variant is being used. It 
isn't that difficult but it is a pain because the Arduino team didn't see fit 
to pass compiler defines to indicate this information.
The issue is that in some cases it isn't possible to detect the differences 
based on information in the header files.

As far as differences go between the Arduino Inc 32u4 boards goes, it looks 
like the LEDs on the Micro were wired to the opposite power rails used on 
Leonardo. So one uses high to light LEDs and the other uses LOW. Obvious 
another screw up by team Arduino on one of the boards.
As far as pin mapping goes, all three boards Leonardo, Micro, and Lillypad-USB 
all use the same pin mappings.
They all include the Leonardo variant to get their mappings.

The way they have done things, so far, I'm not able to figure out a way to 
distinguish between them. So they all may have to share a common config file.

But between Pauls 32u4 and Arduino Incs 32u4 boards BIG difference. The pin 
mappings are completely different. So it isn't just a simple config file 
difference in glcd to use the Arduino Inc boards. Plus, paul includes his own 
mapping information, that glcd uses when the teensy core is being used. So 
currently there is no pin mappings for 32u4 support when not using Teensy, the 
arduino_io.h file needs to have the pin mappings for their boards.

What was truly tragic and stupid in my opinion was not to use the same mappings 
as Pauls Teensy board. That way the Arduino Leonardo type boards could have 
leveraged on all Pauls libraries and other 3rd party teensy code. As is, many 
things are sub-optimal on the Arduino Inc boards - Not surprising as they 
definitely have a "not invented here" aversion.

I'll post a temporary "testing" patch that can be downloaded later today to get 
some feedback on Arduino Inc 32u4 support.

Original comment by bperry...@gmail.com on 9 Dec 2012 at 7:28

GoogleCodeExporter commented 8 years ago
This issue will be rolled in with issue #45 as it really is part of the same 
support.

Original comment by bperry...@gmail.com on 9 Dec 2012 at 7:31

GoogleCodeExporter commented 8 years ago
Sweet.  Thanks for the support.  I really, REALLY appreciate the library!

Original comment by wes.r.gr...@gmail.com on 10 Dec 2012 at 4:04