From: nono240 at gmail dot com on
Hi all,

I'm using a S1D13700 with my 320x240 display with 1bpp without problems
for weeks.
Now, i'd like to increase the color depth to 2bpp (maximum color depth
@ 320x240).

I experience some difficulties since grayscale mode is not develloped
in the datasheet :

- [FX] should be set to 0b0111
- [C/R] is (PIXEL_WIDTH/8]*BPP = (320/8)*2 = 80


#define X_RES 320
#define Y_RES 240
#define SIZE_OF_SCREEN (X_RES/8)*Y_RES

const char SYSTEM_SET[] = {
0x40, // Command
0x30, // P1 Overlay compensation, contigous CGRAM
0x87, // P2 [FX]=8
0x00, // P3 [FY]=1 (graphic mode)
2*(X_RES>>3)-1, // P4 C/R
84, // P5 TC/R = (Fosc-Y_RES*Frr)/(9*Y_RES*Frr)
Y_RES-1, // P6 L/F
X_RES>>3, // P7 APL
X_RES>>11}; // P8 APH
};

// Useless in grayscale mode ?
const char SCROLL[] = {
0x44, // Command
0x00, // P1 Layer 1 address
0x00, // P2
Y_RES, // P3 # line
SIZE_OF_SCREEN, // P4 Layer 2 address
SIZE_OF_SCREEN>>8, // P5
Y_RES, // P6 # line
SIZE_OF_SCREEN<<1, // P7 Layer 3 address
SIZE_OF_SCREEN>>7, // P8
0, // P9
0}; // P10

The left part of the screen is reproduced to the right !

What's wrong with my parameters ?

 | 
Pages: 1
Prev: Free FAT16 Filesystem
Next: SDCC warning