Chapter 6 Interfacing of PIC Microcontroller II The
- Slides: 35
Chapter 6: Interfacing of PIC Microcontroller- II The PIC 18 Microcontroller Prof. Swati A. Thete J. E. S. I. T. M. R. Nashik 1
Unit- 6: w PIC ADC interfacing (pg. no. 512) w Measurement of physical parameters such as temperature, pressure, level, flow, voltage, current etc. (pg. no 652 ) w Interfacing of DAC with PIC 18 F 458 (pg. no. 661) 2
ADC Device 3
1] Resolutions : - step size is depend upon Vref. 2] Conversion time: - is dictated by clock pulse connected to ADC in addition to fabrication and conversion method & technology. 3] Vref : - is the input voltage for the reference voltage 4
5
330_02 6
330_02 7
ADC interfacing 330_02 8
ADC interfacing 330_02 9
10
11
ADCON 0 & ADCON 1 Register w ADCON 0 register are used to select conversion time and analog input channel. w In order to reduce power consumption of microcontroller, ADC features is turned off when microcontroller is power up. 330_02 12
ADCON 0 register 13
ADCON 1 Register 14
330_02 15
330_02 16
17
330_02 18
330_02 19
20
21
DAC interfacing w Two methods for DAC w 1] Binary weighted w 2] R/2 R ladder 330_02 22
Interfacing of DAC with PIC 18 330_02 23
24
Measurement of physical parameters w Transducers : - which converts physical data such as temperature, light intensity, flow, & speed to electrical signals. w Depending on the transducer, the output produced is in the form of voltage, current, resistance, or capacitance. w For e. g. Thermister converts temperature to electrical quantity. Which is nonlinear so LM 34, 35 manufactured by national semiconductor for liner quantity so easy software programming. 25
Signal Conditioning w Most of the transducers gives output in the form of voltage, charge, current, resistance or capacitance. We need to convert this signals into voltage to give input to ADC. This conversion is called signal conditioning. 26
Temperature measurement w LM 34 & LM 35 is used for measurement of temperature. w LM 34 is gives output voltage is linearly proportional to Fahrenheit temperature. And LM 35 gives in centigrade. w For both 34 & 35 no need of external calibration it is internally calibrated. 27
Temperature measurement 28
Temperature measurement 29
Program for Read the sensor & display it on PORT D CLRF TRISD BSF TRISA, 0 BSF TRISA, 3 MOVLW 0× 81 MOVWF ADCON 0 MOVLW 0×C 5 MOVWF ADCON 1 Over ; CALL DELAY BSF ADCON 0, GO BACK ; BTFSC ADCON 0, DONE BRA BACK MOVFF ADRESL, 0× 20 MOVFF ADRESL, 0× 21 CALL ALGO_10_to_8 MOVFF BIN_TEMP, PORTD BRA OVER : PORTD output port : RA 0 input pin for analog volt : RA 3 input pin for Vref volt : Fosc/64, ch. 0, A/D on : right justified, fosc/64 : AN 0 =analog, AN 3=vref+ : Wait for Tad : start conversion : Keep polling end of conversion : save low byte to location 20 H : save high byte to location 21 H : make it 8 bit : Display the temp on PORTD 30
w ALGO_10_to_8 : : RRNCF 20 H, f : rotate right twice RRNCF 20 H, W ANDLW 0× 3 F : mask the upper 2 bits MOVWF 20 H RRNCF 21 H, f : rotate right through carry twice RRNCF 21 H, w ANDLW 0×C 0 : mask lower 6 bits IORWF 20 H, W : combine low and high MOVWF BIN_TEMP RETURN 31
w Pressure, Level, & flow measurement can be done same as temperature measurement. w Only instead of LM 34 or 35 different sensors or transducers will be used for respective measurement of physical quantity, or sensor. w For e. g. level sensor or Bellows 32
w Voltage & Current will be measured by ADC. w For measurement of current only current to voltage converter is connected in block diagram then that voltage quantity is applied to ADC for conversion. w So program will be same for voltage & Current. 33
END Questions? ? ? ? ? 34
THANKS ALL THE BEST …. µµµµµµ…. 35
- Microcontroller interfacing to dac diagram
- Dc motor interfacing with 8051
- Pic microcontroller architecture
- Pic microcontroller architecture
- Capture mode in pic microcontroller
- Rcreg register pic
- Pic microcontroller types
- Pic 18xxx is bit microcontroller
- Stepper motor interface with 8255
- Interfacing adc with 8086
- Strategi perencanaan sdm
- Interfacing projects
- 8085 interfacing
- Lcd and keyboard interfacing
- Stepper motor interfacing with 8051
- Multilevel bus architecture
- Adc 0804 interfacing with 8051
- Interfacing of 8255 with 8085
- What is peripheral and interfacing
- Bus interfacing
- 8085 pins
- Advantages of servo motor
- Microprocessor programming tutorial
- Hardware interfacing in embedded system
- Adc and dac interfacing with 8051
- 8051
- Bus interfacing
- What is interfacing assembly with hll in details?
- An example of left entry display mode is
- Introduction to programmable logic devices
- Mlf lezyonu
- Bus interfacing
- Interfacing alternative
- Intel ppi
- Hát kết hợp bộ gõ cơ thể
- Lp html