I'm new to Arduino, and am learning by a sort of osmosis that there are many useful constants pre-defined in the Arduino core. However I have not been able to find a comprehensive listing or reference to them. If I've missed it I'll be very happy for a pointer!

A master reference to all pre-defined constants may need to bridge libraries and could be a PITA to maintain, but it would seem to be a VERY useful reference. Things like timer registers, pin definitions... true/false - whatever - there should be a master, printable reference PDF somewhere - if there isn't already!

=Alan R.

+++++++++++++++++++++++++++++++++++++The completion date of a software project is 2 weeks from any given date.

Well, all the Atmel-defined symbols (timer registers, for instance) should get defined via the <io.h> include that is part of gcc. The chip datasheet is probably the reference for those. The m328 has about 100 registers, each of which has individual names for most of its individual bits (because you know PORTA4 might somehow have a different value than PORTB4), so a full listing is probably going to be too cluttered to be useful.

arduino.h is going to have most of the arduino-specific values; there are a lot less of those.

I simply got a PDF of the Atmel ATmega/xxx/328P datasheet (a mere 450 some pages!) and, while not in an particular order, I think every constant in the Arduino world can be found there. Makes for some (dry) but enlightening reading!

Now - if you think 450 pages is big, you should checkout the datasheet (more like "data-WarandPeace" for the chip in the DUE - the Cortex ARM SAM3X... that puppy weights in at 1467 pages!

=Alan R.

+++++++++++++++++++++++++++++++++++++The completion date of a software project is 2 weeks from any given date.

I simply got a PDF of the Atmel ATmega/xxx/328P datasheet (a mere 450 some pages!) and, while not in an particular order, I think every constant in the Arduino world can be found there. Makes for some (dry) but enlightening reading!

Now - if you think 450 pages is big, you should checkout the datasheet (more like "data-WarandPeace" for the chip in the DUE - the Cortex ARM SAM3X... that puppy weights in at 1467 pages!

=Alan R.

Actually no, you found none of the Arduino constants, but rather you found AVR constants.

The IDE core file Arduino.h contains the majority of the Arduino defines, constants, and macros, which in turn also includes several other files with most (all?) the avr defines, constants, and macros used by the arduino IDE:

// Get the bit location within the hardware port of the given virtual pin.// This comes from the pins_*.c file for the active board configuration.

#define analogInPinToBit(P) (P)

// On the ATmega1280, the addresses of some of the port registers are// greater than 255, so we can't store them in uint8_t's.extern const uint16_t PROGMEM port_to_mode_PGM[];extern const uint16_t PROGMEM port_to_input_PGM[];extern const uint16_t PROGMEM port_to_output_PGM[];