In void setup,
427. void setup()
428.{
429. DDRD |= B01111100; // Set SPI pins as output
430. PORTD |= B01111100; // Set SPI pins HIGH
431. lcd_init();
432. delay(500);
433. lcd_clear(BLACK,0,0,131,131);
434. pinMode(1,OUTPUT);
435. pinMode(3,OUTPUT);
436. digitalWrite(1,LOW);
437. digitalWrite(3,HIGH);
438. }
One usually uses pinMode to declare pins as inputs or outputs.
You have nothing here for these pins, which may only mean I don't know much about cryptic C code. One of the reasonsI like the Arduino IDE, much easier to follow.
#define CSÂ Â 9
#define CLKÂ 8
#define SDAÂ 10
#define RESET 7
Somehow the signals are tied in here also
#define CS0 cbi(PORTD,CS);
#define CS1 sbi(PORTD,CS);
#define CLK0 cbi(PORTD,CLK);
#define CLK1 sbi(PORTD,CLK);
#define SDA0 cbi(PORTD,SDA);
#define SDA1 sbi(PORTD,SDA);
#define RESET0 cbi(PORTD,RESET);
#define RESET1 sbi(PORTD,RESET);
#define BL0 cbi(PORTD,BL);
#define BL1 sbi(PORTD,BL);
So maybe thats the clue:
on Arduino Duemilenova it was working as:
#define CS 4
#define CLK 5
#define SDA 6
#define RESET 7
4-5-6-7 are all PortD pins
on Pro Mini it is not working (just powers up backlight) as :
#define CS 9
#define CLK 8
#define SDA 10
#define RESET 7
and 8-9-1 are PortB pins.