AVR programming The Baud rate: number of bytes per second. Typical is 9600 IMPORTANT HARDWARE REGISTERS: DDRx: data-direction registers (port x) -configuration for input or output (data direction) -0 is input, 1 is output -default all 0s -ex value: 0b00100101 (0b: means binary literal next) PORTx: port x data registers -on output: 1 - high, 0 - low -on input: 1 - has internal pull-up resistor, 0 - hi-Z (high impedance state), disconnected from circuit (but can sense voltage) -default all 0s PINx: port x input pins address -read only for input pins: 1 - high, 0 - low *****Variables: typedef signed char int8_t typedef unsigned char uint8_t typedef signed int int16_t typedef unsigned int uint16_t typedef signed long int int32_t typedef unsigned long int uint32_t typedef signed long long int int64_t typedef unsigned long long int uint64_t *****Headers for AVR: find the include paths by typing: avr-cpp -v /usr/local/Cellar/avr-gcc/4.9.2/lib/gcc/avr/4.9.2/include /usr/local/Cellar/avr-gcc/4.9.2/lib/gcc/avr/4.9.2/../../../../avr/include (http://www.amelek.gda.pl/avr/libc/avr-libc-reference.html#cos) ctype.h Character type test functions eeprom.h EEPROM access functions errno.h Error handling ina90.h Compatibility header for IAR C interrupt.h Interrupt handling routines inttypes.h Defines for different int data types io-avr.h Includes the correct ioXXX.h header io.h Includes other I/O-Headers ioXXX.h I/O-Defines for various AVR microcontrollers iomacros.h Several macros for I/O access math.h Various mathematical functions pgmspace.h Compatibility header for IAR C progmem.h Alias for pgmspace.h setjmp.h Provides functions for long jumps sig-avr.h AVR interrupt and signal handling signal.h Alias for sig-avr.h. Should no longer be used. stdlib.h Miscellaneous routines string-avr.h String manipulation functions string.h More string manipulation routines timer.h Timer control functions twi.h ATmega163 specific defines wdt.h Watchdog Timer control functions