я запускал дисплей от сименса м55 с жёлтым шлейфом, там S1D15G14 - похоже, да?
так вот основная грабля была с контрастностью - долго понять не мог работает оно или нет. поэтому в инициализацию надо добавить установку контрастности.
и ещё убрать инициализацию из цикла, иначе ничего вы не увидите даже если она и прокатывает
что то в таком духе:
Код
...
#define OSCON 0xD1
...
CS0
SDA0
CLK1
RESET1
delay_ms(10);
RESET0
delay_ms(10);
RESET1
CLK1
SDA1
CLK1
//Software Reset
sendCMD(SWRESET);
delay_ms(10);
//Oscillation ON
sendCMD(OSCON);
//Sleep Out
sendCMD(SLEEPOUT);
//Electronic Volume control
sendCMD(VOLCTR);
...
while (1)
{
// Place your code here
}
это для примера, щас лень писать всё полностью, как надо
З.Ы. тока щас заметил. у мя в
шите на S1D15G10 опкоды то другие, можно ваш даташит глянуть?
кстати вот отрывок того что нужно делать в инициализации:
Цитата
12.1.1 When Power is Turned On
Input power (VDDI, VDD).
Be sure to apply POWER-ON RESET (RES = LOW)
<Display Setting>
Display control (DISCTL)
Setting clock dividing ratio and F1/F2 drive selection
Duty setting:
Setting reverse rotation number of line:
Common scan direction (COMSCN)
Setting scan direction:
Temperature Gradient Setting (TMPGRD)
Oscillation ON (OSCON)
Sleep-out (SLIPOUT)
<Power Supply Setting>
Electronic volume control (VOLCTR)
Setting volume value α :
Setting built-in resistance value :
Power control (PWRCTR)
Setting operation of power supply circuit:
<Display Setting 2>
Normal rotation of display (DISNOR)/Inversion of display (DISINV)
Partial-in (PTLIN)/Partial-out (PTLOUT)
Setting fix area:
Area scroll set (ASSET)
Setting area scroll region:
Setting area scroll type:
Scroll start set (SCSTART)
Setting scroll start address:
<Display Setting 3>
Data control (DATCTL)
Setting normal rotation/inversion of page address:
Setting normal rotation/inversion of column address:
Setting direction of address scanner:
Setting RGB arrangement:
Setting gradation:
256-color position set (RGBSET8)
Setting color position at 256-color
<RAM Setting>
Page address set (PASET)
Setting start page address:
Setting end page address:
Column address set (CASET)
Setting start column address:
Setting end column address:
<RAM Write>
Memory write command (RAMWR)
Writing displayed data : Repeat as many as the number needed
and exit by entering other command.
<Waiting (approximately 100ms)>
Wait until the power supply voltage has stabilized.
Enter the power supply control command first, then wait at least
100ms before entering the display ON command when the built-in
power supply circuit operates.
If you do not wait, an unwanted display may appear on the
liquid crystal panel.
Display ON (DISON):