Your Ad Here Your Ad Here
Showing posts with label Micro controllers. Show all posts
Showing posts with label Micro controllers. Show all posts

Thursday, January 6, 2011

Fully Automated Water Supply System


              This is a project of fully automated water supply system designed with 16F887 Micro controller.






To build the process of the Washing machine we need several input& output devices. We use PIC 16f887 micro controller as central control device. First we should supply 5v dc to micro controller. We use a voltage stabilizer to do that. Weight sensor is used measure the weight of the cloths which we putted into washing machine. It gives analog input to the micro controller.
In this application we categorize the weight of the cloths. It as below,
0kg - 2kg = Low weight
2kg – 4kg = Medium weight
4kg – 6kg = High weight
According to these categorization put sufficient water into the washing machine. We use 3 Water level sensors to measure the water level. If we are high weight cloths have to wait for the three inputs from sensor 1, 2 and 3. After adding water to the washing machine we have to input time duration manually by rotating the timer knob. And also use LCD display (8 bit) to display timing process & massages. We use 8 bit LCD display because display time is very fast procedure, it changes rapidly.


8 bit and 32 bit ALU


                 In Micro controller system when we compare these ALUs both can do the same function. ALUs can add, subtract, multiply act, two numbers. But the difference is the speed and efficiency of these ALUs.
                 An 8 bit ALU would have to execute four instructions to add 32 bit number but 32 bit ALU can do it in one instruction. It is four times faster than 8 bit ALU.
8 bit and 32 bit ALU


 
8-bit ALU architectures are those that are based on registers, address buses, or data buses of that size. 8-bit is also a term given to a generation of computers in which 8-bit processors were the norm.
Eight-bit CPUs normally use an 8-bit data bus and a 16-bit address bus which means that their address space is limited to 64 Kb. This is not a "natural law", however, so there are exceptions.
The range of integer values that can be stored in 32 bits is 0 through 4,294,967,295 or −2,147,483,648 through 2,147,483,647 using two's complement encoding. Hence, a processor with 32-bit memory addresses can directly access 4 GB of byte-addressable memory.
The external address and data buses are often wider than 32 bits but both of these are stored and manipulated internally in the processor as 32-bit quantities

Monday, December 13, 2010

CISC Vs RISC Achitectures


CISC Vs RISC

          The performance of a CPU is highly dependent on its internal architecture. Mainly there are two architectures. They are,

CISC Architecture
        
          CISC stands for Complex Instruction Set Computing. Traditional theory states that CPUs can be made quicker by adding more and more complexity into the instructions of the instruction set. This architecture can execute several low level operations such as load from memory, an arithmetic operations and a memory store all in a single instruction.
         CISC is the more advanced architecture compare with RISC architecture. It can multiply two logical numbers in one step. In CISC Architecture no of bits per instruction is high. That means it can have high capacity. CISC is used in computer Micro processors & the devices which have high speed processing power.


RISC Architecture




              RISC stands for Reduced Instruction Set Computing. It states that the best performance can be achieved by reducing the time taken to execute any given instruction. Rather than have complex instructions that require many clock cycles (more on this later) to complete, RISC chips use very simple instructions that could be performed in fewer clock cycles. Performance can then be improved by making the cycles shorter.
             Compare to CISC, RISC haven’t that much of process power. It can’t multiply two logical numbers in one step. It uses add and shift function to do that.

Multiply function

CISC Architecture-    00010110 + 00000110 = 1000100     ; It can multiply it one step.
RISC Architecture-   00010110 + 00000110 =?  But here we can’t do it in one step because it doesn’t have a multiplying function.
Therefore it uses add & shift


Von Numann & Harvard Memory Architecture


Von Neumann


           
                In the von Neumann architecture CPU can either read an instruction or read/write data from/to the memory. Both of these operations cannot occur simultaneously as the data and instructions use the same system bus. This means that it is necessary to fetch instruction and data from the same memory space, which limits bandwidth because it can only transmit one piece of data or one instruction at a time.



 Harvard Architecture

The most obvious characteristic of the Harvard Architecture is that it has two different data buses to. The contacts are CPU to RAM and CPU to ROM.  Using these buses it is possible to access program memory and data memory simultaneously. Typically, code (or program) memory is read-only and data memory is read-write. A Harvard architecture microcontroller can thus be faster for a given circuit complexity because instruction fetches and data access do not contend for a single memory pathway. Compare to von numann architecture Harvard Architecture can achieve higher clock speeds; caches are useful as the memory speed is proportionally slower. Harvard architectures tend to be targeted at higher performance systems, and so caches are nearly always used in such systems. Harvard Micro processors can be much faster than a von Neumann Micro processor because data and program do not contend for the same information pathway, and storing the program in an immutable read-only memory can result in vast reliability improvements.

           Thank you everybody, if you are struggling with any of this information, please post a comment. Comments are welcome.