Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
hi aljamriYes, in "Reading 4 - 20 mA on LCD using PIC16F876A", Eric told in post #7 that I can remove the bottom end +1V offset in the program, to get a Span of 4V.
I postpone asking him HOW, for future. Is that sort of what you Ian talking about ?
By the way... There is now a java based PIC assembler..http://frederic.pitoizet.pagesperso-orange.fr/eng/picasm.html Haven't tried it myself, but it looks good
char message1[] = "ADC Value= ";
char *value = "0000";
unsigned int ADC_Value;
void main() {
ADCON0 = 0b11000000;
ADCON1 = 0b10001111;
TRISA = 0xFF; // PORTA is input
TRISB = 0; // PORTB is output
Lcd_Init(&PORTB); // Initialize LCD
do {
adc_value = ADC_Read(0);
value[0] = adc_value/1000 + 48; // Add 48 to get character value
value[1] = (adc_value/100)%10 + 48;
value[2] = (adc_value/10)%10 + 48;
value[3] = adc_value%10 + 48;
Lcd_Out(1,11,value);
Delay_ms(2000);
} while(1);
}