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

All-in-One AVR Development Tool

If you are an AVR fan, you must be familiar with most of Atmel’s AVR development  tools: STK500, AVR Studio, AVRISP, AVR TJAGICE, AVR JTAGICE mkII, AVRISP mkII, STK600, etc. But there is one Atmel AVR development tool that provides ISP programming, High Voltage Programming, and debugging which comes in small form, beautiful box, and cheap price.

The development tool that I am talking about is the AVR Dragon.

[Read more...]

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

8051 Tutorial 1: Introduction to AT89C2051

What is 8051?

The 8051 is a popular 8-bit single chip microcontroller which was first introduced by Intel. The first 8051 microcontroller is a 40-pin device which has 4kB of program memory, 128 bytes of RAM, 2 timer/counter, 1 UART, and six interrupt sources.

Later on, the 8052 microcontroller was introduced. The 8052 microcontroller is a better version of 8051 microcontroller. It has 8kB of code memory and 256 bytes of RAM. It also has an additional timer.

8051 became very propular and it became an industry standard. Due to its popularity, many semiconductor manufacturers like Atmel, Infineon Technologies, Maxim Integrated Products, NXP, ST Microelectronics, Silicon Laboratories, Texas Instruments, Cypress Semiconductor, etc have included 8051 in their line of products. [Read more...]