Does anyone here have a pointer to a PORT map for the Mega ( to get an idea of what I want to do if I don't do a good job explaining it here, look here: http://www.instructables.com/id/Arduino-is-Slow-and-how-to-fix-it/). I want to be able to do direct PORT access on the Mega rather than DigitalRead's and Writes in order to speed up I/O but I can't find documentation comparable to what's offered for the 168 in the above article.

Views: 221

Reply to This

Replies to This Discussion

The APM code does very little GPIO frobbing, so there's not much to be won here...

Universalr rule of performance tuning - measure first.
Actually this is for a different project where, in fact, quite a bit of "frobbing" is going on. I posted here figuring there to be a lot of folks on intimate terms with the Mega.
If you want to use the ATmega1280 chip i/o directly within Arduino you need to look at the the Arduino schematics to match the high level pins with Atmel 1280 hardware pins/ports. http://arduino.cc/en/uploads/Main/arduino-mega-schematic.pdf

Sooner or later you also want to start reading the Atmel datasheets. There are plenty of nice hardware features in the 1280 that is not utilized by Arduino. http://www.atmel.com/dyn/resources/prod_documents/doc2549.pdf
Thanks ... THAT is exactly what I was looking for. Port mapping. Where did you get it?

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service