Hi, I am making a thermometer using the LM35 interfaced to the pic16f690 for a school project using the assembly language. The temperature in degrees Celsius needs to be displayed on two multiplexed seven segment displays.
I am using MPLABX with the PicKit 3 to program the MCU and simulator to debug. I am having trouble with the ADC of the LM35, the result stored in ADRESL and ADRESH stays at 0 and does not change. In the simulator ADRESL and ADRESH does not update with changing voltage from the LM35, but I have noticed that it only changes the moment the simulation is paused, when resumed thereafter the registers do not update until the simulator is paused again.
Apart from the ADC issue the rest of the code has been tested and verified working.
I am using AN0 as the analogue input, VDD for reference voltage, PortC to display on the SSD's, RB4 and RB5 to multiplex and Fosc/4.
Thanks in advance
I am using MPLABX with the PicKit 3 to program the MCU and simulator to debug. I am having trouble with the ADC of the LM35, the result stored in ADRESL and ADRESH stays at 0 and does not change. In the simulator ADRESL and ADRESH does not update with changing voltage from the LM35, but I have noticed that it only changes the moment the simulation is paused, when resumed thereafter the registers do not update until the simulator is paused again.
Apart from the ADC issue the rest of the code has been tested and verified working.
I am using AN0 as the analogue input, VDD for reference voltage, PortC to display on the SSD's, RB4 and RB5 to multiplex and Fosc/4.
Thanks in advance
Attachments
-
4 KB Views: 61