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.