Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bageorge@topnotchcanada.c

Pages: [1]
1
TFTs / NHD-2.4-240320SF-CTXI#-FT1
« on: May 11, 2015, 08:36:34 PM »
Question about: NHD-2.4-240320SF-CTXI#-FT1

In what way a 16 bit command/data is mapped onto DB15 - DB0 from the datasheet?




void TFT_24S_Write_DB(uint16_t commanddata){


LATDbits.LATD2 = (0x0001&(commanddata>>15));  //TFT DB15
LATDbits.LATD3 = (0x0001&(commanddata>>14));  //TFT DB14
LATDbits.LATD12 = (0x0001&(commanddata>>13)); //TFT DB13
LATDbits.LATD13 = (0x0001&(commanddata>>12)); //TFT DB12
LATDbits.LATD4 = (0x0001&(commanddata>>11));  //TFT DB11
LATDbits.LATD5 = (0x0001&(commanddata>>10));  //TFT DB10
LATDbits.LATD6 = (0x0001&(commanddata>>9));  //TFT DB9
LATDbits.LATD7 = (0x0001&(commanddata>>8));  //TFT DB8
LATFbits.LATF0 = (0x0001&(commanddata>>7)); //TFT DB7
LATFbits.LATF1 = (0x0001&(commanddata>>6)); //TFT DB6
LATGbits.LATG1 = (0x0001&(commanddata>>5)); //TFT DB5
LATGbits.LATG0 = (0x0001&(commanddata>>4)); //TFT DB4
LATAbits.LATA6 = (0x0001&(commanddata>>3)); //TFT DB3
LATAbits.LATA7 = (0x0001&(commanddata>>2)); //TFT DB2
LATEbits.LATE0 = (0x0001&(commanddata>>1)); //TFT DB1
LATEbits.LATE1 = (0x0001&commanddata); //TFT DB0


/*
 LATDbits.LATD2 = (0x0001&(commanddata>>0));  //TFT DB15
LATDbits.LATD3 =  (0x0001&(commanddata>>1));  //TFT DB14
LATDbits.LATD12 = (0x0001&(commanddata>>2)); //TFT DB13
LATDbits.LATD13 = (0x0001&(commanddata>>3)); //TFT DB12

LATDbits.LATD4 = (0x0001&(commanddata>>4));  //TFT DB11
LATDbits.LATD5 = (0x0001&(commanddata>>5));  //TFT DB10
LATDbits.LATD6 = (0x0001&(commanddata>>6));  //TFT DB9
LATDbits.LATD7 = (0x0001&(commanddata>>7));  //TFT DB8

LATFbits.LATF0 =(0x0001&(commanddata>>8)); //TFT DB7
LATFbits.LATF1 =(0x0001&(commanddata>>9)); //TFT DB6
LATGbits.LATG1 =(0x0001&(commanddata>>10)); //TFT DB5
LATGbits.LATG0 =(0x0001&(commanddata>>11)); //TFT DB4

LATAbits.LATA6 =(0x0001&(commanddata>>12)); //TFT DB3
LATAbits.LATA7 =(0x0001&(commanddata>>13)); //TFT DB2
LATEbits.LATE0 =(0x0001&(commanddata>>14)); //TFT DB1
LATEbits.LATE1 =(0x0001&(commanddata>>15)); //TFT DB0
*/

}

Pages: [1]