void Gpg_Master(unsigned int Data)
{unsigned int temp = 0b1000000000000000;Master_SCK=1;ENABLE_244QS1();//初始化前使能片选_delay(10);DISABLE_244QS1();Master_SCK=0; //Generate SCK Clockdo{Master_SDI = Data &temp;Master_SCK=1; _delay(10); Master_SCK=0; //Generate SCK Clocktemp>>=1; }while(temp!=0);Master_SCK=1; //Generate SCK ClockENABLE_244QS1();//初始化前使能片选 _delay(10);
}
void SPIWRITE_ADDRSSDATA(unsigned short address,unsigned short data)
{unsigned int Data;Data = address;Data = ( Data<<8 ) + data ;Gpg_Master(Data);_delay(100);//Master(address);//_delay(10);//Master(data);//_delay(10);}
如题:
void Gpg_Master(unsigned int Data)
{unsigned int temp = 0b1000000000000000;Master_SCK=1;ENABLE_244QS1();//初始化前使能片选_delay(10);DISABLE_244QS1();Master_SCK=0; //Generate SCK Clockdo{Master_SDI = Data &temp;Master_SCK=1; _delay(10); Master_SCK=0; //Generate SCK Clocktemp>>=1; }while(temp!=0);Master_SCK=1; //Generate SCK ClockENABLE_244QS1();//初始化前使能片选 _delay(10);
}
void SPIWRITE_ADDRSSDATA(unsigned short address,unsigned short data)
{unsigned int Data;Data = address;Data = ( Data<<8 ) + data ;Gpg_Master(Data);_delay(100);//Master(address);//_delay(10);//Master(data);//_delay(10);}
从TVP5150输出的8bit 4:2:2信号接入TFT屏没有显示、这是个让我十分费解的难题、SPI总线的写时序我照着写了程序,没有什么特别的地方、很简单、一次写入十六位数据、
可是好像我写入的寄存器跟没写入的寄存器是一样的、上电后屏是白色的、就亮了背光而已、其他好像什么都没有显示?????