However, now I get nothing at all with:
1. Board is a EasyPICFusionv7.
2. MCU is a PIC32MX795F512L.
3. Panels are powered by a separate 5V supply.
4. The Matrix RGB Click is in mikroBUS Socket 1 on the left.
5. The IDC cable is the correct way round - little triangles match up.
6. Code is the example below - from Libstock re-downloaded yesterday.
Demo Code:
Code: Select all
#include "Click_Matrix_RGB_types.h"
#include "Click_Matrix_RGB_config.h"
#include "images.h"
void systemInit()
{
mikrobus_gpioInit( _MIKROBUS1, _MIKROBUS_INT_PIN, _GPIO_INPUT );
mikrobus_gpioInit( _MIKROBUS1, _MIKROBUS_CS_PIN, _GPIO_OUTPUT );
mikrobus_gpioInit( _MIKROBUS1, _MIKROBUS_RST_PIN, _GPIO_OUTPUT );
mikrobus_spiInit( _MIKROBUS1, &_MATRIXRGB_SPI_CFG[0] );
Delay_ms( 100 );
}
void applicationInit()
{
matrixrgb_spiDriverInit( (T_MATRIXRGB_P)&_MIKROBUS1_GPIO, (T_MATRIXRGB_P)&_MIKROBUS1_SPI );
matrixrgb_deviceReset();
matrixrgb_deviceInit( _MATRIXRGB_PATTERN_1_MAP_5MM );
matrixrgb_setPower( 1 );
Delay_ms( 1000 );
// matrixrgb_setFont( &Arial9x9[0], 0xFFFF, _MATRIXRGB_FONT_HORIZONTAL );
matrixrgb_fillScreen( 0xFFFF );
Delay_ms( 1000 );
}
void applicationTask()
{
uint16_t test;
// Brightness Test
for (test = 5; test < 50; test++)
{
matrixrgb_setBrightness( test );
Delay_ms( 50 );
}
for (test = 50; test > 5; test--)
{
matrixrgb_setBrightness( test );
Delay_ms( 50 );
}
// Pixel Write Test
matrixrgb_fillScreen( 0x0000 );
for (test = 0; test < 32; test++)
{
matrixrgb_writePixel( test, test, 0xF100 );
Delay_ms( 100 );
}
for (test = 32; test > 0; test--)
{
matrixrgb_writePixel( 31 - test, test, 0xF100 );
Delay_ms( 100 );
}
// Text Write Ttest
// matrixrgb_fillScreen( 0x0000 );
// matrixrgb_writeText( "RGB", 6, 5 );
// matrixrgb_writeText( "Demo", 4, 20 );
// Delay_ms( 2000 );
// Image Test
matrixrgb_drawImage( &mikroe_logo_32x32_bmp[0] );
Delay_ms( 1000 );
}
void main()
{
systemInit();
applicationInit();
while (1)
{
applicationTask();
}
}
I have two Matrix RGB Clicks and neither produce anything.
My panel layout is 2X2 6mm so I have also tried the attribute: matrixrgb_deviceInit( _MATRIXRGB_PATTERN_4S_MAP_6MM );
I presume this is the correct one?
Any advice please to get me some working panels?
What is the format of the SPI sent to the Click Board - If I knew this I could do my own code without the Libstock 'special' functions.
I have just reloaded some 'old' code ( seems the functions have changed a bit in the new Libstock?) and the Matrix RGB Click work OK with this old code
but nothing works when I use the latest download - shown above.
Regards Bill Legge in Australia