Let us take one step at a time..
1. First, you will probably need to configure some sort of counter... What model of PIC are you using?
Once you configure the counter you say something like
Code:
//where x is the count that equals 1/10 seconds
//"pin" is pin on which the incoming signal is
//"already_counted" is a variable used to make sure a high pulse is only counted once
//"count" is the count that you are keeping
while (count < x)
{
if (pin == 1 && already_counted == 0)
{
count = count + 1;
already_counted = 1;
}
if (pin == 0 && already_counted == 1)
{
already_counted = 0;
}
if (pin == 0 && already_counted == 0) {}
if (pin == 1 && already_counted == 1) {}
else
{
}
}
2. Now that you have that number you simply say...
Code:
//where "final_value" is the integer in which you will be storing your results.
final_value = 600 * count;
3. The last question is a bit more complex. How you go about displaying data on an LCD depends on a few things..
a. What protocol does the LCD use to communicate? SPI, UART, I2C, etc.
b. Does the LCD require a "library" so to speak, or can you simply send it commands or characters to display.
c. What is the size of the LCD, how many character blocks and lines does it have? (So you can know where to display things).
Once you answer these question we might be able to offer a bit more assistance. Also, if you post your code we would be more than happy to help you.
Regards,
Willis