Tuesday, 20 October 2015

How does a Processor or Controller access data from Memory ? and What is Raspberry Pi ?


Accessing data from memory in a microcontroller (MCU).


Microprocessor and MCUs are different in that, microprocessors do not have inbuilt data memory (RAM) and program memory (ROM), where as MCUs have both on the chip itself.

In MCUs, operation codes, operands and results are stored in the memory space (RAM and ROM), which is organised into banks segments or pages.

Therefore an arrangement is needed for reaching a location in the data memory space, where the desired operands required by an instruction are stored and where the results after execution of the instruction, if required, are to be stored.

An addressing mode specified how to calculate the effective memory address of an operand by using the information held in registers and/or constants contained within a machine instruction.

Addressing mode depend on the design of the central processing unit (CPU), memory space and organisation of the register. These differ from MCUs of one brand to another.

There are different ways for addressing a location in the memory space, which are called immediate, register direct, absolute, address register indirect, address register relative and relative. In short, data is loaded in data memory space and has address. To get the data, the address is computed by the addressing mechanism.

Let us see how data memory is managed in microcontroller PIC18F4520. Data memory is organised in 16 banks. However, only six banks have been implemented. Each bank has 256 slots and each slot of memory can accommodate one byte or eight bits. So, the addressing mechanism has to compute the address for one slot out of 1536 slots.

Twelve bits will be needed for this; four bits from the bank selecting register (BSR) for selecting the bank. Once we are in that bank, further eight bits will be required for selecting the intended slot out of 256 slots in the made up in a different upon the addressing mode.

In direct addressing mode, all 12 bits are provided by the instruction.

In indirect addressing mode , the instruction provides the pointer and from that pointer, 12 bits are conjured to compute the selection of the bank and address of the intended location in that bank.


What is Raspberry Pi ?


Raspberry Pi, or Raspi, is a computing system that uses a Raspi board, laptop, standard keyboard, mouse, computer monitor or TV, micro USB cable, micro SD card with adaptor, HDMI cable and network cable for its operations. Programming is done in languages likes Python, Wiring Pi, C/C++ and PHP.



 It is capable of doing everything that is expected from a desktop computer, from browsing the Internet and playing high-definition video to making spreadsheets and playing games. The system has the ability to interact with the outside world and has been used in many projects, from music machines to weather station.


Raspi board has 26 dedicated GPIO pins, including a UART, an I2C bus, SPI bus with two chip selects,I2S audio, 3.3V, 5V and ground. The maximum number of GPIOs can theoretically be indefinitely expanded by making use of the I2C or SPI bus.

Interfacing of the camera module is an interesting application of Raspi. It can take high-definition videos as well as still photographs.

Thursday, 8 October 2015

7-Steps For Installing Keil uvision Software in your Computer



Now first download the Keil uvision software form its official website Download here.

 

Step-1:


Now, First you Install the Keil uvision software in your PC (computer) by Double click the setup file. as showing the figure.

how to install Keil in computer
Step-1









 Step-2:


Click  Next Tab to continue the process of Installing.

how to install Keil in computer

Step-2

Step-3


First, Read carefully the end user License agreement for this software then Click the agreement of software uses.

Then click Next tab to continue the setup process.


how to install Keil in computer
Step- 3

Step-4:


Here, select the computer storage path where you wish install the software. By default path is C\Keil. and Click the box of Backup old files to C\Keil\backup.003.

Then Click Next tab to continue Installation Process.

how to install Keil in computer
Step- 4

Step-5:


Fill your details like as your name,Company name,E-mail address correctly.

Then Click Next Button to start Installation Process.

how to install Keil in computer
Step- 5

Step-6:


When Installation process is start it show the status of this process as shown following figure.

how to install Keil in computer
Step- 6

Step-7:


Now  Click the three boxes as per your wish and then click to Finish button for complete Installation Process.
Now, it is ready for use.


how to install Keil in computer
Step- 7

Wednesday, 7 October 2015

How to Use Keil uvision Software for Programming


Keil uvision is best suited and more easily user friendly software for Programming of 8051 series Microcontroller. It is developed by ARM Ltd. and ARM Germany GmbH. Now, If you choose Keil software for Programming of 8051 Microcontroller that it is for you to guide how use Keil uvision software to Programming, debugging, simulating the program of 8051 Microcontroller.

Keil uvision support both C Language and Assembly Language for programming. according to me C Language is more difficulty and Lengthy to explain over the Assembly Language. Assembly Language has some Listed Instruction sets by which you can easily control and program the structure of data. you learn more about C Language and Assembly Language, Here


If you decide to program your own code for 8051 Microcontroller, then First download the Keil uvision software from their official website by using the Link below,

Keil uvision Software Download here.

7-Steps For Installing Keil uvision Software in your Computer



If you use Keil uvision in first time then you can avoid to face many trouble with the use of Keil uvision software by following steps.

14-Step to Use of Keil uvision Software for Programming :

 

 Step-1

After successful installing Keil uvision software, just double click the icon on your desktop as shown in figure to open it.
use of keil uviion software
Step-1


Step-2

Now, create the new Project by clicking the Projects tab in Menu bar.

use of keil uviion software
Step-2

Step-3

Select the path, where you wish to store the Project file and give your Project Name.

use of keil uviion software
Step-3

Step-4

After complete the Step-3, a screen will appear as shown below. In this select the Controller which is used for this Project.

use of keil uviion software
Step-4

Step-5 

If you write your Program in C language then click yes  in following dialog box. it is a start up file which initialize the controller. If you Write your Program in Assembly Language then click No tab, because it is not required for assembly language.

use of keil uviion software
Step-5



Step-6

Now, you need to create a new file to write your program.

use of keil uviion software
Step-6

Step-7

Give your program file name with following extension.

For Assembly Language -    .a51  ,   .a  ,   .asm
        example : Program.a51  /  Program.a  /  Program.asm

And for C Language -   .c    
         example : Program.c

use of keil uviion software
Step-7

Step-8

Now, you require to add your Program file to your Project.
use of keil uviion software
Step-8

Step-9

Select your Program file and click add Button.

use of keil uviion software
Step-9


Step-10

The added Program file is Shown in your Projects List as shown bellowing figure. Now, you can start to write your program in right hand side window.

use of keil uviion software
Step-10


Step-11

After writing  Program, you need to create build target for detecting the errors related to your program like as syntax errors, warnings, etc.

use of keil uviion software
Step-11


Step-12

The Errors and Warnings related to your Program is shown in bottom window. For next step, you solve it first if any errors and warnings generate and rebuild target until it should be Zero.

use of keil uviion software
Step-12

Step-13

After Complete the Step-12 , you are able to debugging your program for simulate and analysis

use of keil uviion software
Step-13

Step-14

Now, you can run the Program for simulate and you analyze your program. you also watch the logic Analyzer for showing the status of pin logic as per your program and much more as you done.

use of keil uviion software
Step-14



Thursday, 1 October 2015

GSM Modem Interface with 8051 Microcontroller

How to Interface GSM (Sim900 / Sim300) Module with 8051 Microcontroller (89s52 Microcontroller) ?

GSM Sim300 ModemGSM Sim900 Modem


Sim900 / Sim300 is a one type of GSM Module Which support the AT command and used for Mobile communication. It is mostly used to interface with 8051 Microcontroller in Various Projects Like as, SMS sending, Call handling, GPRS based, Home Security System,etc.

Learn More about AT Commands,Click here.

 

What is GSM Modem?

The GSM Modem (Sim900/Sim300) has a Sim Slot similar to a mobile to communicate by mobile networks. It operate by AT Commands and it Response only for AT Commands. 

What is Difference between Sim900 and Sim300 Module ?

For basic Guideline, Concepts, Working and operation of AT commands and GSM Module refer- GSM/GPRS Module details. 

Here the Circuit Diagram for Interfacing Sim900 / Sim300 with 8051 Microcontroller (89s52-Microcontroller) is given below,




Here, We use Atmel 89s52 Microcontroller (Which is from 8051 Microcontroller Family) to Interface with GSM modem. The interface between GSM module and Microcontroller is take place by Rs232 Communication.

The GSM module (Sim900/Sim300) has inbuilt MAX232 ic for Rs232 communication,which is showing in following figure,




But, the extra MAX232 Circuit is need to Microcontroller side to complete communication occurs between GSM module and 8051 Microcontroller.

RS232 Communication Circuit by using MAX232 ic for Microcontroller

Max232 ic Circuit diagram for RS232 communication



 

 

 

 

Why MAX232 ic is Used for Microcontroller?

MAX232 ic is used for Converting the Logic Level Signal. The GSM module Gives signal as Rs232 Logic level. When the Microcontroller works on TTL logic Signal. so, A Converter device is require for this, to convert the Rs232 Logic level signal into TTL Logic level signal. MAX232 ic is used for this Purpose.

Here, Listed Some Program example for various Projects based on GSM modem, to Learn more about working of GSM Modem and How it actually work?

1.)   Home Security System by Using Sim900 Modem.
2.)   A message send by GSM Sim900/Sim300 modem.
3.)   A call handle by Sim900/Sim300 Modem.
4.)   A device Control through a message by using Sim900 modem.
5.)   A device Control through a Call by using Sim900 modem.
6.)   Sim300/ Sim900 Power supply Circuit diagram.