MAX I/O speed (RCM3700)?

Using the following program I get a square signal of 8.76 us (@114 kHz) or 5.15 us (@194 Khz) without the programming cable (no polling), is this the maximum port speed?
That low?

Thanks for any hint
(new using this processor)

#define LED_ON BitWrPortI(PBDR, &PBDRShadow, 0, 2);
#define LED_OFF BitWrPortI(PBDR, &PBDRShadow, 1, 2);
//*****************************************************************************
void main()
{
// B port all outputs
WrPortI(PBDDR,&PBDRShadow,0xFF);

printf("I/O SPEED Test
");

while(1) {
LED_ON;
LED_OFF;
}
}

So, there is No rabbit inside,
it really a turtle!
:mad:

You could write bytes directly to the data register in assembler. Saves the overhead of accessing the shadow register and setting the individual bit.

Hello Baja,

Trying to find out how much time it takes to my Rabbit 3000 uP (@29Mhz) I ran the following code:

/****************************************************/
#class auto
#no debug
main()
{

  useMainOsc();
  clockDoublerOn();
  WrPortI(PCFR,&PCFRShadow,0);          /*Port C setup*/
  WrPortI(PCDR,&PCDRShadow,0x08); 	 /*pin 4:  High*/

while(1) /Infinite loop
{
BitWrPortI(PCDR,&PCDRShadow,0,4);
BitWrPortI(PCDR,&PCDRShadow,1,4);
BitWrPortI(PCDR,&PCDRShadow,0,4); /
Repeats the instruction to avoid the delay of executing the while loop*/
BitWrPortI(PCDR,&PCDRShadow,1,4);
BitWrPortI(PCDR,&PCDRShadow,0,4);
BitWrPortI(PCDR,&PCDRShadow,1,4);
BitWrPortI(PCDR,&PCDRShadow,0,4);
BitWrPortI(PCDR,&PCDRShadow,1,4);
BitWrPortI(PCDR,&PCDRShadow,0,4);
BitWrPortI(PCDR,&PCDRShadow,1,4);
BitWrPortI(PCDR,&PCDRShadow,0,4);
BitWrPortI(PCDR,&PCDRShadow,1,4);
BitWrPortI(PCDR,&PCDRShadow,0,4);
}
}

With this code I measured the time between the 0 to 1 transition to the next 1 to 0 and it took 1.4useg.

The key word is the #no debug directive that tells the compiler not to introduce an interrupt after every C line to allow Dynamic C to debug the code (Remember that when you are conected via the programming port the uP is permanently being polled).

Another thing, you have to download this program to flash and unplug the programming cable to allow the uP to run stand alone at full speed. If you forget the programming cable connected a message telling you that Dynamic C lost connection with the host will appear (that�s because as the uP is not interrupted it can�t be polled).

Hope this will help you. If you have a better idea please let me know (I am also new at this)

Luciano

PS: just to compare. A workmate downloaded to FPGA from Xilinx (Spartan 3) a uP core from xilinx named Microblaze and ran the same experiment with a 50Mhz clock. Well, It took 1usec to the FPGA to do the same so I think that the rabbit runs.