VTech Alphabert s Magic Readport User Manual Page 72

  • Download
  • Add to my manuals
  • Print
  • Page
    / 80
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 71
Lab Manual of Microcontroller & Interfacing Page 72
EXPERIMENT NO. 16
AIM: Interface ADC0808 with AT89C51 microcontroller. Write a program to read analog
voltage applied at the input of ADC. Display hex code of analog value on LEDs connected
at port P0.
Circuit diagram:
Program:
; Microcontroller connections to ADC0808/9 lines.
START EQU P3.6 ; Pin 6 Start
EOC EQU P3.2 ; Pin 7 EOC
OE EQU P3.7 ; Pin 9 Output Enable
ALE EQU P3.6 ; Pin 22 ALE
ORG 00h
MOV P0,#00h ; P0 OUTPUT PORT TO DRIVE LEDs
MOV P1,#0FFH ; P1 INPUT PORT TO READ ADC
MOV P2,#00H ; P2 OUTPUT PORT TO SELECT CHANNEL
MOV R0,#05H
LOOP: MOV P0,#0FFH
ACALL DELAY
MOV P0,#00H
ACALL DELAY
DJNZ R0,LOOP
BACK:
MOV P2,#00H ; SELECT ADC CHANNEL 0
ACALL SDELAY
Page view 71
1 2 ... 67 68 69 70 71 72 73 74 75 76 77 78 79 80

Comments to this Manuals

No comments