chipKIT® Development Platform

Inspired by Arduino™

Little info about speed of ChipKit Max32

Created Sat, 26 Nov 2011 22:13:18 +0000 by ninjam


ninjam

Sat, 26 Nov 2011 22:13:18 +0000

Hi, sorry for my bad english. I'm Italian.

I have a question :

I have a ChipKit Max32 board and try to run this little code :

void setup() {                
  // initialize the digital pin as an output.
  // Pin 23 has an Frequency Counter connected
  pinMode(23, OUTPUT);     
}

void loop() {
  digitalWrite(23, HIGH);   // set the Pin23 on
  digitalWrite(23, LOW);    // set the Pin23 off

}

The best frequency measured on Pin23 is 665 Khz.

Only 665Khz ????

Why a PIC32 running at 80Mhz generate only a frequency of 665 Khz ??

There is a mistake ?? where ??

Thanks in advance.

-=[ Ninjam ]=-


Jacob Christ

Sun, 27 Nov 2011 03:53:26 +0000

You should read this thread...

http://chipkit.cc/forum/viewtopic.php?f=7&t=448&hilit=digitalwrite

Jacob


drBart

Mon, 28 Nov 2011 05:12:31 +0000

There's actually a number of things that contribute to the length of the period, to include function calls, and the instructions contained within digitalWrite().

Take a look at this post: http://www.chipkit.org/forum/viewtopic.php?f=19&t=511


ninjam

Mon, 28 Nov 2011 16:38:08 +0000

Great info..

Thanks a lot..

-=[ Ninjam ]=-


gulabgang

Wed, 31 Dec 2014 10:55:48 +0000

I'm getting this behaviour with MPIDE in the newest test build ('builds/mpide-0150-windows-20141104-test.zip') and also with the priorly used version ('builds/mpide-0023-windows-20140316.zip'). No difference.