Discussion in "Project Help" started by    Amit Kumar Das    Jun 29, 2015.
Mon Jun 29 2015, 11:33 pm
#1
Suppose the ILI9320 TFT LSB & MSB pins are connected to Port B & Port C respectively. In that case the code will be :-

GPIOB->ODR=((GPIOB->ODR&0x00ff)|(data<<8));
GPIOC->ODR=((GPIOC->ODR&0xff00)|(data>>8));

Suppose in case of different connection like :-

PD14 - DB0, PD15 - DB1, PD0 - DB2, PD1 - DB3, PE7 - DB4, PE8 - DB5,
PE9 - DB6, PE10 - DB7, PE11 - DB8, PE12 - DB9, PE13 - DB10, PE14 - DB11,
PE15 - DB12, PD8 - DB13, PD9 - DB14, PD10 - DB15

In such case how the above coded statements has to be modified ?


[ Edited Mon Jun 29 2015, 11:35 pm ]
Mon Jul 13 2015, 03:23 pm
#2
There is no right to way to handle such hardware interfacing. You need to write your own glue logic to handle data bits and fit them in right place on the port pins. Best way could be to map data bit vs pin position array and run a loop on the data bit. so even if there is change in the design you just need to update the pin<->data mapping.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

scaneraNom
Sat May 04 2024, 02:21 am
gtaletrzua
Fri May 03 2024, 10:55 am
Clydehet
Wed May 01 2024, 06:44 pm
Davidoried
Wed May 01 2024, 06:11 pm
KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am