6. Microprocessor Vs Microcontroller
• Processor is the heart of the embedded system
• Two Essential Units: Operations
Control Unit (CU) Fetch
Execution Unit (EU) Execute
7.
8.
9. •DDRX (DATA DIRECTION REGISTER)
This register is used to configure the
ports as input or output ports
1 means output
0 means input
•PORTX REGISTER
this register is used to assign values to
the port
•PINX REGISTER
This register is used to read the values
of the ports
10. + _ output
0 0 off
0 1 off
1 0 on
1 1 0ff
Application: display ,traffic lights etc.
11.
12.
13.
14.
15.
16.
17.
18.
19. •Stepper motors are DC motors that move in
discrete steps. They have multiple coils that are
organized in groups called "phases".
•By energizing each phase in sequence, the motor
will rotate, one step at a time.
•These motors are based on rpm
•Used when motor has to be controlled according
to the need
•Example is ROBOT ARM
20.
21. INTERFACING OF BUZZER WITH AVR ATMEGA16 :
The buzzer is connected to the microcontroller through a transistor. It is connected
on collector pin,because if directly connected to ground, in off condition, it generates
some amount of noise continuously due to the current flow, since the ground pin of
microcontroller isn’t perfect ground.
Example:
Void buzz()
{
PORTD.0=1; // turns on
Delay_ms(400); //on for 4 seconds
PORTD.0=0; // turns off
}
Applications:
Areas wherever we need the alarms and alerting systems, timers and counters etc.
seek the implementation of buzzers.
22. INTERFACING OF SWITCH WITH AVR
ATMEGA16 :
A switch is an input device which is used to transfer Vcc or Ground i.e.
logic 0 or logic 1 as and when required. When we press the switch the
path gets completed and the connected logic gets transferred to the
respective pin of the microcontroller
Example: TOKEN DISPLAY
CODING:
#include <mega16.h> #include <delay.h>
void main()
{unsigned char d[]={0B11111001,0B10100100,
0B10110000,0B10011001,0B10000110,
0B00000010,0B11111000,0B10000000,
0B10011000,0B11000000};
DDRA= DDRD=0B11111111;
DDRB.0=0; PORTA=PORTD=0B11000000;
PORTB.0=1;//declaration of default value
for(i=0;i<10;i++)
{while(PINB.0==1);
PORTD=d[j];delay_ms(100);}
23. INTERFACING OF INFRA RED SENSOR
If the receiver receives IR rays, then output will be 1, If the receiver
doesn’t receive IR rays, then output will be 0.
However the coding varies with the requirement and placing of the Tx
and Rx
24. INTERRUPTS
Sometimes there may be a need of handling planned and
higher priority events instantaneously that might occur
during the normal operations
26. RADIO FREQUENCY
In many situations a communication link between to devices becomes essential.
This communication can be wired or wireless. If two devices are close to each
other (like a MCU and a Memory) a wired link is preferred.
However in many situations two devices are reasonably far apart.
In that case a wireless link is preferred.
27. DTMF :
DTMF is as acronym for Dual Tone Multi-frequency Signaling. It is used in
telecommunication signalling, basically it is a signal that is sent to the switching
centre (phone company) when the phones keys are pressed .
For interfacing we use IC-8870