Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
924 Views

Intel Curie : GPIO is not switching at 40Khz

Hi,

I am using Intel Curie GPIO to create 40Khz output square wave. I have used 25usec delay between the Rise and fall time in a simple for loop.

But I am not getting 40Khz at the output of GPIO..

Is this a HW limitation or is there a better mechanism to generate 40Khz using Intel Curie...

Thanks and regards

Tigi

0 Kudos
4 Replies
Tigi_T_Intel
Employee
72 Views

Just a correction rise and fall time is 12 and 13 nsec

Tigi

idata
Community Manager
72 Views

Hi Tigi,

 

 

Thanks for contacting us.

 

 

I would like to know how you are using the Intel Curie Module, if it is on the Arduino 101 or in other custom board. Also, what GPIO are you using? What signal and frequency are you getting?

 

I'll be waiting for you reply.

 

 

Regards,

 

-Yermi

 

idata
Community Manager
72 Views

Hi Yermi,

I am using Arduino 101 board and Arduino 1.6.11 compiler.

I am using PIN2 for the same..

Please see the code below. I have done analysis on the frequency on different values of delay

# define PIN 2

# define DELAY 9

// the setup function runs once when you press reset or power the board

void setup() {

// initialize digital pin 13 as an output.

pinMode(PIN, OUTPUT);

}

// the loop function runs over and over again forever

void loop() {

digitalWrite(PIN, HIGH); // turn the LED on (HIGH is the voltage level)

delayMicroseconds(DELAY);

digitalWrite(PIN, LOW); // turn the LED off by making the voltage LOW

delayMicroseconds(DELAY);

}

The table of frequencies measured and expected freq is given below

Delay 5020109Expected Freq10000250005000055555.56Actual Freq(measured)9400216003800041000
idata
Community Manager
72 Views

Hi Tigi,

Thank you for your reply. Maybe you can use PWM pins.

However, I recommend you post this question in the Arduino 101 forum (https://forum.arduino.cc/index.php?board=103.0 https://forum.arduino.cc/index.php?board=103.0) and provide them all these information. They are in charge of the Arduino 101 support, so they'll be able to provide a more accurate answer.

Regards,

 

-Yermi

 

Reply