View previous topic :: View next topic |
Author |
Message |
hoss
Joined: 12 Oct 2006 Posts: 9
|
Need driver for OSD2401 GLCD (PLED) |
Posted: Thu Oct 12, 2006 7:43 am |
|
|
Hi, I need a driver for above device.
the blurb says it uses the common interface 'of S6B0107 and S6B0108 devices'
but this doesnt look like the same interface as KS0108
(the pin out as below)
Anyone have a driver?
TIA hoss
VCOL 1 I Power supply of PLED column buffer
VROW 2 I Power supply of PLED row buffer
Gnd_Power 3 - Analog ground
VDD 4 I Logic supply voltage
VREF 5 I Reference voltage
Gnd_Logic 6 - Logic ground
Load 7 I Data loading command
Load=�1� : System loads 8 bits parallel data
Load=�0� : System is busy; system operates
Reserved 8 I Reserved pin
nReset 9 I
Negative reset function
nReset=�1� : System operates (default)
nReset=�0� : System reset; power up and delay for a while
Busy 10 O Loading busy flag
Busy=�1� : System is busy; System can�t accept command
Busy=�0�: System idles; System can accept command
DB0~DB7 11~18 I Parallel 8 bits data bus
NC 19~20 - No connection |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Oct 12, 2006 12:58 pm |
|
|
Quote: | but this doesnt look like the same interface as KS0108 |
It's not exactly the same, but it's similar.
You could create your own driver. Start with the CCS driver, KS0108.c,
which is located here: c:\program files\picc\drivers\ks0108.c
Make a copy of the file, and rename it to OSD2401.C. Then you can
modify this new file into your driver.
Compare the pins used by the KS0108.c driver to the OSD2401 data
sheet, and also to the KS0108 data sheet.
http://www.onestopdisplays.net/Files/full/OSD2401-03%20Spec.pdf
http://www.eio.com/ks0108b.pdf
Notice that the KS0108.c driver gets the Busy status from the KS0108
by reading a byte from the chip. The busy status is in bit 7 of this byte.
But the OSD2401 doesn't do it this way. Instead, it has the Busy status
on a individual pin. You can read the busy status with the CCS input()
function.
Here's the existing KS0108.C busy status function. Notice that the busy
status is returned in bit 7 and all other bits are 0 for normal operation.
Code: |
// Purpose: Read the status register
// 7: 0 - Ready 1 - Busy
// 6: 0
// 5: 0 - On 1 - Off
// 4: 0 - Normal 1 - Reset
// 3-0: 0
int8 KS0108_status()
{
KS0108_inst(); // Set for instruction
return KS0108_read(); // Read and return the status
} |
You can modify it for the ODS2401, but keep the same software
interface, as follows. Read the Busy pin, and if it's high, then set bit 7
in the returned byte. Otherwise, return bit 7 as 0. All other bits = 0.
Code: |
int8 KS0108_status(void)
{
int8 retval;
if(input(OSD2401_BUSY))
retval = 0x80;
else
retval = 0;
return(retval);
}
|
Also notice that the OSD2401 doesn't have a R/W pin. So you could
go through the KS0108.c driver and comment out all the lines that
use the RW pin. Example:
Code: |
// #define KS0108_RW PIN_B4
// output_low(KS0108_RW);
|
There might be other changes that you need to make. I don't want
to make the driver for you. You must do it. But I've shown you how
to get started. |
|
|
hoss
Joined: 12 Oct 2006 Posts: 9
|
|
Posted: Fri Oct 13, 2006 8:02 am |
|
|
PCM-P - thanks for you lengthy reply.
However, i discovered that the data ihad for the display was wrong.
In fact it is the KS0108, and i am now using the included driver sucessfully.
sorry to waste your time |
|
|
|