Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
“MICROCONTROLLER BASED
WHEATHER MONITORING SYSTEM”
Signature_____________
1. Microcontroller (89C61x2):
Microcontroller 89C61X2 is 8051 microcontroller
series with ROM memory of 4kB and RAM memory
of 128 byte.
PORT ::4
PINS ::40
2. TEMPERATURE SENSOR(LM35D)
3
3. (ANALOG TO DIGITAL CONVERTER(ADC 0808CCN)
The A/D converter uses successive approximation to
perform the conversion.
The converter is composed of the successive
approximation register, the DAC and the comparator.
No of Pins ::28
input range ::0V to 5V
Resolution ::8-bit
Conversion Time ::116 μs
Input type :: single
4
NI KIT-51 CIRCUIT SCHEMATICS
5
6
ASSEMBLY LANGUAGE PROGRAM FOR
WEATHER MONITORING SYSTEM
USING:: 1. MICROCONTROLLER 89C61X2
2.ADC 0808
3. TEMPERATURE SENSOR LM35D
;================================================= ==============;
org 0000h
BEGIN:
ACALL command
ACALL command
ACALL command
ACALL command
mov A,#'T'
ACALL DISPLY
mov A,#'E'
ACALL DISPLY
mov A,#'M'
ACALL DISPLY
mov A,#'P'
ACALL DISPLY
mov A,#'='
ACALL DISPLY
ACALL ADC
ACALL BINTOASC
ACALL command
ACALL DISPLY
ACALL command
ACALL DISPLY
ACALL command
ACALL DISPLY
mov A,#'d'
ACALL DISPLY
mov A,#'C'
ACALL DISPLY
acall delay
acall delay
acall delay
command:
ACALL READY ;Is LCD ready
clr p2.5
ret
DISPLY:
ACALL READY
clr p2.5
ret
READY:
setb p0.7
BACK:
setb p2.5
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;READS ADC DATA;;;;;;;;;;;;;;;;;;;;;;
ADC:
clr p3.2
nop
WAIT:
acall delay
MOV 35H,A
ret
BINTOASC:
div AB
swap A
orl A,r0 ;OR 3rd & 2nd BCD to form compact BCD
ret
dac:
mov a,35h
mov p1,#00h ;port p1 as o/p port
acall delay
mov p1,a
acall delay
;clr p3.7
ret
LOOP:djnz r1,loop
djnz r0,loop1
ret
end
GNA