Post on 10-Jan-2017
Lecture 5 :
Analog I/O
Agenda
• Analog Vs Digital • ADC Module • Analog inputs in PIC• Project 1 “Temperature sensor”• Break • PWM Module• Analog output in PIC• Project 2 “ Fan speed control”• Q & A
Analog Vs Digital
Analog Signals :- Nature signals which use a continuous range of values to represent information, Like Sound signals.
Digital Signals :- Signals which uses discrete (discontinuous) values to represent information , Like computers.
ADC Module
Analog to Digital Converter (ADC) :- is a device that converts a continuous quantity (Voltage) to a digital number that represent the quantity’s amplitude.
Analog inputs in PIC
PIC16F877A has 10-bit resolution ADC , with 8 channels.
MikroC functions and commands :-* Void ADC_Init();* Int ADC_Read(Channel number);
Project 1 “Temperature Sensor”
Write a program That measure the temperature is the room and the display that temperature on LCD.
Break
PWM Module
Pulse Width Modulation (PWM) :- is a fancy term for describing a type of digital signal , which is used in many application like controlling Servos and driving RGB LEDs.
Analog output in PIC
PIC16F877A has 2 PWM
MikroC Function and Commands :-* Void PWMx_Init(Freq);* Void PWMx_Set_Duty(Duty Cycle)* Void PWMx_Start();* Void PWMx_Stop();
Project 2 “Fan Speed Control”
Write a program that control the speed of fan , using variable resistor.
Q & A
For more Informatin
AZEX team FB Page : https://www.facebook.com/AlAZharEXhibition
Mohamed Ali BedairFB : https://www.facebook.com/MohamedAliBedairMail : M.Bedair@Azhar.Edu.Eg