This program is used with RCM3000 series controllers
with prototyping boards.
Description
===========
This program demonstrates a simple application of input
capture peripheral. It measures the duration of a low pulse
on switch S2 (PG1) and displays to STDIO. Port G bit 1 is
channel 1 pulse capture pin.
Note: Interrupts are not used in the demo.
Instructions
============
1. Compile and run this program.
2. Press and release switch S2 on the proto-board.
3. Observe the amount of time you hold S2 down in STDIO.
In Rabbit 3000 processor Each Input Capture channel can accept input from one of the following parallel port pins:
PC1, PC3, PC5, PC7, PD1, PD3, PD5, PD7, PF1, PF3, PF5, PF7, PG1, PG3, PG5, PG7.
I think RCM3900 they have designed the board to capture the data from the PG1, so S3 connected to the PG1.So If we want to get data from the port G , we should initialize the Input Capture Source 1 Register with the value 0xCC. See the R3000 microprocessor product manual. There They explained clearly
Hi,
Here we are checking the 4 th bit , if the Input Capture 1 Stop condition has occurred this bit set to 1.
If( ICCSR == 0 x10 )
{
// reading the value
}
else
{
}