1 Reply Latest reply on Jul 27, 2016 11:33 AM by Intel Corporation

    Intel Edison PWM Limits

    colinpeter

      I am trying to get data from an SSI encoder and need to pulse the clock at around 10 microseconds for each high and low. I have tried using both Python and Arduino IDE to make this work and the smallest pulse I can get is 100 microseconds (measured with a scope). What are the Edison's limits when it comes to this? If anyone has gotten code to send pulses at 10 microseconds or less please share. Here is my Arduino IDE code

       

      int CLOCK = 4;

      int DATA = 2;

      int b1 = 0;

       

      String datastring = "";

       

      void setup()

      {

        pinMode(CLOCK, OUTPUT); //clock

        pinMode(DATA, INPUT); //data

        delay(500);

        Serial.begin(115200);

      }

       

      void loop()

      {  

          digitalWrite(CLOCK,HIGH);

         

          datastring = "";

          for(int i = 0; i<12; i++)

          {

            delayMicroseconds(10);

            digitalWrite(CLOCK,LOW);

            delayMicroseconds(10);

            digitalWrite(CLOCK,HIGH);

            int b1 = digitalRead(DATA);

            datastring+=b1;

           

          }

          Serial.println(datastring);

          delayMicroseconds(50); //wait for next position bits

        }