• I can't attach the bad logic analyzer output for some reason, you can find it on my Google Drive.

    Mod: since then I've edited this post and added the image here.


    1 Attachment

    • espruino_pulses_0.03_0.03_0.045.png
  • Sun 2020.01.19

    'I can't attach the other logic analyzer output'

    FYI - Only one image may be uploaded at a time. Did an attempt at a re-edit allow the ability to perform the additional upload? It's okay to re-edit to test


    Hi @nistvan.86, I'm late to this thread and wont be of much help should this truly be an ESP8266 issue, but I'm not really grasping what isn't working.

    'And this does make the modem reset work, I can query it's version number afterwards.'
    'Am I still doing something wrong?'

    Is the concern still with this msg while 2v04 is currently flashed?

    'You have pre-1v96 firmware'

    Has 'af_output' been tried for pinMode()?

    http://www.espruino.com/Reference#l__glo­bal_pinMode

    0.03 msec is 30 usec and the pulse shown appears to be documented as 29.8 usec
    Was this of concern?

    EDIT: I think I get it, the question is why is it necessary to prepend two place holders?



    Incidentally, I've been playing with digitalPulse() and ran into a similar situation. My (unresolved and unresearched at 'C' code level) belief is that the array mechanism requires whole numbers, and a decimal seems to muck things up. I was able to create narrow usec pulses at the usec level using the following as a patch: (edit as necessary)

      analogWrite( D4, 0.01, { freq : 4000 } );
      // to trun off
      analogWrite( D4, 0, { freq : 1 } );
    

    yes, I know it uses the analog flavor, . . .

    http://www.espruino.com/PWM
    http://www.espruino.com/Software+PWM

    then to create a pulse train, embed within an interval, something like: (use setTimeout() for a single pulse)

      intervalID = setInterval( function() {
        // Fire the enable pulse
        dp4once();
    
      }, freq );
    



    Not sure if this is what you are after, but I'm running short on time tonight and wouldn't be able to respond should you reply. Just thought I'd pass along some ideas. . . .

    Source code links if time allows to research
    https://github.com/espruino/Espruino/blo­b/master/src/jswrap_io.c#L201
    https://github.com/espruino/Espruino/blo­b/master/src/jswrap_io.c#L167

    If I've butt'ed in and not assisting here, please forgive. . . .

About

Avatar for nistvan.86 @nistvan.86 started