1.54 E-INK click board on STM32F103C8 aka Blue Pill

General discussion on mikroC PRO for ARM.
Post Reply
Author
Message
dogi
Posts: 4
Joined: 07 Oct 2019 07:32

1.54 E-INK click board on STM32F103C8 aka Blue Pill

#1 Post by dogi » 30 Oct 2022 19:12

Hello everyone.

Can somebody please explain how to correctly configure the MIKROE e-ink154 library for the 1.54 inch display so it can be used on a standalone STM32F103C8? I'd like to use the SPI2 on the micro.

I read the help file but just don't understand quite well how to configure the INT, CS, RST and PWM GPIO pins to be used with this lib. Setting correctly the eink154_spiDriverInit () command and eink154_startConfig() command.

I'm looking at the provided example code from libstock, but it is written to be used on a MIKROE development board, using the MIKROBUS. In the example it's configured like this.

void systemInit()
{
mikrobus_gpioInit( _MIKROBUS1, _MIKROBUS_INT_PIN, _GPIO_INPUT );
mikrobus_gpioInit( _MIKROBUS1, _MIKROBUS_RST_PIN, _GPIO_OUTPUT );
mikrobus_gpioInit( _MIKROBUS1, _MIKROBUS_CS_PIN, _GPIO_OUTPUT );
mikrobus_gpioInit( _MIKROBUS1, _MIKROBUS_PWM_PIN, _GPIO_OUTPUT );
mikrobus_spiInit( _MIKROBUS1, &_EINK154_SPI_CFG[0] );
Delay_ms( 100 );
}
void applicationInit()
{
eink154_spiDriverInit( (T_EINK154_P)&_MIKROBUS1_GPIO, (T_EINK154_P)&_MIKROBUS1_SPI );
eink154_startConfig( _EINK154_COMMUNICATION_SPI );
eink154_setLut(&_EINK154_LUT_TABLE[0], 30);
.
.
. }

Thank you.

Post Reply

Return to “mikroC PRO for ARM General”