70 likes | 322 Views
Atmel AVR. Jared Bevis September 5, 2008. AVR Features. AVR series come in both 32 and 8 bit architectures. Shares many features with the PIC such as ADCs, UARTs, SPI, I2C, pin pull ups, interrupt on pin changes, etc.
E N D
Atmel AVR Jared Bevis September 5, 2008
AVR Features • AVR series come in both 32 and 8 bit architectures. • Shares many features with the PIC such as ADCs, UARTs, SPI, I2C, pin pull ups, interrupt on pin changes, etc. • Additional feature not present in PICs is sixteen bit PWM channels (generally three per 16 bit timer). • VERY useful for servo motor applications • AVR chips offer single cycle instructions; the PICs require four clock cycles for each instruction.
Gotcha’s for Each Chip • The PIC has many auxiliary functions of pins turned on by default such as comparators or PWM channels which must be manually turned off for certain compilers to enable normal I/O functions. • The Atmel AVR has fuse settings which must be written into the device. If settings are incorrect for your application, you may render the chip useless.
AVR Software • The AVR software is written by the manufacturer Atmel. AVR Studio is available for free download. • Natively supports assembly programming. • Companion software to AVR Studio is WinAVR. • Provides a C compiler for AVR Studio. • AVR Studio projects are easily written in C and integrate well with WinAVR for compilation.
Both pieces of software are provided free without licensing hassles or royalty fees. • Download AVR Studio from http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725 • Download WinAVR fromhttp://sourceforge.net/project/showfiles.php?group_id=68108&package_id=66543 • Be sure to install AVR Studio before installing WinAVR.
Programming Hardware • Hardware is relatively cheap ~$35-$40 • Highly recommend buying your own whether you choose to use PIC or Atmel (programmers are NOT allowed to be taken outside of lab): • PIC programmer is Pickit2 • AVR programmer is AVRISP mkII • Both these programmers will program your chips in circuit using about five pins. See documentation for connection info.