Professional Documents
Culture Documents
X = 184C
Flow diagram:
Image 1.1 ADC connections
Image 1.2 LM35 and PIC Connections
Image 1.3 PIC-MAX232 and ADC connections
Code used:
char temp;
void main() {
Uart1_Init(56000);
Delay_ms(100);
TRISB=0xFF;
while (1) {
if (Uart1_Data_Ready()) {
if(Uart1_read()==114){
temp=PORTB;
Uart1_Write(temp);
}
}
}
}
Conclusions:
Oscar Concha: In this practice I could understand how the ADC works because this is
the first time that I work with it in practice, in previous courses I only learned the theory
of the component. Another thing that I could appreciate is that sometimes the ADC
shows errors in the computer because the circuit doesnt function correctly and you
must to reboot the device for proper operation. With this practice I could establish a
communication with the LM35 and the computer, with the code that was downloading
to the PIC we could read the information of the LM35 and check the temperature
Eduardo Chavarra: This practice was very helpful to understand how a signal its get
from the environment and converted into a digital one. We can see how the ADC works
when you put on it an analog signal, in this case temperature, and then digitalized it so
you can work with it. In this case we didnt manipulate the signal, but it was possible to
see the response of the system in the computer and estimate the temperature that the
LM35 obtained. There was a problem with the protoboard but it was solved by just
changing it.
References
http://www.hardwaresecrets.com/article/How-Analog-to-Digital-Converter-ADC-
Works/317/2
http://www.mikroe.com/chapters/view/87/libro-de-la-programacion-de-los-
microcontroladores-pic-en-basic-capitulo-4-ejemplos/#c4v14