Hamid Khan Project Code.docx

  • Uploaded by: Hamid
  • 0
  • 0
  • October 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Hamid Khan Project Code.docx as PDF for free.

More details

  • Words: 89
  • Pages: 2
sbit LDR at portD0_bit; sbit LCD_RS at portC0_bit; sbit LCD_EN at portC1_bit; sbit LCD_D4 at portC2_bit; sbit LCD_D5 at portC3_bit; sbit LCD_D6 at portC4_bit; sbit LCD_D7 at portC5_bit;

sbit LCD_RS_Direction at DDC0_bit; sbit LCD_EN_Direction at DDC1_bit; sbit LCD_D4_Direction at DDC2_bit; sbit LCD_D5_Direction at DDC3_bit; sbit LCD_D6_Direction at DDC4_bit; sbit LCD_D7_Direction at DDC5_bit; char arr[11]="0123456789"; void main (){ DDRD=0x01; portD=0x00; LCD_Init(); ADC_Init(); Lcd_Cmd(_LCD_CLEAR); LCD_Cmd(_LCD_CURSOR_OFF); LCD_out(1,1,"NO SIGNAL "); LCD_out(2,2,"signal trans ");

while(1){ int res=0; res=ADC_READ(0); LCD_chr(2,1,arr[res/1000%10]); LCD_chr(2,2,arr[res/100%10]); LCD_chr(2,3,arr[res/10%10]); LCD_chr(2,4,arr[res%10]);

if(res<=510) LDR=0; LCD_out(1,1,"NO SIGNAL "); if(res>510) LDR=1; LCD_out(2,2,"signal trans "); } }

Related Documents

Khan
June 2020 26
Khan
May 2020 33
Khan
May 2020 29
Khan
November 2019 48
Pak Hamid
May 2020 13

More Documents from ""

Panj Porsesh
May 2020 16
May 2020 30
May 2020 15
May 2020 22
May 2020 22