Hi, i got lcd with uc1608 driver.
I wanna connect screen via SPI, i have start code but is for bascom.
Can someone please help me ?
link toLCD http://artronic.pl/o_produkcie.php?id=1069?
void swap_bits(x){
PORTC_Bit7 = x; x=x>>1;
PORTC_Bit6 = x; x=x>>1;
PORTC_Bit5 = x; x=x>>1;
PORTC_Bit4 = x; x=x>>1;
PORTC_Bit3 = x; x=x>>1;
PORTC_Bit2 = x; x=x>>1;
PORTC_Bit1 = x; x=x>>1;
PORTC_Bit0 = x; x=x>>1;
}void strobe()
{
CD = 0; // command
Read_wright_WR0 = 0;__delay_cycles(10); // wright
enable_WR1 = 1;__delay_cycles(10); // strobe
}int main( void ){
DDRE=0xe0;DDRA=0xFF;DDRC=0xFF;
__delay_cycles(1000000);
BM1=1; BM0=1; // interfejs 6800 8bit
swap_bits( 0x26); // SET MR TC
strobe();swap_bits( 0x3d); // set LCD mapping
strobe();swap_bits(0xec); // set bias ratio
strobe();swap_bits( 0x81); // set gain & potentiometer I bajt
strobe();swap_bits( 0x72); // set gain & potentiometer II bajt
strobe();swap_bits( 0x40); // start line number
strobe();swap_bits( 0xaf); // display enable
strobe();swap_bits( 0xa5); // all pixels ON
strobe();