Protostack
Home | Online Store | Tutorials | Library | Shipping & Returns | Contact Us
RSS feed Tutorials Feed

Archive

Category: Tutorials

8 Breadboard Hacks

19-Sep-2011 6:35am
8 Breadboard Hacks

A few hacks to make bread boarding easier…

1. Hacking the power buses

The power buses on a breadboard are constructed in multiple pieces. To get continuity down the length of the bus Continue reading “8 Breadboard Hacks” »

ATmega168A Pulse Width Modulation – PWM

25-Jun-2011 4:36pm
ATmega168 Pulse Width Modulation - PWM

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).

Continue reading “ATmega168A Pulse Width Modulation – PWM” »

Extending Terminal Blocks

12-May-2011 8:58pm
Extending Terminal Blocks

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?

Continue reading “Extending Terminal Blocks” »

Soldering is Easy

15-Apr-2011 4:17pm
Soldering is easy

Jeff Keyzer, Mitch Altman and Andie Nordgren have created a seven page comic book about soldering. The style reminds me a little of Forrest Mims’ Getting Started in Electronics.

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:

“Soldering is Easy” Comic Book (PDF)

Analogue to Digital Conversion Interrupts on an ATmega168A

3-Apr-2011 1:41pm

Analogue to Digital Conversion Interrupts on an ATmega168

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…

Continue reading “Analogue to Digital Conversion Interrupts on an ATmega168A” »

Analogue to Digital Conversion on an ATmega168

13-Feb-2011 8:44am

Analogue to Digital Conversion on an ATmega168

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.

Continue reading “Analogue to Digital Conversion on an ATmega168” »

Reading and writing Atmega168 EEPROM

9-Jan-2011 11:32am

Reading and writing EEPROM

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” »

AVR Eclipse Environment on Windows

29-Dec-2010 8:35am

AVR Eclipse Environment on Windows

In this tutorial we will show you how to setup an AVR Eclipse development environment on Windows.
Continue reading “AVR Eclipse Environment on Windows” »

AVR Memory Architecture

23-Dec-2010 1:55pm

AVR Memory Architecture

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” »

Timer interrupts on an ATmega168

24-Sep-2010 5:04am

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.


Timer interrupts on an atmega168 microcontroller

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.

Continue reading “Timer interrupts on an ATmega168” »