Avatar for rmd6502

rmd6502

Member since Aug 2017 • Last active Oct 2018
  • 5 conversations
  • 26 comments

Most recent activity

    • 17 comments
    • 246 views
  • in Projects
    Avatar for rmd6502

    And posing with a MDBT42Q module for size comparison

  • in Projects
    Avatar for rmd6502

    Thanks to @GordonGordon's and @allObjects' suggestions I've distilled the code to the following, as well as wiring up the rest of the cathodes and anodes, resulting in the attached video.

    const cathodes = [D24,D28,D27,D23];
    const anodes = [D31,D1,D11,D29,D2,D30,D6,D7];
    const patterns = [63,6,91,79,102,109,125,7,127,111];
    const zero = '0'.charCodeAt(0);
    
    var count = 0;
    var k = 3;
    var pattern = "   0";
    
    function onInit() {
      setTimeout(update, 0);
      setInterval(() => {
        if (++count == 10000) {
          count = 0;
        }
        pattern = ("   " + count.toString()).slice(-4);
      }, 25);
    }
    
    function update() {
      "compiled";
      digitalWrite(anodes, 0);
      digitalWrite(cathodes[k++], 1);
      if (k >= cathodes.length) {
        k = 0;
      }
      var ch = pattern[k];
      if (ch >= '0' && ch <= '9') {
        digitalWrite(cathodes[k], 0);
        digitalWrite(anodes, patterns[ch.charCodeAt(0) - zero]);
      }
      setTimeout(update, 0);
    }
    
  • in Projects
    Avatar for rmd6502

    yeah just too lazy to wire all the segments, lol
    free run is a good idea, will try that

  • in Projects
    Avatar for rmd6502

    Also managed to compile and install the MDBT42Q image using the BlackMagic probe, since the MDBT isn't available in the US, except on a breakout board

  • in Projects
    Avatar for rmd6502

    Testing the QDSP-6064...

    const cathodes = [D24,D23,D27];
    const anodes = [D28,D29,D30,D31,D1,D2,D11];
    
    var k = 2;
    var pattern = 1;
    var count = 0;
    const maxa = (1 << anodes.length) - 1;
    setInterval(() => {
      "compiled";
      for (var a in anodes) {
        digitalWrite(anodes[a], 0);
      }
      digitalWrite(cathodes[k++], 1);
      if (k >= cathodes.length) {
        k = 0;
      }
      digitalWrite(cathodes[k], 0);
      if (count ++ == 20) {
        count = 0;
        pattern++;
        if (pattern + k > maxa) {
          pattern = 1;
        }
        console.log(pattern);
      }
      for (a in anodes) {
        digitalWrite(anodes[a], ((pattern + k) & (1 << a)) ? 1 : 0);
      }
    }, 1);
    
    
  • in Projects
    Avatar for rmd6502

    I forgot about shiftout, tbh - the only tricky bit is that shiftout is lsb-first, the display wants msb-first.

  • in Projects
    Avatar for rmd6502

    Pull request created for my customizations to the SPI drivers

  • in Projects
    Avatar for rmd6502

    Here's the driver and the example: git@github.com:rmd6502/Espruino_SSD1320.­git

Actions