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

C Programming and Interfacing with Intel 80C51 Microcontroller

| 0 comments |
In this tutorial, we illustrate how to write C program that turns on and off a LED connected to the port of a Intel 80C51 microcontroller chip. Such simple project forms the basis of embedded software development with C.

Intel 80C51 is an 8 bit microcontroller used in many areas of embedded systems design. For our purpose here it should be noted that the 80C51 has 4 ports called Port0, Port1, Port2 and Port3. All of these are bidirectional port. Each of the port has 8 pins and each of them can be written to and read from. So there are 4x8=32 I/O ports.

Port 1 is different from others in that it is designed as an I/O port. Other ports additional to input/output function also provides other special functions which will not be discussed here.

Here we will look at how the individual pins of the Port 1 can be controlled. That is how to send a bit, read a bit and how to send a byte and read a byte. This is how you usually begin learning a microcontroller and C programming as well.

We will start by writing 1 bit to the port 1 pins.

Consider the following schematic:


In the above figure, a LED is connected to the Port 1, pin 0. So to turn on the LED we must have logic high at the port pin 0. The C program for doing this is as follows,

#include <reg51.h>

sbit mybit = P1^0;

void main(void)
     {
      mybit = 0;
      }

In the above code, the Port 1 bit 0 is assigned a variable called mybit is declared using the sbit data type. In the main function this variable is set to 0 meaning that port 1 bit 0 is set to logic 0 and therefore doing this will not turn on the LED.

But if we change the above code so that mybit = 1; then now the Port 1 bit 0 has logic 1 high and therefore due to the potential difference created between that pin and the ground current flows into the LED and the LED turns on.

So to turn on the LED we would write the C program as follows:

#include <reg51.h>

sbit mybit = P1^0;

void main(void)
     {
      mybit = 1;
      }

The result is shown,


Notice that the LED is turned into blue.

In the above schematics we did not limit the current through the LED. One should add a resistor to limit the current flowing into the LED so that it does not get excessive current otherwise it will burn and get damaged.

So lets add a resistor before we move on. The LED has 2.2V forward voltage and current limit of 10mA. If the Pin voltage is at 5V then we can calculate the resistor value to limit the current into the resistor to 10mA.

R = (5V-2.2V)/10mA = 380 ohm ~370ohm.

OK, see the diagram below



Above we showed you how to turn off and on a LED at the port 1 pin 0 of the microcontroller.

In next tutorial post we illustrate how to write program with delays to turn on and off the LED.

For learning what is Proteus and how it is useful for embedded system development see the blog post- Embedded Systems Programming with Proteus Software.

Read More..

Different ways of implementing D Flip Flip with VHDL

| 0 comments |
Shown below is a table that shows how D flip flop can be implemented in different ways with VHDL. The first row shows the same D flip flop different inputs, that is, with asynchronous and synchronous reset. The second row shows different way of writing the behavior of the D flip flop.




DFF without asynchronous reset
DFF with asynchronous reset
DFF with synchronous enable
DFF with synchronous enable
library ieee;
use ieee.std_logic_1164.all;
entity dff is
port(
d : in std_logic;
q : out std_logic;
clk : in std_logic
);
end dff;
architecture dff_arch of dff is
begin
process(clk)
begin
if(clkevent and clk = 1)then
q <= d;
end if;
end process;
end dff_arch;
library ieee;
use ieee.std_logic_1164.all;
entity dff is
port(
d : in std_logic;
q : out std_logic;
rst : in std_logic;
clk : in std_logic
);
end dff;
architecture dff_arch of dff is
begin
process(clk, rst)
begin
if(rst = 1)then
q <= 0;
elsif(clkevent and clk = 1)then
q <= d;
end if;
end process;
end dff_arch;
library ieee;
use ieee.std_logic_1164.all;
entity dff is
port(
d : in std_logic;
en : in std_logic;
rst : in std_logic;
clk : in std_logic;
q : out std_logic
);
end dff;
architecture dff_arch of dff is
begin
process(clk, rst)
begin
if(rst = 1)then
q <= 0;
elsif(clkevent and clk = 1)then
if(en = 1) then
q <= d;
end if;
end if;
end process;
end dff_arch;
library ieee;
use ieee.std_logic_1164.all;
entity dff is
port(
d : in std_logic;
en : in std_logic;
rst : in std_logic;
clk : in std_logic;
q : out std_logic
);
end dff;
architecture dff_arch of dff is
signal int_reg, int_next : std_logic;
begin
process(clk, rst)
begin
if(rst = 1)then
int_reg <= 0;
elsif(clkevent and clk = 1)then
int_reg <= int_next;
end if;
end process;
int_next <= d when en = 1 else int_reg;
q <= int_reg;
end dff_arch;
Implicit function call example
Explicit function call example
No function call, simple edge detect
Using if statement and function call
library ieee;
use ieee.std_logic_1164.all;
entity dff is
port(
d, clk : in std_logic;
q : out std_logic
);
end dff;
architecture dff_behave of dff is
begin
process
begin
wait until rising_edge(clk);
q <= d;
end process;
end dff_behave;
library ieee;
use ieee.std_logic_1164.all;
entity dff is
port(
d, clk : in std_logic;
q : out std_logic
);
end dff;
architecture dff_behave of dff is
begin
process
begin
wait on clk until rising_edge(clk);
q <= d;
end process;
end dff_behave;
library ieee;
use ieee.std_logic_1164.all;
entity dff is
port(
d, clk : in std_logic;
q : out std_logic
);
end dff;
architecture dff_behave of dff is
begin
process
begin
wait until clkevent and clk = 1;
q <= d;
end process;
end dff_behave;
library ieee;
use ieee.std_logic_1164.all;
entity dff is
port(
d, clk : in std_logic;
q : out std_logic
);
end dff;
architecture dff_behave of dff is
begin
process
begin
wait on clk;
if rising_edge(clk) then
q <= d;
end if;
end process;
end dff_behave;
Read More..

A CRC generation circuit with Xilinx Schematic Editor

| 0 comments |
Here a CRC generation circuit is build with Xilinx Schematic editor. Below diagram shows the schematic design of CRC generation circuit. It is a 8 bit input and 12 bit output circuit meaning that 4 bits at the end of the 12 bit are the CRC codes appended to the 8 bit data. There are 4 inputs- data(8 bit parallel), Clock, Load and Control. There is one output which is the CRC coded serial output.

CRC generation circuit

Because the ports in the above diagram are not clearly visible it is shown again below-

The 8 bit data enters in parallel into the PISO(Parallel In Parallel Out) block at the lower bottom part of the block diagram. The Load port provides signal to activate the PISO circuit. When it is low that is 0 then the PISO starts performing the conversion. The Clk port provides the clocking function. The Control port controls the overall CRC encoder and is high(logic 1) when the encoding is to be performed.

The PISO outputs serial data from the parallel data. There are 4 flip flops of D type which are all initially set to 0. There are two XOR gate and other combinational circuit gates. The MSB of the PISO enters the the 2nd XOR gate which is XORed with the output of the 4th flip flop(initial 0). The output of this 2nd XOR gate is fed back (1) to the 1st flip flop (2) to the 1st XOR gate both via one AND gate. The output of 1st FF goes to 2nd FF and then to the 3rd FF in each clock cycle. The output of the 3rd FF is XORed with the aforementioned input from the PISO via 2nd XOR plus AND gate. This sequential circuit outputs CRC data then is combined with the data input with the combinational circuit of AND and OR to output the encoded CRC codes.

The PISO(Parallel to Serial Output) was implemented in VHDL and converted to schematic symbol and then added to the schematic page as shown in the above diagram. This was done because the Xilinx schematic editor didnt have a PISO symbol part in its library. One can design any part in VHDL and convert that into schematic symbol for use in schematic editor. This makes Xilinx a great tool for modelling design in the form of block diagram as shown above.

Another blog post which is the sequence detector circuit design with Xilinx Schematic Editor


Read More..

embedded systems programming with proteus

| 0 comments |
Proteus can be very helpful tool for learning embedded system programming. The process involved is quite easy.

You start you embedded system design project by creating a new project. During the project creation you will an option whether you want a firmware development project. At this point you have two options. The first one is that you can say yes and use the either the Proteus build in compiler or assembler and second one is that you can select No to the option. If you selected the second option then you would create the program for the microprocessors and/or microcontrollers in the separate compiler or assembler tool such as Keil or PICC and then you would copy the source code .asm or .hex or .exe created from those compilers/assemblers into the Project project folder.

In case you select the first option, that is, you choose that you wanted to created a firmware project during the project creation you have the option to select the compiler/assembler for the microcontroller/microprocessor you are working with.

Below is a screenshot of this step:

embedded systems design and programming with proteus

In the above screenshot if you had selected the 8051 microcontroller family for the project then you would see a list of compiler available to you(and those not installed but could be used). The example here uses the Keil compiler.

After you have created your firmware project then you would see the source code editor program with the default header for the microcontroller and some intial C code as shown below.

embedded systems programming with proteus

By default the file name is main.c but you could change that. The default code provided by proteus is to make the programming quicker.

If you switch to the ISIS schematic editor you will see that the chosen microconroller is already placed on the schematic.

embedded systems design with proteus

Now from this point on you can start your embedded system design project. Following shows a simple control application in which a switch is connected to the Port1 0 pin and a sound buzzer is connected to the same port but pin 7. The switch connected to the pin 0 is checked and if open outputs sound from the buzzer at port 1 pin 7.

The following is the schematic for this small project.

embedded systems development with proteus

 Then you could simply start writing your C program for your embedded system design. The program code is simply written into the aforementioned proteus keil compiler and editor as shown.

embedded systems programming with proteus

Once you have written your program you should compile and build the project.

Once this is also done you would go back to your schematic and run the simulation. You could interactively switch on and off the switch in the schematic.

So this tutorial illustrated how proteus could be used for embedded system programming and development
Read More..

Microsoft Office 2010 Free Download Full Version with Activator key

| 0 comments |

 Microsoft Office 2010 Free Download Full Version with Activator & key (direct link)







Microsoft Office 2010  is a productivity suite for Microsoft Windows,and the successor toMicrosoft Office 2007. Office 2010 includes extended file format support, user interface updates, and a changed user experience. A 64-bit version of Office 2010 is available, although not for Windows XP or Windows Server 2003.
On April 15, 2010, Office 2010 was released to manufacturing. The suite became available for retail and online purchase on June 15, 2010.Office 2010 is the first version to require product activation for volume license editions.

Office 2010 marks the debut of free online versions of Word, Excel, PowerPoint, and One-note  which work in the web browsers Internet Explorer, Firefox, Chrome and Safari, but not Opera. Office Starter 2010, a new edition of Office, replaced the low-end home productivity software, Microsoft Works.


Microsoft office has become an essential component for every PC and laptop. Most of the people use one or more of its applications for business, official and educational purposes. This has been the leading text, picture and web editing software as well as the most popular option among people. Most of the people prefer it over other similar software due to fact that it has a very user friendly interface and the applications are easy to use. If you are looking to update your Microsoft office version you can upgrade it by with Microsoft Office 2010 free download. There are numerous sites that provide options to download Microsoft Office 2010professional. You can use them for obtaining genuine and legal software. 

Genuine and legal software are a must have as they give excellent performance whereas the ones that are unauthorized might cause problems in your device as well they might also crash at times making loss of data and information. To know whether software is genuine or not you should check for product key. However, you cannot view the key if the software is already installed as it is stored in windows registry that is not accessible manually. When you make Microsoft office free download for windows operating system you get the product key as email that is sent by the Microsoft Corporation.

Applications in Microsoft Office 2010 package:-

Microsoft office word 2010
Microsoft PowerPoint 2010
MS excel 2010
Microsoft Outlook 2010
Microsoft Office Access 2010
Microsoft Office Publisher 2010
Microsoft office one note 2010
Microsoft office share point works pace 2010
Microsoft office info-path 2010
Just in case you have lost the product key to your office suite it becomes nearly impossible to reinstall the suite. In such a situation you can use Microsoft office 2010 product keydownload application. This application helps you in recovering the product key for your office suite. Only a legal suite has a product key and if you do not get a product key on running Microsoft office 2010 product key download software it means that the suite is pirated and cannot be re-installed. For re-installation you should make use download Microsoft office full version for free application and obtain a new Microsoft office 2010product key.

Microsoft office 2010 free download full version links are available on my sites and before you make download from these sites you should make sure that they provide you with genuine product.

Things to consider while checking download Microsoft office full version for free link is genuine: -

IM  provide Microsoft office 2010 free download  complete suite along with its keygen, cracks and password generators.
No matter you have Windows 7, Windows Vista or Windows XP installed on your system you should check for the software compatibility features like- a fast processor of 500 MHz, a RAM of 256 MB, A monitor of resolution 1024 X 576, available disk space of at least 3.0 GB and a direct X suitable graphic card.


Link update 

HOW TO DOWNLOAD





DOWNLOAD (32 Bit)



DOWNLOAD (64 Bit)




DOWNLOAD ACTIVATOR



DOWNLOAD ACTIVATOR (WORKING)



Read More..