If anyone has ever wondered what the max frequency for the chipKIT Pi (or chipKIT DP32) is compared to the Arduino UNO using digitalWrite(), check out the differences below:
This was taken using the Analog Discovery™ using WaveForms™. The PIC32 is on top and the Uno is on the bottom in the image.
PIC32 frequency on average is roughly around 403.23 kHz (PIC32MX250F128B).
UNO frequency on average is roughly around 128.87 kHz (ATmega328).
The PIC32 has roughly a 3.13 times faster frequency than the UNO using the digitalWrite() function.
This test used the following code segment below for both:
#define pin_Toggle 13
void setup() {
pinMode(pin_Toggle, OUTPUT);
}
void loop() {
while(1)
{
digitalWrite(pin_Toggle, HIGH);
digitalWrite(pin_Toggle, LOW);
digitalWrite(pin_Toggle, HIGH);
digitalWrite(pin_Toggle, LOW);
digitalWrite(pin_Toggle, HIGH);
digitalWrite(pin_Toggle, LOW);
}
}
PIC32 frequency on average is roughly around 403.23 kHz (PIC32MX250F128B).
UNO frequency on average is roughly around 128.87 kHz (ATmega328).
The PIC32 has roughly a 3.13 times faster frequency than the UNO using the digitalWrite() function.
This test used the following code segment below for both:
#define pin_Toggle 13
void setup() {
pinMode(pin_Toggle, OUTPUT);
}
void loop() {
while(1)
{
digitalWrite(pin_Toggle, HIGH);
digitalWrite(pin_Toggle, LOW);
digitalWrite(pin_Toggle, HIGH);
digitalWrite(pin_Toggle, LOW);
digitalWrite(pin_Toggle, HIGH);
digitalWrite(pin_Toggle, LOW);
}
}