Epson Research and Development

Page 55

Vancouver Design Center

 

 

 

seGetId(Device, &ChipId);

if (ChipId != ID_S1D13504F00A)

{

printf("ERROR: Did not detect S1D13504.\n"); exit(1);

}

if (seSetInit(Device) != ERR_OK)

{

printf("ERROR: Could not initialize device.\n"); exit(1);

}

/***************************************************************************

*Fill 2M bytes of memory with 0xffffffff (white)

*Note that 0x200000 == 2 M bytes. Divide by 4 for number of Dwords to fill

***************************************************************************/

seWriteDisplayDwords(Device, 0, 0xffffffff, 0x200000/4);

exit(0);

}

9.1.2 Sample code without using 13504HAL API

/*

**===========================================================================

**INIT13504.C - sample code demonstrating the initialization of the S1D13504.

**

Beta release 2.0 98-10-22

**

 

**The code in this example will perform initialization to the following

**specification:

**

**- 320 x 240 single 8-bit color passive panel.

**- 75 Hz frame rate.

**- 8 BPP (256 colors).

**- 33 MHz input clock.

**- 2 MB of 60 ns FPM memory.

**

 

**

*** This is sample code only! ***

**This means:

**1) Generic C is used. I assume that pointers can access the

**relevant memory addresses (this is not always the case).

**i.e. using the 13504B00B card on an Intel 16 bit platform will require

**changes to use a DOS extender to access memory and registers.

**2) Register setup is done with discreet writes rather than being

**table driven. This allows for clearer commenting. A real program

**would probably store the register settings in an array and loop

Programming Notes and Examples

S1D13504

Issue Date: 01/02/01

X19A-G-002-07

Page 193
Image 193
Epson S1D13504 manual Sample code without using 13504HAL API