Setting IO Pin on the Rabbit 4010

I am working on a platform that uses the Rabbit 4010 core. I have read the user’s guide and even purchased the Rabbit 3000 book, but I can’t seem to find any information about how to set the IO pins on the Rabbit boards.

My previous platform used the PIC architecture where the commands were TRIS to set as input/output and ADCON to set as analog/digital.

Any help would be greatly appreciated.

Hello Chris,
Documentation is free. For Rabbit 4000 products, you should look at this link:http://www.rabbit.com/products/rab4000/docs.shtml The Users guide and the Designers handbook should have all the inforamtion you need.

Thank you for the link, my team and I have been through the documentation but we have still not found the info we need. Perhaps we are simply overlooking it, but several sets of eyes have yet to find it.

I should probably clarify my question a bit. We need to know how to set the I/O pins in Dynamic C for the Rabbit 4010. All of our searches thus far have been fruitless.

Hello, You should look at the core’s Users manual section:
5.2 Dynamic C Function Calls
5.2.1 Digital I/O
The RCM4000 was designed to interface with other systems, and so there are no drivers written specifically for the I/O. The general Dynamic C read and write functions allow you to customize the parallel I/O to meet your specific needs. For example, use
WrPortI(PEDDR, &PEDDRShadow, 0x00);
to set all the Port E bits as inputs, or use
WrPortI(PEDDR, &PEDDRShadow, 0xFF);
to set all the Port E bits as outputs.
When using the auxiliary I/O bus on the Rabbit 4000 chip, add the line
#define PORTA_AUX_IO // required to enable auxiliary I/O bus
to the beginning of any programs using the auxiliary I/O bus.
The sample programs in the Dynamic C SAMPLES/RCM4000 folder provide further examples.

Documentation is located at

http://www.rabbit.com/products/rcm4000/docs.shtml

Thank you.

Now, as for reading from and writing to the I/O pins? I never though that it would be do different going from one micro to another.

It would seem that our prior experience with the PIC architecture is not serving us well, unfortunately.

Hello Chris,
The functions to do this are in the DYnamic C FUnctions reference manual located at http://www.rabbit.com/documentation/docs/manuals/DynCFunctionReference/DynCFunRef.pdf
For example:
RdPortI
int RdPortI( int port );
DESCRIPTION
Reads an internal I/O port specified by the argument (use RdPortE() for external port). All of the Rabbit internal registers have predefined macros corresponding to the name of the register. PADR is #defined to be 0x30, etc.

There are also RdPortE, BitRdPortI, BitRdPortE. If you do a GREP search in Dynamic C, you will see how these functions are used in the sample programs, you can also do a function lookup in Dynamic C as well.
I hope this helps
:slight_smile:

hi, i have a rabbit core RCM4510W and i want to use a inptut campture, i dont know how configurate, i need help! and i dont know too, how used with dynamic c… thks