Sometimes in embedded design you may want to go wireless. Might be you will want to log various readings of remotely placed sensors, or simply build a remote control for robot or car alarm system.
Radio communications between two AVR microcontrollers can be easy when specialized modules are used. Lets try to run very well known RF modules TX433 and RX433 that (or similar) can be found almost in every electronics shop and pair of them cost about ~15 bucks.
Transmitter and receiver modules are tuned to work correctly at 433.92MHz. Transmitter can be powered from 3 to 12V power supply while receiver accepts 5V. 5V is common for AVR microcontrollers so no problems with interfacing. Modules don't require addition components – just apply power and connect single data line to send information to/from and that's it. For better distances apply 30 – 35cm antennas. Modules use Amplitude-Shift Keying(ASK) modulation method and uses 1MHz bandwidth.
Most of AVR microcontrollers have Analog to Digital Converter (ADC) integrated in to chip. Such solution makes embedded designers life much easier when creating projects and programming them. With no need external ADC PCB takes less space, easier to create programs – it saves time and money. As an example lets take Atmega8 microcontroller which have up to 8 ADC inputs most with 10-bit resolution(excluding ADC4 and ADC5 inputs that are 8-bit). All features of AVR internal ADC can be found on official ATMEL AVR datasheets, but most important to mention are:
±2 LSB accuracy – so measurements aren't very accurate. If AREF voltage is 5V then error may reach ±0.04V but this is still good results for most of tasks;
Integral nonlinearity ±0.5 LSB;
Conversion speed up to 15kSPS at maximum resolution. This is far not enough for 20kHz audio signal sampling.
ADC unit is powered with separate power supply pins AVCC with AGND, but AVCC must not differ ±0.3V of VCC. Also ADC unit can have different voltage reference sources selectable in ADMUX register. References may be taken from AREF pin, AVCC with external capacitor or internal 2.56V voltage reference. All ADC inputs are multiplexed via multiplexer. Each channels can be selected by changing 4 bits in ADMUX register. ADC unit can operata in two modes:
WinAVR comes with Programmers Notepad UI by default. It is very powerful editor, but if you want more robust UI with better project management abilities you can try Java based Eclipse IDE. It is universal open source IDE which supports almost any compiler by using plugins. Eclipse has some nice features that makes it attractive, like Subversion integration, code completion in editor.
Thomas Holland has been working on AVR plugin for Eclipse which allows to use Eclipse features with AVR-GCC compiler. The newest release has nice set of features and updates like: automatic makefile generation, MCU type and clock frequency can be selected during project creation, project can be compiled for debug only or as complete release with flashable hex files, tool-chain has integrated assembler, nice viewer showing information about processor used where you can find all registers, ports, interrupts in one convenient place for quick pick-up.
This is really good news before Christmass. Brand new WinAVR release is ready for download. It has many updates, bug fixes and changes, that should make life easier for AVR programmers. What's new in WinAVR20071221: