Aug 21, 2018

P10 Module x2 Running Text (STM32F103C8T6)

Interested to build a running text display made of two P10 modules?


The text looks shaky on video but actually not, recording quality effect I guess.

 What you need:
- 2 pcs P10 LED modules
- ribbon cable
- few jumper wires
- 5VDC 5A power supply
- STM31F103C8T6 blue pill module
- ST-Link V2



There are four wires connecting ST-Link V2 to STM32F103C8T6 module (for programming only):
- 3.3V to 3.3V
- SWCLK to DCLK
- SWDIO to DIO
- GND to GND

There are seven wires connecting STM32F103C8T6 module to first P10 module:
- PA0 to EN
- PA1 to SCLK
- PA2 to A
- PA3 to B
- PA5 to CLK
- PA7 to R
- GND to GND

Ribbon cable connects 1st module to 2nd module.
Power supply cables are a pair of 0.75-1.5 mmsq cable so it can handle 5A max. Power cable for STM32F103C8T6 module can be smaller mmsq as it draws few mA only.

The C code is prepared for CooCox IDE and GNU Tools ARM Embedded compiler.
Display scan is done by timer interrupt.
void TIM1_UP_IRQHandler ()
{
    if ((TIM1->SR & 0x0001) != 0)                  // check interrupt source
    {
        GPIO_ResetBits(GPIOA, OutEna); //IOCLR0 = OutEna;
        for (spi_count=0; spi_count<4; spi_count++) SPI0SendByte (~(((uchar *) &displaymemory[spi_count*4+rowscan])[7]));
        for (spi_count=0; spi_count<4; spi_count++) SPI0SendByte (~(((uchar *) &displaymemory[spi_count*4+rowscan])[6]));
        for (spi_count=0; spi_count<4; spi_count++) SPI0SendByte (~(((uchar *) &displaymemory[spi_count*4+rowscan])[5]));
        for (spi_count=0; spi_count<4; spi_count++) SPI0SendByte (~(((uchar *) &displaymemory[spi_count*4+rowscan])[4]));

Main function displays shifting left text in three different size font.
int main(void)
{
    SetSysClockTo72();
    mcu_init();
    shift_delay = 50;

    while (1)

    {
        LED_puts_font8x16("Font8x16        ");
        LED_puts_font8x8 ("Font8x8        ",0);
        LED_puts ("Font 5x8           ", 0);
    }
}


You can buy the code here. After payment, the code will be sent to your email.
You can contact me on silvester.dao(a)gmail.com or +62 813 7171 25 twoseven.



No comments:

Post a Comment

P10 Module x2 Running Text (STM32F103C8T6)

Interested to build a running text display made of two P10 modules? The text looks shaky on video but actually not, recording quality ...