john120
Banned
- Joined
- Aug 13, 2011
- Messages
- 257
- Helped
- 11
- Reputation
- 22
- Reaction score
- 10
- Trophy points
- 1,298
- Activity points
- 0
Print array number index on the lcd with PIC 16F877A
Can you plz help me to print on the lcd an index of any number after comparison of the following arrays;the pic is reading a frequency on its TICK1 of PIC16F877A and then that value is compared in those two arrays and print the index on the screen.
where am I wrong the lcd is alwyas printing 10;do not worry abot those codes just correct only those ones my main program is not displayed here.
Can you plz help me to print on the lcd an index of any number after comparison of the following arrays;the pic is reading a frequency on its TICK1 of PIC16F877A and then that value is compared in those two arrays and print the index on the screen.
Code:
void final()
{
const float lo_limit[10] = {1,2,3,4,5,6,7,8,70,85};
const float hi_limit[10] = {2,3,4,5 ,6,7,8,9,50,60};
for(i=0;i<lo_limit[i];i++)
{
for(j=0;j<hi_limit[j];j++)
{
if((value1>=hi_limit[i])&&(value1<=lo_limit[j]))
jean1=i;
printf(lcd_putc,"\f%d",i);
}
}}
where am I wrong the lcd is alwyas printing 10;do not worry abot those codes just correct only those ones my main program is not displayed here.
Last edited by a moderator: