Hello
Even, I have to do the same as what u have to do. I want to send the analog to digital converted data from PIC16F877 to computer through the parallel port.
I am connecting temperature sensor, LM35 to pin AN0 of PIC16F877, and I want to see the result of ADC on the computer and not on the LCD. I have the setup to read from parallel port, but I dont know, which Ports of PIC16F877 will have the converted data.
I am using picbasic pro to program the microcontroller. The program, I have written is shown below:
*****************************************************
define ADC_BITS 8
define ADC_CLOCK 3
define ADC_SAMPLEUS 50
x var byte
y var byte
z var byte
TRISA=255
TRISB=0
ADCON1=%00000000
pause 500
loop:
ADCIN 0,x
x = x * 100
output PORTB
pause 500
goto loop
____________________________________________________________
I want to know, by writing 'output PortB', will all the ports of PortB have 8 bits converted data???
If it is wrong, how should I send the result of conversion to any port? I mean, what modification should I do in the program???
From LM35, I am getting 0.25V(as it gives 10mV/C) according to the room temperature. I am multiplying by 100 to read the temperature on the computer.
Plz help...
Thanx a lot......
May God bless u all.........
Even, I have to do the same as what u have to do. I want to send the analog to digital converted data from PIC16F877 to computer through the parallel port.
I am connecting temperature sensor, LM35 to pin AN0 of PIC16F877, and I want to see the result of ADC on the computer and not on the LCD. I have the setup to read from parallel port, but I dont know, which Ports of PIC16F877 will have the converted data.
I am using picbasic pro to program the microcontroller. The program, I have written is shown below:
*****************************************************
define ADC_BITS 8
define ADC_CLOCK 3
define ADC_SAMPLEUS 50
x var byte
y var byte
z var byte
TRISA=255
TRISB=0
ADCON1=%00000000
pause 500
loop:
ADCIN 0,x
x = x * 100
output PORTB
pause 500
goto loop
____________________________________________________________
I want to know, by writing 'output PortB', will all the ports of PortB have 8 bits converted data???
If it is wrong, how should I send the result of conversion to any port? I mean, what modification should I do in the program???
From LM35, I am getting 0.25V(as it gives 10mV/C) according to the room temperature. I am multiplying by 100 to read the temperature on the computer.
Plz help...
Thanx a lot......
May God bless u all.........