AVR Wiki

From AVR Wiki
Jump to: navigation, search

Contents

Why AVRwiki?

Most AVR and embedded programming documentation is buried in datasheets that are hard to search and require you to keep track of pages inside a 300+ page document. For beginners, this datasheet can be very daunting, hard to understand, and frankly useless. On the other hand, the mishmash of advice and code online can be very helpful but can be very misleading as well.

Compare this to most software programming documentation (for instance, an MSDN page), which is easily searchable and often has well-documented example code.

To help solve this problem, we are creating an AVR Community Wiki. The current goal is to create useful documentation for the Atmega328P by the end of January 2014.

To do so, we wish to seed mediawiki with initial data (such as acronym expansions) scraped from the official datasheet. Then, humans can correct scraping mistakes and also add example code.

All content will be public domain so far as we have the right to do so. That way, in the future people are welcome to port our documentation to whatever format they like, for instance using it as part of projects like http://explainshell.com.

Please also contribute to AVR Quickstart.

Contribute

For an example article you can copy the template from, please see PCMSK0.

Getting Started

To get started editing,

Mediawiki Syntax

  • Basic syntax: http://en.wikipedia.org/wiki/Help:Cheatsheet
  • Tutorial: http://en.wikipedia.org/wiki/Wikipedia:Tutorial
  • Annotated Article: http://en.wikipedia.org/wiki/Wikipedia:Annotated_article

Header Files

$ locate io.h | grep avr
arduino-1.0.5/hardware/tools/avr/lib/avr/include/avr

Specifically, for the atmega328P, iom328p.h has a listing of all the keywords.

We are using the most current revision of the Atmel datasheet for the Atemga328P: http://www.atmel.com/Images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet.pdf

Manual Images Screenshots of the manual pages should be uploaded with the same name as

  • [[File:PCMSK0.png|frameless|700px]]
  • [[File:External Interrupts.png|frameless|700px]]

To take screenshots, use GIMP > File > Create > Select Region, with evince at between 100 and 150% zoom, and then use GIMP > Image > Autocrop Image. Save as png for smallest size.

TODO for the future: automate this.

Additional Notes

Categories we should use

I make heavy use of templates since some articles, such as PCMSK0 and PCMSK1 and PCMSK2, should be linked together such that changes in one reflect in the other. Thus, syntax like {{Template:RepeatedText}} embeds the text directly into an article where it is used.

Protip: To get to the templates used in an article, "Edit" the whole article and at the bottom are links to the templates. If you edit individual sections mediawiki won't give you those links. For pins, I am using "x" to replace the number. So there exist articles such as INTx and PCINTx.

Other documentation I found useful:

  • http://www.mediawiki.org/wiki/Transclusion
  • http://www.mediawiki.org/wiki/Help:Categories
  • http://www.mediawiki.org/wiki/Help:Magic_words
  • http://www.mediawiki.org/wiki/Help:Templates
  • http://en.wikipedia.org/wiki/Help:Wiki_markup
  • http://en.wikipedia.org/wiki/Help:Redirect#Creating_and_editing_redirects
  • http://en.wikipedia.org/wiki/Help:Section

Extensions:

  • (installed) http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#.23ifexist
  • http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi
  • http://www.mediawiki.org/wiki/Thread:Project:Support_desk/How_to_Import_Navbox_template_to_my_wiki
  • http://www.mediawiki.org/wiki/Extension:Labeled_Section_Transclusion
  • http://www.mediawiki.org/wiki/Manual:DefaultSettings.php
  • http://www.mediawiki.org/wiki/Manual:LocalSettings.php

Stackoverflow questions of mine related to this wiki:

  • http://stackoverflow.com/questions/21085676/mediawiki-same-section-with-multiple-names-section-aliases-synonyms
  • http://stackoverflow.com/questions/21095880/mediawiki-in-a-link-pass-parameter-to-template-mediawiki-without-transclusion
  • http://stackoverflow.com/questions/21093557/mediawiki-how-to-display-a-link-only-if-the-page-exists