Thursday, 14 February 2013

proteus program

proteus program : circuit simulation for design circuit ,so it contains a lot of componet
like pic :micrcontroller,avr micrcontroller ,8051 micrcontroller .
protues program size is almost 88 MG,to download use this link      Proteus Program download
pic micrcontroller  with each types is in proteus program 
so ,advice you to try it to simulate your work ,after that ,buy the component from market .
proteus program is the best program simulation for micrcontroller in specific and circuit in general .


Tuesday, 12 February 2013

mbedded System: Smarts For Devices and Systems

What is an embedded system?
Embedded systems are stand alone computing devices or centers usually dedicated to performing limited computing functions reliably, securely and with minimum  costs.   

main component in embedded system is Micrcontroller IC.

You find embedded systems(Micrcontroller) or embedded computer systems all around us.  Some are low cost and mass produced such as DVD player ,
medical instrument-ultrasound machine, aerospace-communication satellite, factory automation-industrial boilers.

What are top 5 reasons one would choose an embedded system(Micrcontroller) over a PC?
  1. Security (hacker proof)
  2. Reliability (work without failure for years)
  3. Environment (broad temperature range, sealed from chemicals, radiation)
  4. Efficient Interaction with user (fewer buttons, touch) 
  5. Integrate with design
Pic Micrcontroller is easier in programing more other type of micrcontrollers.
so i advice you that use pic Micrcontroller for your project and mikroc program .
What are some features expected in future embedded systems?
  • Energy harvesting or energy scavenging as replacement for power system.
  • Smaller footprint to allow coupling to the device itself. 
  • Fault detection/self correcting algorithms along with backup processors are expected to become common in future.




Sunday, 10 February 2013

burn code into pic micrcontroller


how burn code into pic micrcontroller :
pic microcontroller is device contain ROM ,so can to program .
to burn, need first program for write code like mikroc program .
second : need only hex file of code
third :need serial cable to connect pic micrcontroller with computer
fourth :sure that program give you message successful of burning.
note : burn pic  micrcontroller is different from company to another and there is some other ways.
pic microcntroller in general and pic micrcontroller in specific has main advantage which allow to burn code and reburn again .

details with images in next article .






Thursday, 7 February 2013

main component of embedded system is Micrcocontroller


important concept :

Embedded system :
Main component in Embedded system is microcontroller .
What is PIC microcontroller ?
Is small computer with CPU, ram, rom.
Why do you prefer to use PIC microcontroller ?
Let me ask you : if your project  is very big  that mean number of hardware component is huge .
So any mistake in any component ,project will not.
So to reduce number of component of project and more easier to discovery any error ,use microcontroller
Because PIC microcontroller use code to burn ,so you can debug ,update code easily .
I prefer PIC  microcontroller for reason that it is easy in programming .
Note : deal with PIC microcontroller is low voltage about 6 voltage ,so if you want to run device with more voltage ,will need for  relay.

run some devices using keypad

circuit contain PIC micrcontroller ,led,lcd,motor and bulb which are played by keybab


code Mikroc for pic micrcontroller :

sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;   //above is initialize for LCD ,this is in help
char txt1[] = "Hello";    // string to display on LCD
char keypadPort at PORTC;
unsigned short kp;

void main()
 {
  TRISB.RB6 = 0;
  TRISA = 0;
  PORTA = 0;
  PORTB.RB6 = 1;
   Lcd_Init();                        // Initialize LCD

  Lcd_Cmd(_LCD_CLEAR);               // Clear display
  Lcd_Cmd(_LCD_CURSOR_OFF);          // Cursor off
  Lcd_Out(1,6,txt1);
   while(1)
   {
   do
   {
    kp = Keypad_Key_Click();
   } while(!kp);
 
  if(kp == 1 )
  {
  }
  else if(kp ==2)
  {
      PORTA.RA0 = 1;  //Run bulb .
  }
  else if(kp == 3)
  {
      PORTA.RA1 = 1;//Run led
  }
  else if(kp == 4 )
  {
      PORTA.RA2 = 1;Run Motor.
  }
  else
  {
      PORTA = 0;
  }
  }
 }

Wednesday, 6 February 2013

LED and Switch

run LED after press button or switch

if(button(&porta,0,1,1).
porta : port which switch connect with it.
0 : bin of porta number 0.
1: leave it like this ,details in help of Mikroc Program  .

 when click switch ,blue and red LED will be on.

Tuesday, 5 February 2013

traffic light circuit and code using pic microcontoller

traffic light circuit and code using pic microcontoller
code using mikroc :


Note : traffic light is in silmulation ,so in real application will need to relay to increase signal or voltage to 220 v.

Monday, 4 February 2013

I/O connect to microcontroller

input /output devices which connected to micrcontroller .

how reed switch work?

Magnets have a natural tendency to attract many things. Though not perceived as a real force, but it does attract human attention when a force acting invisibly draws things to itself. By harnessing this power, humans have made wonderful inventions like the electromagnet and discover lossless conduction phenomenon . Among these many inventions, was the application of magnetism to switch from ON state to OFF and vice-versa in precision devices. One such switching device, which works not by the principles of electricity, but magnetism, is the Reed Switch.
.
servo server :
 
Servo Motors are DC Motors (check out how DC motor works) with a servo mechanism to provide a precise angular motion. Pulse width modulation (PWM) technique is used to set the angle of rotation. Generally RC servo motors have a rotation limit of 900 to 1800 but servos with high rotation angles are also available.
 
Webcam is a device used to capture images, audio and videos. Webcam are either inbuilt or can be externally attached with the laptop or the computer.  The most common application of a webcam is video chat, video recording, image capturing. A webcam generally consist of a lens, an image and sound sensors, electronic circuitry to process the data and send it to PC.
 
Ultrasonic sensors:  are devices that use electrical–mechanical energy transformation to measure distance from the sensor to the target object. Ultrasonic waves are longitudinal mechanical waves which travel as a sequence of compressions and rarefactions along the direction of wave propagation through the medium. Apart from distance measurement, they are also used in ultrasonic material testing (to detect cracks, air bubbles, and other flaws in the products), Object detection, position detection, ultrasonic mouse, etc.
These sensors are categorized in two types according to their working phenomenon – piezoelectric sensors and electrostatic sensors. Here we are discussing the ultrasonic sensor using the piezoelectric principle. Piezoelectric ultrasonic sensors use a piezoelectric material to generate the ultrasonic waves.
 
 
how design project ?


steps :

1- prepare components for projects (micrcontroller ,resistance,etc).

2-Connection component together in right way. .

3- need to make code using mikroc tool .

4- need to burn hex file of code on micrcontroller .

5- don not forget connect power and ground .

for example:



Sunday, 3 February 2013

Seven Segment Application


tools:
1- pic microcontroller .
2- 7447 IC.
3- Anode seven segment .

to details how connect 7447 IC with seven segment and values of(A,B,C,D)
7447 IC with seven segment . 



circuit using protues simulation .


 
Code using mikroc                                            

void main()
 {
  TRISA = 0; // assign porta as output
  while(1)
  {
     PORTA = 0;
     delay_ms(250);
     PORTA = 0X1;    // to understand these number look to link above
     delay_ms(150);
     PORTA = 0X2;  //to understand these number look to link above
     delay_ms(150);
     PORTA = 0X3; // to understand these number look to link above
     delay_ms(150);
     PORTA = 0X4; // to understand these number look to link above
     delay_ms(150);
     PORTA = 0X5;//  to understand these number look to link above
     delay_ms(150);
     PORTA = 0X6;//  to understand these number look to link above
     delay_ms(150);
     PORTA = 0X7; // to understand these number look to link above
     delay_ms(150);
     PORTA = 0X8;  //to understand these number look to link above
      delay_ms(150);
     PORTA = 0X9;//  to understand these number look to link above
      delay_ms(150);
     PORTA = 0X10; // to understand these number look to link above
      delay_ms(150);
     PORTA = 0X11; // to understand these number look to link above
      delay_ms(150);
     PORTA = 0X12;  //to understand these number look to link above
      delay_ms(150);
     PORTA = 0X13;  //to understand these number look to link above
      delay_ms(150);
     PORTA = 0X14; // to understand these number look to link above
      delay_ms(150);
     PORTA = 0X15;  //to understand these number look to link above
      delay_ms(150);
  }
}        

Friday, 1 February 2013

Traffic light using pic microcontroller pic16c62b

 
assign portb as output 
portb.rb0 = 1 ; for red color 
portb.tb1 = 1 ; for yellow color .
portb.tb2  = 1; for green color.
 
 







8 bit microcontroller architecture and general tool



PIC microcontrollers are finding their way into new applications like  audio accessories, smart phones,video gaming . Microchip provides solutions for the entire performance range of 8-bit microcontrollers, with easy-to-use development tools,

8-bit Architecture Overview:

  • Wide program memory buses (12, 14 & 16-bit)
  •     Increased efficiency single cycle instructions.
  •     Available data EEPROM.
  •     Unified toolset for all cores.
  •     Simultaneous data & instruction bus access.
  •     Instructions and data on separate busses...
  • Development tools

    Microchip provides a freeware IDE package called MPLAB, which includes an assembler, linker, software simulator, and debugger. It is being made obsole by MPLABX, the new version based on Oracle Netbeans. They also sell C compilers for the PIC18 and dsPIC which integrate cleanly with MPLAB. Free student versions of the C compilers are also available with all features.

Wednesday, 30 January 2013

protues simulation :

is software use for simulation electronic project which make work is easy for engineers.


open protues and choose any components to design circuit .
after all project was completed ,run simulation to see output .
note : if you use MICROCONTROLLR in your design ,you may be use code to burn it .
This is link for protues download .


protues program

Sunday, 27 January 2013

pickit for pic microcontroller

The PICkit™ 1 Flash Starter Kit is a low-cost development kit .
 This starter kit is designed to help you get up to speed quickly using PIC® microcontrollers.
The kit provides everything needed to program, evaluate and develop applications using Microchip’s powerful 8-/14-pin Flash family of microcontrollers
Package Contents:

PICkit 1 Circuit Board with 8-pin PIC12F675
MPLAB® Integrated Development Environment CD-ROM
Software and Hardware “Tips ‘n Tricks” for 8-pin Flash PIC Microcontrollers Booklet
PICkit 1 Flash Starter Kit CD-ROM, including the HI-TECH PICC™ LITE C Compiler


Supported Operating Systems:
· Windows® 98 Second Edition
· Windows ME
· Windows 2000
· Windows XP

Friday, 25 January 2013

How to use switch software in mikroc


if(Button(&PORTA,0,1,1))
porta : port which switch connect with it.
0 : pin number in port.
1,1 : leave them like this.

if condition will be satisfy when PORTA has signal that mean button or switch was clicked.


Circuit using protues simulation  






Thursday, 24 January 2013

Led program using Mikroc



Led program: 

first LED-BLUE is on for 1 second,after that LED-RED will be ON at the same time LED-BLUE will be off for one second and the same for LED-GREEN.



Code using mikroc Program:




This is th circuit using protues simulation :










Wednesday, 23 January 2013

First Program


Hello Program :

1-      Open  Mikroc  Program  .


2-Project tab -> new project .



1-      Change project name ,browse for choose where project will saved.
2-      Clock choose 000.8000
3-      Press default and OK .









5-Code :


















Line 1:main function which any program  must be beginning with it.
Line5:TRISC :is register  which used to select  pin state whether  input or output
So ,if TRISC = 0 ,that means  pin C is output port ,if TRISC = 1 that mean PORTC is input.
Line:6 PORTC =0 means  signal of zero in PORTC.
Line7: while(1)is infinite loop or may can use for(;;)
Line10: toggle PORTC which is on and off in continue .
Line11: delay_ms (1000) is function use for delay
Value 1000 in ms so equal 1 sec.

6- Project tab - > build ,here will process  HEX file which use in microcontroller circuit .


Tuesday, 22 January 2013

PIC microcontroller description

 
 
 



PIC Microcontroller :
 
 
History:


The PIC microcontroller was developed by General Instruments in 1975. Although
The PIC controller was used to offload the I/O the tasks from CPU to improve the overall performance of the system.
In 1985, General Instruments converted their Microelectronics Division to Microchip Technology. In 1993, Microchip Technology launched the 8-bit PIC16C84 with EEPROM which could be programmed using serial programming method. now PIC is improved to use flash ROM .

note: any pic rom which contain f in its name that mean flash rom for example pic16f201.


        PIC types:
       1- 8bit pic microcontroller .
       2-16 bit
       3-32 bit
  The PIC architectures have these advantages:
  • Small instruction set to learn
  • Built in oscillator with selectable speeds
  • Easy entry level, in circuit programming plus in circuit debugging PICKit units available for less than $50.
  • RISC architecture
  • Inexpensive microcontrollers

Monday, 21 January 2013

Micrcontroller Introduction




  



A Microcontroller is a small computer on a single integrated circuit containing a processor core, memory,

 and programmable input/output peripherals. also often included on chip, as well as a typically small amount

 of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used

 in personal computers or other general purpose applications.

Microcontrollers are used in automatically controlled products and devices, such as automobile engine 

control systems, implantable medical devices, remote controls  . By reducing the size and cost compared to a
 design that uses a separate microprocessor.

  Microcontroller Advantages:

·         They have small size .
·         They can be programmed .
·         They contain  processor ,RAM,ROM,I\O.