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.