2018-04-12 04:40 AM
Hi everyone,
I try to find a driver for control a graphic LCD withT6963C or SAP1024B controller.
I find some Arduino project but nothing with STM
If someone can help me !
Thank ,
Anaelle
I use this LCD : MC240064A6W-FPTLW-V2
With STM32F4 discovery board.
#lcd-driver #stm32f4-discovery #t6963 #sap1024b #graphic-lcd Note: this post was migrated and contained many threaded conversations, some content may be missing.2018-04-12 02:53 PM
Not STM32-specific, but these
http://en.radzio.dxp.pl/t6963/
http://en.radzio.dxp.pl/t6963/arm/at91.htm
are very cleanly written - the 'graphic' part is not mcu-specific, and in the 't6963c' part, the mcu-specific routines are all located at the top, and they are relatively easy to follow - they implement the variants of write command/write data/read data/read status.JW
2018-04-13 03:47 AM
Hi ,
Thank you,
It's helpfull
I have one problem with traduction atmel lib to stm32 lib :
__inline void outByte(unsigned char byte) { AT91F_PIO_CfgOutput(AT91C_BASE_PIOA,(0xFF << T6963_D0)); AT91F_PIO_ForceOutput(AT91C_BASE_PIOA, (unsigned int)(byte << T6963_D0)); } __inline unsigned char inByte(void) { AT91F_PIO_CfgInput(AT91C_BASE_PIOA,(0xFF << T6963_D0)); return ((AT91F_PIO_GetInput(AT91C_BASE_PIOA) >> T6963_D0) & 0xFF); }
I don't know how to put this in stm32 'mode'. I try this but it's doesn't work ...__inline void outByte(unsigned char byte)
{HAL_GPIO_WritePin(GPIOE,CE_LCD_Pin, (unsigned int)(byte<< T6963_D0));//AT91F_PIO_ForceOutput(GPIOE, (unsigned int)(byte << T6963_D0));}__inline unsigned char inByte(void)
{return ((HAL_GPIO_ReadPin(GPIOE, GPIO_PIN_7) >> T6963_D0) & 0xFF);}Thank for your help !
2018-04-13 06:32 AM
What's your hardware connection?
JW
2018-04-13 06:42 AM
This is the discovery board stm32F411 .
2018-04-14 01:39 AM
OK but how did you connect the display to that board?
JW
2018-04-16 01:39 AM
Hi , Sorry , i forgot the pin-map !
As you can see , on the left , there is all LCD connection.
2018-04-17 03:22 AM
So you have them in a proper order on a single port. That makes things easier.
As the bus is bi-directional, you have to change the direction of the pins between GPIO Input and GPIO Output, according to whether you are going input or output data. This is done by setting the respective bits in GPIOE_MODER - for each pin, Input is when the respective two bits are set to 0b00, and Output is when they are set to 0b01; so
GPIOE->MODER &= ~(0b0101010101010101 << 7);
GPIOE->MODER |= (0b0101010101010101 << 7);
The data output is best to be done through the BSRR register. You take your input byte, and then set (by writing 1 to the lower 16-bits of BSRR) those bits in it which are 1; and clear (by writing 1 to the upper 16-bits of BSRR) those bits which are 0; so it's something like:
GPIOE->BSRR = (byte << 7) + (((~byte & 0xFF) << 7) << 16);
I don't know the Cube incantations for these, I don't Cube.
JW
2018-04-19 08:01 AM
Thank JW for your help, i understand a little bit
I try to use your method into my code but i have one problem when i want to recover the values of my data.
The method that i use doesn't works ..
I attach my code :
My problem is in LCD.c
When i use thisGPIOE =command;
Thank for your help
Anaelle
________________ Attachments : graphic.c.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxg6&d=%2Fa%2F0X0000000b0p%2FWemxdC9m8oOT2N_VWrRape2xRVrofPGpnFDaUYL9qDA&asPdf=falsegraphic.h.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxfm&d=%2Fa%2F0X0000000b0r%2FE6i6HhXvGtTOInj6DCiJ_Rcuqam.b_cHCEslVl8wlYg&asPdf=falseLCD.c.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxXS&d=%2Fa%2F0X0000000b0w%2FcNbGPc3YAq_anoyRfsTvGRKJAIdxEpKkLG1qYHoyOR8&asPdf=falseLCD.h.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxg1&d=%2Fa%2F0X0000000b0o%2FG2gQ5gzeK6BjIY773O6_REy2ktkeWh5huKcr3inYRdo&asPdf=falsemain.c.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxgG&d=%2Fa%2F0X0000000b0s%2FnppmOMztDhe2B66W_O8BtIsepjF3XkdepD2Sqb4mdbE&asPdf=falsemain.h.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxfr&d=%2Fa%2F0X0000000b0q%2FZh_8BpCdL5Qr_.T8ZbQeEy6npehtrwHSsVSsqi14BhQ&asPdf=false