The following is not specifically for the RCM6700 but it should show you how to proceed:
Note: This information is general to the Rabbit 4000 and certain pins may not be available on your product.
The first thing I want to do is to point you to our Rabbit 4000 Processor Easy Reference Poster:
http://ftp1.digi.com/support/documentation/0230125_b.pdf
The poster shows all the registers you need to set and makes it pretty easy to find what you need.
In the center of the poster is a description of the Parallel Ports and the registers associated with each one. For more specific details on the Parallel Ports, you will want to look here:
http://ftp1.digi.com/support/documentation/019-0152_L.pdf
Using the digital I/O on the Rabbit products isn’t difficult but is easier to do after looking at an example. Let’s step back for a moment and consider a simpler problem like lighting up two LEDs on Parallel Port D.
You could hook the LEDs directly up to PD4 and PD5 and use pull-up resistors with the LEDs like this.
+5 Volts ------////------- LED1 ----------PD4
+5 Volts ------////------- LED2 ----------PD5
(I would recommend a 330 Ohm or bigger resistor.)
With the LEDs hooked up as above, you should be able to use this code to light both LEDs.
/************************************************************/
#define ON 0
#define OFF 1
main()
{
WrPortI(PDDCR, &PDDCRShadow, 0); // make D driven high and low (see manual for details)
WrPortI(PDDDR, &PDDDRShadow, 0xFF); // make D output (see manual for details)
BitWrPortI(PDDR, &PDDRShadow, ON, 4); // PD4 becomes GND and LED lights up
BitWrPortI(PDDR, &PDDRShadow, ON, 5); // PD5 becomes GND and LED lights up
}
/************************************************************/
PDDCR = Port D Drive Control Register (Use this to set open drain)
PDDDR = Port D Data Direction Register (Use this to define input or output)
PDDR = Port D Data Register (Use this to actually send the data)
This provides a very basic example of the digital I/O of a Rabbit microprocessor.
Full details on Parallel Port D (and more) can be found in the Rabbit 4000 Microprocessor User’s Manual here:
http://ftp1.digi.com/support/documentation/019-0152_L.pdf
After looking over this example, you should be able to do more complicated things.