Interfacing 433MHz RF Modules with 8051 Microcontroller

Hello Friends Today I am going to show you how to use a 433MHz RF module in your 8051 Projects. The 433MHz RF module is one of the cheapest ways of wireless communication other than IR that you can use in your 8051 projects.There is a receiving and Transmitting module that we will need. You can easily find them online for3-4$(150-200 Indian Rs).

Components required

  • Microcontroller (P89V51RD2) (2)
  • Resistor 10K (1)
  • Capacitor 33pF (2)
  • Capacitor 10uF (1)
  • 11.0592MHz Crystal (1)
  • 433MHz RF Transmitter (1)
  • 433MHz RF Receiver (1)
  • Buzzer(optional) (1)

Circuit Diagram and Description

Receiving circuit
Receiving circuit
Transmitting Circuit
Transmitting Circuit

Connections of the Transmitter Module:

The smaller module of the two with a crystal on it is the Transmitter module. The Pin connections for the module are as below

Pin on Module            Connection

GND               GND on 8051 Board

DATA             P3.1 on 8051 Board

Vcc                  Vcc on 8051 Board

ANT                Connected to 17.25cm long wire

Connections for the Receiver Module:

The Larger module of the two is the Receiver module.The Module has multiple GND and Vcc pins which need to be connected externally. The Pin connections for the module are as below

Pin on Module            Connection

GND              GND on 8051 Board

DATA            P3.0 on 8051 Board

Vcc                 Vcc on 8051 Board

ANT               Connected to 17.25cm long wire

About the Program

In this particular program, we are using UART to transmit 8-bit data over the RF module. The data pin of the transmit module is connected to the transmit pin of the 8051. When the Switch 4 is pressed on the 8051 Board then the ASCII value of character t is sent over the RFmodule.If this is received at the receiving 8051 then the Buzzer will turn on for 5 Seconds.

Download: Click here to download the C, Assembly and Hex file.

This article is written by Aditya Wani.

I hope you liked this microcontroller project. If you have any queries feel free to ask in the comment section below. Like our facebook page and subscribe to our newsletter for future updates. Hava a nice day!

How to create HEX file in keil for 8051 microcontroller

How to create and burn HEX file for 8051 microcontroller in keil:

Hello friends, today I am going to tell you how to create a microcontroller program file (.HEX format) and how to burn HEX program file in our 8051 microcontroller for any desired project.

Let me tell you one thing in this tutorial I am not going to learn you ‘C’ program, I am just telling you how to create and burn .hex program file in  a 8051 microcontroller (assuming that you have c program with you).

For programming a microcontroller we are going to use one of the best microcontroller programming software called “Keil”. Using this software you can compile your ‘C’ program and can check is their any errors in your program or not. After removing all errors (if any), you can create program file also known as .hex file which we are going to use for our microcontroller programming.

So let us learn – How to create a hex file for 8051 microcontroller using Keil software step by step:

(Before proceeding to our main tutorial make sure that you have your c program file (.c format or in word document), which we are going to convert into .hex file using ‘Keil’ software)

Step 1: DownloadKeil uVision3’: Click here to download keil uVision software. (After downloading install it in your computer).

Step 2: Open the Keil software, you will see following window.

Keil tutorial for programming a microcontroller 1
Keil tutorial for programming a microcontroller 1

Step 3: Now be ready for your first microcontroller project using keil software. Now we are going to do our new project, this can be done by by using following steps:

  • Click on ‘Project’ then ‘New project’. A new window will appear on the screen (Create new project). Simply type your project name (in my case it is ‘my first keil project’) and click ‘Save’.

    Keil tutorial for programming a microcontroller 2
    Keil tutorial for programming a microcontroller 2
  • When you click on save button, a new window will appear (Select Device for Target ‘Target 1’) here we are required to tell – which microcontroller we are going to use? (For example, if we are using famous 8051 family or AT89C51, then double click on ‘Atmel’ here you will see all the microcontrollers made by ‘Atmel’. Click on any one (in my case it is AT89C51) which you are going to program). Then click on OK.

    Keil tutorial for programming a microcontroller 3
    Keil tutorial for programming a microcontroller 3
  • After that another window will appear asking for “Copy Standard 8051 Startup Code to Project Folder and Add File to Project?” Click on ‘yes’.

    Keil tutorial for programming a microcontroller 4
    Keil tutorial for programming a microcontroller 4

If you observe ‘Project workspace’ which is located at the left side, you will see ‘STARTUP.A51’ file is their. It means it is the file which contains the assembly language commands of 8051 microcontroller.

Step 4: Now we are required to configure option value of our microcontroller project. For doing this click on ‘Project’ then “Option for Target ‘Target 1’”.

  • Select Tab of Target to configure value of MCU Target as : Configure X-TAL to be 12 MHz (which is initially 24 MHz)

    Keil tutorial for programming a microcontroller 5
    Keil tutorial for programming a microcontroller 5
  • Select Tab of Output and click on checkbox of “Create HEX file”. Click OK.

    Keil tutorial for programming a microcontroller 6
    Keil tutorial for programming a microcontroller 6

Step 5: Now we are ready for writing a first C program.

  • Click on ‘File’ and then click on ‘New’. A new window will appear in which we are going to write our C program. If you already have, simply paste it in this window. After completing your C program click on ‘File’ and then ‘Save’ (Shortcut ‘Ctrl+S’) . We are required to save this file with extension ‘.c’ Don’t forgot to write .c after name of c program. Figure is shown below:
  • Add Files into Project File, click command Project Components, Environment, Books…, select Tab Project Components and then select desired Add File to add into Project File.

    Keil tutorial for programming a microcontroller 8
    Keil tutorial for programming a microcontroller 8
  • In the first time, we must select Files of type to be “C Source files (*.c)” and it will display Files name that is C Language Source Code. Click icon of File named “my first keil project.c” and then click Add then close then OK.
  • Now if there is ‘my first keil project.c’ file present in the Project workspace which is at upper left of the screen, you are on your way!

Step 6: Now this is our last step of this tutorial. Here in the last step we are going to check is everything is fine without errors or not. We are checking our c program and converting it into hex file. So for doing this click on ‘Project’ and then click on ‘Rebuild all target files’ (There is also shortcut for this command on upper left). So when you click on this button you will see that your program is being compiled. If there is massage like “my first keil project” – 0 Error(s), 0 Warning(s)”. it means you have not any errors in your program and you can use its HEX file for your microcontroller.

Keil tutorial for programming a microcontroller 9
Keil tutorial for programming a microcontroller 9

Now close the software and open the directory where you save your project. Generally it is in (C:KeilC51Examples……). So there is one file containing .hex format this is your program file. You can burn this program in your microcontroller using microcontroller kit.

tags: how to program a 8051 microcontroller. how to write a program for 8051 microcontroller. keil – microcontroller programming software. step by step tutorial for programming a microcontroller. How to burn program in a 8051 microcontroller. How to create hex file in keil software for 8051 microcontroller.

LED chasing circuit using AT89C2051 microcontroller

LED chasing circuit using AT89C2051 microcontroller:

Function:

This project turns on the LEDs connected to port 1 of the microcontroller in sequence, resulting in chasing LEDs effect. The data is displayed with one second delay between each output pattern. Following figure shows the output pattern of LEDs. (There are only 8LEDs).

1

Components:

  • AT89C2051 microcontroller
  • Capacitors: 10uF, 30pF, 30pF.
  • Resistors: R2=100Ω…..(8) and one 8.2KΩ
  • Crystal oscillator: 12MHz
  • LEDs: 8

Circuit diagram:

Following figure shows the circuit diagram of LED chasing project. For better appearance you can also arrange these LEDs in circular or any geometrical shape with different colors for colorful output.

LED chasing circuit diagram
LED chasing circuit diagram
LED chasing circuit using AT89C2051 microcontroller
LED chasing circuit using AT89C2051 microcontroller

Program description:

The program is required to load a 1 into the top (or bottom) bit of a variable and then shift the data right (or left) by one digit and display on the LEDs. A delay is required between each out to see the effect of chasing.

Click on following button to download .C and .HEX file for this project

Download Button

You may also like:

LED Dice using microcontroller

DTMF PROJECT

Four way traffic light controller Mini-project

Plant watering watcher circuit ( mini-project )

Knight rider light ( LED ) with Pic16F84A

fastest finger first indicator project

tags:  first microcontroller project atmel 8051 microcontroller projects led microcontroller project microcontroller intermediate kit 8051 assembly projects 8051 led projects 8051 led projects projects using 8051 8051 led microcontroller 8051 led avr 8051 led pic 8051 led tutorials at89c51 led chaser help please 8051 at89c51 led chaser help please microcontroller at89c51 led chaser help please download

LED Dice using microcontroller

LED Dice using AT89C2051 microcontroller:

This project is used to simulate dice, which displays a random number from 1 to 6 by using 6 LEDs connected in port 1 of microcontroller. Pin no 2 (or bit 0 of port 3 (P3.0)) is used as the input and a push-button switch is connected to this pin. Every time, when we press this switch, a new number is displayed.

Circuit diagram:

The circuit diagram for this project is shown in figure below.

DICE AT89C2051 mini-project1
DICE AT89C2051 mini-project1
DICE AT89C2051
DICE AT89C2051
DICE AT89C2051 mini-project2
DICE AT89C2051 mini-project2

Bit 0 of port 3 is generally held at logic HIGH with pull up resistor R3=100K. when switch S1 is pressed, bit 0 of port 3 moves to logic LOW and is detected by the microcontroller. As shown in circuit diagram all the seven LEDs are so mounted that they will show dots for different numbers as in real dice.

The different patterns for different numbers are shown below:

DICE AT89C2051 mini-project 2
DICE AT89C2051 mini-project 2

 Program Description:

A random dice number is obtained during scanning of the push-button switch as follows. The program scans the push-button switch continuously. If the switch is not pressed (i.e. at logic HIGH), a number is incremented between 1 and 6. Whether the push-button is pressed, the current value of the number is read and this value is used as the new dice number. Since the switch is pressed by the user in random, the numbers generated are also random numbers from 1 to 6. The new random number is displayed on the seven LEDs appropriately. After about 2 seconds delay, all LEDs are turned off and the above process is repeated forever.

Click on the following button to download .C and .HEX file for this project.

Download Button

 Download .HEX file Click HERE