I have a RCM3900 and I attack with input capture. I helped one of the sample (IC_Test.c) but I missed one little thing. it is written:
WrPortI (ICS1R, NULL, 0xCC) / / //PG1 is pulse capture pin for channel 1
I know that ICS1R is Input Capture Source 1 Register. But I do not understand why 0xCC means PG1.
In addition, this program uses the switch S3. How did you it connected to PG1
Hi,
OxCC means (MSB)11001100(LSB),
here 6,7 bits for Parallel Port G used for Start condition input,
2,3 bits for Parallel Port G used for Stop condition input.
I think you can understand.
For the registers details see the R3000 processor manual.
In RCM3900, the PG1 using the switch S2.
In Rabbit 3000 processor , the 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 also thought that S2 was connected to PG1 but when I test the program IC_TEST.c when I press S2 nothing happens … Must I press S3 !!!
So I think S3 is connected to PG1
Starting of the program what they mentioned? comments
/**********************************************************
ic_test.c
Z-World, 2002
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.
The RCM3900 having the processor R3000 only, I have tested this program on the board 3209, on that board it was connected S2 at PG1 only. Just i want to confirm that in your program what they mentioned as comments. …
Yes thank you I changed the comments. But I also saw the drawings of RCM 3900 that was connected to S2 PG0.
Where do I change 0xCC PG0 to whether the capture input???
Hello, Do not change the comments. I want to know that what they mentioned in the comments. I want to confirm that whether they mentioned wrong information in the document. Have you seen the R3900 user manual?
Nan no false information in the comments …
Oh I just saw that PG0 can not be an input capture.
Before you told me 0xCC defined initial conditions (bits 6 and 7) and stop conditions (2 and 3). Can you explain a little more running because I thought it was based on years S3 S3 is a switch, it can not be connected to the cock and 7,6,3,2 PG0 same time …
Hello, if you do not mind , could you please send the comments in the starting of the program what they mentioned? after that we can discuss about this issue.