- Integrated Circuits
- Passive Components
- Buttons and Switches
- Kits & Modules
Dimming an incandescent bulb is easy. Simply adjust the current down using a potentiometer and you are done. Dimming an LED is another story entirely. When you reduce current through an LED there are unintended consequences like color shifts and dropouts. A better way is to use Pulse Width Modulation (PWM).
This week we have something that is so simple, it hardly qualifies as a tutorial, so let’s call it a “tip” and get started.
For some time we’ve stocked 2 pin and 3 pin terminal blocks. These terminal blocks have standard 5.08mm spacing, so they fit in all our development and prototyping boards. This is all good, but what do you do if you need a 4-way, 5-way or even bigger terminal block?
In any event it is a great book and will be part of a bigger book “How to Make Cool Things with Microcontrollers (For People Who Know Nothing)” which will be released later this year.
The Authors have been kind enough to release the comic under a Creative Commons license (Attribution-ShareAlike), so you are free to teach with it, color it, modify it, share it with your friends, translate it, and basically do whatever you like with it!
The complete comic book is available for download here:
Back in February, we wrote a post on Analogue to Digital Conversion. Many people mentioned that it was a bit light and they would like a more advanced tutorial. Well here it is…
Many AVR microcontrollers are capable of doing Analogue to Digital Conversion. The ATmega168 has 6 ports (8 ports on the SMD packages) that can be used for analogue input. This tutorial shows you how.
EEPROM (Electrically Erasable Programmable Read Only Memory) Is non-volatile memory, meaning it persists after power is removed. The ATmega168 microcontroller has 512 bytes of EEPROM which can be used to store system parameters and small amounts of data. This tutorial shows you how to read and write EEPROM.
Continue reading “Reading and writing Atmega168 EEPROM” »
In this tutorial we will show you how to setup an AVR Eclipse development environment on Windows.
Continue reading “AVR Eclipse Environment on Windows” »
The AVR family of microcontrollers use a modified Harvard Architecture which uses 3 types of memory, most of which are on chip.
Continue reading “AVR Memory Architecture” »
This tutorial will teach you about the 8 and 16 bit timers on an ATmega168 microcontroller. Because the ATmega168 is very similar to the ATmega48, ATmega88 and ATmega328, the examples should also work on these. For other AVR microcontrollers the general principles will apply but the specifics may vary.
What are the 8 and 16 bit timers?
Consider a wrist watch. At regular intervals it ticks and the hand moves to the next number. At any point in time you can read the accumulated count (the time) and once the time reaches a certain threshold, an event occurs (the alarm rings). Timers on AVR microcontrollers are a little like this.
The ATmega168 has two 8-bit and one 16-bit timers. This means that there are 3 sets of counters, each with the ability to count at different rates. The two 8-bit counters can count to 255 whilst the 16 bit counter can count to 65,536.
When the counters reach certain thresholds we can trigger interrupts, which cause Interrupt Service Routines (ISRs) to be executed. Timers are very handy because they allow operations to run automatically, independently of the main processing thread.