Sunday, February 23, 2014

Software tools required to work with 8051 family of Micro controller - Keil & Flash magic (e.g. P89V51RD2 from Philips) for making line / path follower robot

Software Details:

The program code acts as the decision-maker embedded in the microcontroller i.e. it decides what will be the outputs for particular set of input combination. Programs for the P89V51RD2 series of microcontrollers can be written in assembly (ASM) and C. Keil, Flash magic etc. are some free development software’s for programming the P89V51RD2 Microcontrollers. We are using KEIL for programming. In KEIL we write our C code, after compilation it generates ‘.hex’ file that is hardware level code.


Keil uvision
Keil C51 is the industry-standard tool chain for all 8051-compatible devices, it supports classic 8051, Dallas 390, NXP MX, extended 8051 variants, and C251 devices. The µVision IDE/Debugger integrates complete device simulation, interfaces too many target debug adapters, and provides various monitor debug solutions.

Free Download the Keil software from https://www.keil.com/demo/eval/c51.htm 

Example Code for Line follower Robot:
#include<reg51.h>
sbit sensor1=P1^0;
sbit sensor2=P1^1;
sbit motor1=P0^0;
sbit motor2=P0^1;

void main()
{
sensor1=sensor2=0;
motor1=motor2=0;

while(1)
{
if((sensor1==1)&&(sensor2==0))
{
motor1=1;
motor2=0;
}
else if((sensor1==0)&&(sensor2==1))
{
motor1=0;
motor2=1;
}
else if((sensor1==0)&&(sensor2==0))
{
motor1=0;
motor2=0;
}

else if((sensor1==1)&&(sensor2==1))
{
motor1=1;
motor2=1;
}
}
}

Flash Magic:
The Flash Magic utility connects the PC's COM port to the serial port of the MCB2300 and provides In-System Flash Programming (ISP) support for Intel HEX files.

Free download Flash Magic software from - http://www.flashmagictool.com/download.html&d=FlashMagic.exe



No comments:

Post a Comment

You might also like