??? 03/11/08 15:24 Read: times |
#152124 - ADC |
hi,
I am working with AT89C51 Board.it has on board ADC.i have interfaced LM35 to analog input8.ADC part on my evalution board is same as typical application on ADC0808 datasheet.here decoder input is A0-A15.EOC is used as an external hardware interrupt.EOC is connected to p3.2 of the controller.A0,A1,A2 Select the analog input8.when i execute this, i couldn't get answer.i want to check this code is right or wrong. can anyone help me .... START: ORG 2000H LJMP MAIN ORG 2003H MOV DPTR,#0001H MOVX A,@DPTR RETI ORG 2030H MAIN: ACALL SERIAL MOV IE,#10000001B SETB TCON.0 HERE: MOV A,#07H MOV DPTR,#0001H MOVX @DPTR,A ACALL HEXTODEC ACALL DECTOASCII SJMP HERE SERIAL: MOV TMOD,#20H MOV TH1,#0F6H MOV SCON,#50H SETB TR1 RET HEXTODEC: MOV R0,#40H MOV B,#10 DIV AB MOV @R0,B INC R0 MOV B,#10 DIV AB MOV @R0,B INC R0 MOV @R0,A RET DECTOASCII: MOV R0,#42H MOV R1,#3 H1: MOV A,@R0 ORL A,#30H ACALL TX DEC R0 DJNZ R1,H1 RET TX: CLR TI MOV SBUF,A L5: JNB TI,L5 RET END |
Topic | Author | Date |
ADC | 01/01/70 00:00 | |
is there some monitor involved? | 01/01/70 00:00 | |
Muthu, would you please be so kind... | 01/01/70 00:00 | |
ADC | 01/01/70 00:00 | |
Strange Hookup | 01/01/70 00:00 | |
What, exactly, does this imply? | 01/01/70 00:00 | |
it has hurt many to sit down after they ... | 01/01/70 00:00 | |
ADC | 01/01/70 00:00 | |
compare your ADC timing with data sheet p4![]() | 01/01/70 00:00 |