Showing posts with label KEIL. Show all posts
Showing posts with label KEIL. Show all posts

Sunday, July 19, 2015

Embedded Trainer ET-51LS TRAINER

The attached picture is the Development trainer board with in-built programmer compatible with all versions of keil ide.
The training kit provides ideal platform for learning embedded C with actual applications on hardware.
For example:
To learn the working of switch statement ,you can write a program which generates different led patterns based on the input from 4 switches provided.
The kit has different display standards such as full numeric displays,LCD and led that can be used as per requirement.
These kits has been conceptualized keeping in mind requirements of different courses of embedded of several universities and research design.
Complete flexibilty of opearting the kit using a usb port and downloading the program using nxp's flash programming  software ,makes rhe kit user friendly.
The combined material comes with a detailed user manual containing 14experiments covering in details all the different accessories attached such as opto,relay,ir module,keyboard matrix,led matrix, stepper motor controller and more.
Thus kit is a stepping stone for students who wants to make their minor and/or major project for completing their gradute/post graduate courses.
I hope you have liked the review ,please contact me for further details or more.
Abhishek Verma
09868715910

Saturday, July 18, 2015

Generating fixed clock using 8051 Microcontroller.

This article is focused for the budding engineers/hobbyists and anyone who wants to start working on 8 bit microcontroller. Al, the programs listing has been compiled on KEIL IDE and downloaded on 89V51RD2 on the Vinytics,Delhi (ET-51LS TRAINER) the picture of the kit is attached. Most of the codes that we will be considering for our learning will require only a CRO/DSO for understanding rest all the accessories required are present on the kit itself like I/O lines on 8 pin connector, keys, LEDs, LCDs, Relay & many more.

In this article we will explain you how to generate a fixed signal (clock) of 50% duty cycle. In some application we require a fixed clock signal for controlling the hardware there are 32 input/output lines on 8051 that can be programmed according to the requirement.

Let us understand the source code attached in the article.

We need to assign a constant to the port for easy understanding and readability, using sbit we can assign a constant to a pin number of port 1. The width of sbit 1, this is bit variable it can only take value of 1/0.
The declaration of pin should be done before the main loop of the source code.

sbit pin = P1^0; // decleare a variable type sbit for P1.0
We have used a long type of variable to assign the delay between the pin signal High & Low. We are declaring a counter for repeating the function C number of times to generate a clock of fixed time 300 ms.
Definitation of Long variable type is
“A signed or unsigned long integer.”

long C;
Delay 1 function is a standalone function that can be called as many times as possible in the source code. For a single call of delay 1 function you will get a delay of 300 ms.
void DELAY1()
{
for(C=0;C<450 o:p="">
}
This is the main source code of the program in this program we are making a super loop using the while statement we are making while (1), this statement makes the while condition always true that means the programs runs itself infinitely. We are making pin high and calling the DELAY1()  sub routine to give the delay of 300 ms and then making the pin  Low as result we get a clock signal of almost equal duty cycle at the port 1 _0 OR pin
main()
{
while(1)
{
            pin=1; // clear port
  DELAY1();
            pin=0; // clear port
  DELAY1();
            }

           
}










/*program for fixed 33.33hz*/
#include // include 8051 register file
sbit pin = P1^0; // decleare a variable type sbit for P1.0
long C;
void DELAY1();

void DELAY1()
{
for(C=0;C<450 o:p="">
}
main()
{
while(1)
{
                        pin=1; // clear port
  DELAY1();
            pin=0; // clear port
  DELAY1();
            }

           
}




NOTE: I will add the video tutorial of working with ET-51LS on my youtube channel for this program in the coming week.
Please visit the video tutorial of Microprocessor kits on my youtube page
https://youtu.be/jjFr2Yxm3uU