0

LED Matrix, Power ON = No Display, HUB08 interface
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

LED Matrix, Power ON = No Display, HUB08 interface

by tedfinch on Wed Jul 28, 2021 5:15 pm

I have written a display driver for HUB08 LEDmatrix displays using Itsy Bitsy M0 and QT PY M0 boards.

I recently got some new LEDMatrix boards described as HUB08 and have a rather odd problem.

The 64 x 16 display will work ( sort of ) when connected to the Itsy Bitsy M0, with the power to the display board OFF there is a feint display. The display seems to use the voltage from the data lines. If I turn power to the display board ON the display goes blank and when I turn the power OFF I get the feint display shows again. The parasitic voltage is about 1.67V

The IB M0 and display are fed from the same source - LiPo battery @ 5.1V and have a common ground.

To get the display to this stage I had to tweak ( i.e. trial and error adjustments) the 'Scan One Row' by adding a delay to the Clock signal.

The same hardware set up, with different display boards, works as expected. I have used other boards with 16 8x8 matrix modules and a 64 x 16 SMD LED board. These boards have been OK with the IB M0 signal levels - I have not tried a level convertor on the new board.

I would welcome advice on what to try next?
Thanks
Ted Finch

The Scan One Row called by an Interval Timer ISR:
Code: Select all | TOGGLE FULL SIZE

/**************************************************************************/
/*!
ScanOneRow - written for Arduino MO processor on Adafruit board
Bit bang data line, clock line and latch line
*/
/**************************************************************************/


void LEDMatrix::scanOneRow()
//process one row - shift out bits from one row in buffer
{
   static uint8_t row = 0;//initial value of 0
   //if row is 0 do buffer swap if double buffering required
   int rowstart ;
   uint8_t pixelsbyte;
   uint16_t clk_time = 4;  // pause on data clock high and low  in usecs, 4 gives best result on parasitic voltage
   //set row address
   if (!state) { return; }
   if (row == 0) {      
      if(swapflag == true) {
      // Switch buffer indices so the alternate buffer is written/read
      buffer_being_read = 1 - buffer_being_read;
      displaybuff = dbuffers[ buffer_being_read];
      writebuff =  dbuffers[BUFFER_TO_FILL];
      swapflag  = false;
      }
   }

   digitalWrite_fast(en, HIGH); //disable display - can control with PWM   
   rowstart = row * 8; //step through rows each has 8 bytes
   //send data   
   for (int8_t rowbyte = 7; rowbyte >= 0; rowbyte--) { //8 bytes from this row IN reverse
      pixelsbyte = ( displaybuff[rowstart + rowbyte]) ^ mask ;      
      for (int8_t bit = 7; bit >=0  ; bit--) { // 8 bits for this byte start at high bit         
         digitalWrite_fast(clk, LOW);
         delayMicroseconds(clk_time); // Delay added
         digitalWrite_fast(r1, pixelsbyte & (0x80 >> bit));
         delayMicroseconds(clk_time); // Delay added
         digitalWrite_fast(clk, HIGH);//Clock on Rising Edge
         delayMicroseconds(clk_time); // Delay added
      }//8 BITS      
   }//8 BYTES
   digitalWrite_fast(lch, LOW);   
   //zero latchPin and hold low for a while
   digitalWrite_fast(a, !bitRead(row, 0x00));
   digitalWrite_fast(b, !bitRead(row, 0x01));
   digitalWrite_fast(c, !bitRead(row, 0x02));
   digitalWrite_fast(d, !bitRead(row, 0x03));
   // latch data   
   digitalWrite_fast(lch, HIGH);
   digitalWrite_fast(en, LOW); //enable display
   row = (row + 1) & 0x0F; //next row next time round
}




Sources include: http://www.sunspot.co.uk/Projects/displ ... 16x64.html
Similar Code here: https://github.com/jkairys/HUB08/blob/master/HUB08.cpp

tedfinch
 
Posts: 43
Joined: Thu Apr 26, 2018 10:02 am

Please be positive and constructive with your questions and comments.