AVR Tutorial 2: AVR Studio Quick Start Guide

In this tutorial, I am going to show how to use AVR Studio IDE and WinAVR in developing software for AVR microcontrollers. In this tutorial, my target AVR microcontroller is ATmega8 and I will be using AVR Studio version 4.18.700. I am assuming that you have downloaded and installed WinAVR and AVR Studio. If you have not installed both, please do so. Installation must be straight forward and please use the default installation directories to avoid confusions.

If you have already installed AVR Studio and WinAVR, then you are ready to get started with the software development.

1. Run AVR Studio by double-clicking the AVR Studio icon on your desktop or by going to Start->Programs->Atmel AVR Tools->AVR Studio 4.

[Read more...]

Pages: 1 2 3

AVR Tutorial 1: Introduction

Good day! Today, I am starting a new series of microcontroller programming tutorials. This series of tutorials is about AVR microcontroller programming using C language.

Before we get started, let me express my assumptions while writing this series of tutorials. In this series of tutorials, I am assuming that the reader is already familiar with C programming language. I am assuming that the reader knows how to read a schematic diagram, construct a circuit based from a given schematic diagram, and analyze electronic circuits. I am also assuming that the reader is able to use Windows applications. [Read more...]

Pages: 1 2 3

8051 Tutorial 4: 8051 Timer/Counter Programming in C

This tutorial is about using the internal timers/counters of 8051. This will tackle the registers associated with the internal timers/counters of 8051 and this will also enumerate the steps on using the timers/counters of an 8051 microcontroller.

The Timers/Counters of AT89C2051

The AT89C2051 has two 16-bit Timer/Counters: Timer0 and Timer1. This means that it can time/count from 0 to 65535 (2^16-1). The timers can be used to generate accurate delays and the counters can be used to count events. An event can be anything. It can be a pulse, a push, a pull, or any stimulus. [Read more...]

Pages: 1 2 3

8051 Tutorial 3: I/O Port Programming in C

This tutorial will introduce you the basics about programming the input and output ports on an 8051 microcontroller using C language. Therefore, it is recommended that the reader is familiar or has basic knowledge about C programming language and electronics circuit analysis. I am going to use Atmel‘s AT89C2051 as an example for the 8051 microcontroller and the C compiler that I am going to use is the RC-51 which is included with the Free Evaluation 8051 Software Toolset of Raisonance. You may see this for more info about the toolset or you may download the free evaluation 8051 Software Toolset  here(RKit-Eval51). See this tutorial for a quick start guide with this software.

For an introduction about AT89C2051, see this.

AT89C2051 General Input and Output Ports

The original 8051 microcontroller (40 pins)  contains 4 digital input and output ports which are P0, P1, P2, and P3. Its little brother, AT89C2051 (20pins), only contains two bidirectional input and output ports which are P1 and P3. Both ports are one-byte (8-bits) wide and each pin of each port can be accessed externally (see the pin diagram below) except bit 6 of P3 or P3.6.

[Read more...]

Pages: 1 2 3

8051 Tutorial 2: Raisonance’s Free Evaluation 8051 Software Toolset

In this tutorial, I am going to discuss how to create a C project intended for 8051 family of microcontrollers. I am going to use the free evaluation toolkit for 8051 from Raisonance. This tutorial aims to discuss the basics of creating project using the toolkit from Raisonance. However, the reader is advised to read the documentation of the said toolkit for more advanced usage and configuration.

What is the Free Evaluation 8051 Software Toolset of Raisonance?

The Free Evaluation 8051 Software Toolset of Raisonance is a free development tool provided by Raisonance that enables developers to compile and debug applications using 8051 microcontrollers. This toolset includes the following:

  • Ride6 integrated development environment
  • RC-51 ANSI C compiler, output up to 4Kbytes of code
  • MA-51 Macro Assembler, output up to 4Kbytes of code
  • LX-51 Code Banking Linker, output up to 4Kbytes of code
  • KR-51Tiny RTOS, supports up to 3 tasks
  • SIMICE-51 Simulator, debug up to 4Kbytes of code

For more info about this toolset, you may visit this. You may also download the toolset (look for RKit-Eval51) here. [Read more...]

Pages: 1 2