This is the code that I am using to try and produce an constant output voltage of five volts, and another port to determine the input voltage. Thanks for any help
/* ========================================================================= /
/ Initialize Rabbit Port C to have an input at PC0 and an output at PC1 /
/ that is generating 5V /
/ ========================================================================= */
void PortInit()
{
/* Set up port C to have an output at PC1 and an input at PC0 /
WrPortI(PCDCR, NULL, 0); / All bits are normal - not open drain /
WrPortI(PCFR, NULL, 0); / Normal function - general ios /
WrPortI(PCDDR, NULL, 0xfe); / All bits as outputs, except PC0 /
WrPortI(PCDR, NULL, 0x02); / Set all bits to 0, except PC1 */
}