Hi to all!
I have recently started to experiment a little bit with a PIC16F819 and I have problems with the operation of the A/D module.
I have attached the .asm file that I use.
It seems that after the A/D finishes with the conversion, the ADRESH and ADRESL registers are not updated with the result of the conversion and I don`t understand what I am doing wrong.
Actually, as you can see in the code, before the result is ready, I set the contents of both ADRESH and ADRESL to the value of 0x0F. The most logical behavior would be that after the A/D conversion -at least- one of these registers has a different content (I choose to display to PORTB -some LEDs- the ADRESH with the DISPLAY subroutine).
However, the final result is that PORTB has 0x0F!! So it seems that whatever the result of the A/D is, the ADRESH has not changed at all.
Does anyone have any good idea about this?
P.S. : Note that this test with the registers and the value 0x0F is just to investigate what the problem is. My initial code didn't include this part, but still didn't work properly
Thanks in advance,
Nick
I have recently started to experiment a little bit with a PIC16F819 and I have problems with the operation of the A/D module.
I have attached the .asm file that I use.
It seems that after the A/D finishes with the conversion, the ADRESH and ADRESL registers are not updated with the result of the conversion and I don`t understand what I am doing wrong.
Actually, as you can see in the code, before the result is ready, I set the contents of both ADRESH and ADRESL to the value of 0x0F. The most logical behavior would be that after the A/D conversion -at least- one of these registers has a different content (I choose to display to PORTB -some LEDs- the ADRESH with the DISPLAY subroutine).
However, the final result is that PORTB has 0x0F!! So it seems that whatever the result of the A/D is, the ADRESH has not changed at all.
Does anyone have any good idea about this?
P.S. : Note that this test with the registers and the value 0x0F is just to investigate what the problem is. My initial code didn't include this part, but still didn't work properly
Thanks in advance,
Nick