1 / 9

Rangkaian ADC

Rangkaian ADC. 0804 dan 0808. ADC 0804. ADC 0808.

margie
Download Presentation

Rangkaian ADC

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Rangkaian ADC 0804 dan 0808

  2. ADC 0804

  3. ADC 0808

  4. Sesuai dengan namanya ADC berfungsi sebagai konversi data analog ke data digital, dalam aplikasi ini digunakan ADC tipe ADC0804 yang mempunyai satu line input analog dengan tegangan referensi +5 Volt. Rangkaian ditunjukkan pada lampiran dengan perhitungan konversi sebagai berikut : • Data digital 8 bit maksimal (Dmax) adalah 11111111 dalam biner atau FF dalam Hex dan 255 dalam desimal. Apabila tegangan referensi = 5 Volt maka data maksimal dari 8 bit 255D = 5 Volt. • Misalkan ADC menerima input analog, terus dikonversi oleh ADC sehingga ADC mengeluarkan data digital dan dibaca oleh mikrokontroler (Dout) = 10000000B atau 80H dan dalam desimal 128D, berarti ADC membaca input tegangan analog (Vin) : • Tegangan yang dibaca ADC (Vin) = ( Data digital dari ADC yang dibaca mikrokontroler dibagi Data digital maksimal ) dikalikan Tegangan Referensi. • Vin = (Dout / Dmax) x Vref. Vin = (128 / 255) x 5 Volt = 0,5 x 5 Volt Vin = 2,5 Volt

  5. ADC_CS bit P2.0 • ADC_RD bit P2.1 • ADC_WR bit P2.2 • ADC_INT bit P2.3 • ; • org 0h • next_sampling: • clr ADC_CS ; aktifkan ADC0804 • clr ADC_WR ; start of conversion • setb ADC_WR • not_EOC: • jb ADC_INT,not_EOC • delay: djnz R2,$ • djnz R3,delay • clr ADC_RD ; Baca Data melalui P3 • djnz R3,$ • mov A,P3 • setb ADC_RD • setb ADC_CS • cpl A • mov P1,A • sjmp next_sampling • end

  6. ADC_A bit P2.7 • ADC_B bit P2.6 • ADC_C bit P2.5 • ADC_OE bit P2.4 • ADC_START bit P2.3 • ADC_EOC bit P2.2 • ; • org 0h • ; ADC channel 0 ABC = 000 / input 1 • clr ADC_A • clr ADC_B • clr ADC_C • ; kondisi awal • clr ADC_OE • clr ADC_START • next_sampling: • setb ADC_START ; start of conversion • nop • clr ADC_START • not_EOC: • jnb ADC_EOC,not_EOC • delay: djnz R2,$ • djnz R3,delay • setb ADC_OE ; Baca Data melalui P3 • djnz R3,$ • mov A,P0 • clr ADC_OE • cpl A • mov P1,A • sjmp next_sampling • end

  7. Prosedur merubah hexa ke desimal • Mov B,#100 • Div AB • Mov Dptr,#Angka • Movc A,@A+Dptr • Mov rat,A • Mov A,B • Mov B,#10 • Div AB • Mov Dptr,#Angka • Movc A,@A+Dptr • Mov pul,A • Mov A,B • Movc A,@A+Dptr • Mov sat,A • Ret Angka: • DB 7Eh,18h,6dh,03dh,1Bh,37H,73H,1CH,7fH,3fH,00H • End

  8. Display: Acall Satuan Lcall Delay Acall Puluhan Lcall Delay Acall Ratusan Lcall Delay Ret Satuan: Mov Dptr,#Portb Mov A,70h Movx @Dptr,A Mov Dptr,#PortC Mov A,#10h Movx @Dptr,A Ret Konversi ke Volt • Puluhan: • Mov Dptr,#Portb • Mov A,71h • Movx @Dptr,A • Mov Dptr,#PortC • Mov A,#20h • Movx @Dptr,A • Ret • Ratusan: • Mov A,72h • Mov Dptr,#Angka • Movc A,@A+Dptr • Mov Dptr,#Portb • Movx @Dptr,A • Mov Dptr,#PortC • Mov A,#40h • Movx @Dptr,A • Ret

  9. Olah: • Mov A,74h • Mov B,#51 • Div AB • Mov 72h,A • Mov 30h,B • Mov A,B • Mov B,#50 • Div AB • Jz gs • Inc 72h • Clr A • ajmp ga • gs: Mov A,30h • ga: Mov B,#5 • Div AB • Mov Dptr,#Koma • Movc A,@A+Dptr • Mov 71h,A • Mov A,B • Movc A,@A+Dptr • Mov 70h,A • Ret

More Related