Hi i am using anolog device aduc812 microcontroller i tryed to accesses buit in adc with out giving input i am getting output 0xFFF i.e maximum value in all channel except channel 8 ie temp sensor.taht gives some value ie 423 what is the problem please help me
it is part of program
No, it's not. There's no program this could be "part" of. It might be referred to as "clippings", at best.
And there are lots of things wrong even with these small clippings. You totally confuse C and assembler language, and to add insult to injury, neither the C nor the asm is written particularly well. For example you should not call asm functions from the middle of C code without a much better reason than is apparent in those clippings --- and even if you do, you don't do it by issuing a verbatim asm CALL instruction.
CSEG AT 0 USING 0 JMP START ORG 100 START:NOP UP:NOP call ADC_START; //DO SOME WORK // CALL RETRIVEDATA; JMP UP // ADC ISR ORG 0033H MOV A,ADCDATAL CALL DISPLAY MOV A,ADCDATAH CALL DISPLAY IRET ADC_START: MOV ADCCON1,#07CH MOV ADCCON2,#08H SETB EA ; enable interrupts SETB EADC ; enable ADC interrupt SETB SCONV RET END
I connected .7 volt stil showing output 0xfff
On the same input that you previously connected to -3.3V, and that may be burned to cinders right now?
Why do you have one label START and another label UP with a single nop between? can't you use the same label? And why do you think that you need a nop after the label?
You read out low and high byte of the ADC and perform separate calls to your display code (which you haven't shown). How do you expect your display code to know if it receives the high or low byte of data?
How have you deduced that you pick up the value 0xfff? By looking at the actual register contents in a debugger, or by assuming that your code is correct and will display the correct information on the display? Or did you use any other method?
Thanks for ur support actualy i did the simple mistake now im getting correct output
You should write your fix here so that others can learn from your mistake.