View previous topic :: View next topic |
Author |
Message |
Thorsten Guest
|
9 BIT spi |
Posted: Fri Apr 21, 2006 4:55 am |
|
|
Hi,
does anyone know if it possible to send 9Bit over SPI at one time?
I have a nokia display which requires a 9Bit SPI mode.
Please help me :-)
Thanks
Thorsten |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Fri Apr 21, 2006 8:25 am |
|
|
With SPI protocol it is possible only to send 8 bits at a time (1 byte), to send 9 bits you will need 2 frames.
As long as I know, all SPI protocol is arranged around 8 bit format.
Could you address us a link to see the Nokia spec regarding 9 bits ?
Humberto |
|
|
Ttelmah Guest
|
|
Posted: Fri Apr 21, 2006 8:32 am |
|
|
You just manually clock the data yourself.
It is a sort of 'half SPI' (single directional transfer only).
There have been some routines published here in the past, and a search oug to find them. There are two different controller chips used, and quite a few programming differences.
Best Wishes |
|
|
Thorsten Guest
|
|
Posted: Fri Apr 21, 2006 9:01 am |
|
|
Hi,
the chip is an Epson controller. The code exampels here i found already, but i want to modify them to use the hardware spi. The Epson controller requires a
9 Bit protocol. The first bit will say which type of data you send ( data or command ). Now it looks like it will not possible to use the hardware spi :-( |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Fri Apr 21, 2006 10:36 am |
|
|
Quote: |
The Epson controller requires a 9 Bit protocol.
|
Pls could you point us a link to see the Epson controller datasheet ?
Humberto |
|
|
amcfall
Joined: 20 Oct 2005 Posts: 44
|
|
Posted: Fri Apr 21, 2006 10:38 am |
|
|
Humberto wrote: | Quote: |
The Epson controller requires a 9 Bit protocol.
|
Pls could you point us a link to see the Epson controller datasheet ?
Humberto |
Here's tyhe one I used
http://www.hantronix.com/down/S1D15G00_REV1_0.pdf
Avery |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Sat Apr 22, 2006 6:37 am |
|
|
Read the datasheet again especially section 8.1.3. It says that data can be entered either 8 or 9 bit. For 8 bit, another pin is required to tell whether it is command or data.
You might be able to still use the hardware SPI with 9 bits. Keep the CS low and clock in 16 bits of data and then pulse the CS line. I believe that the chip will only look at the last 9 bits of data so the first byte would be either command or data (0 or 1) and the 2nd the actual 8 bits of data.[/quote] |
|
|
amcfall
Joined: 20 Oct 2005 Posts: 44
|
|
Posted: Sat Apr 22, 2006 11:38 am |
|
|
Mark wrote: | Read the datasheet again especially section 8.1.3. It says that data can be entered either 8 or 9 bit. For 8 bit, another pin is required to tell whether it is command or data.
You might be able to still use the hardware SPI with 9 bits. Keep the CS low and clock in 16 bits of data and then pulse the CS line. I believe that the chip will only look at the last 9 bits of data so the first byte would be either command or data (0 or 1) and the 2nd the actual 8 bits of data. | [/quote]
If he's using the same style I have the extra pin is not brought out so you have to use the 9 bit mode. So it's not really the controller that requires it (IIRC that chip can support a few interfaces) but the particular panel implementation. I just bit banged the interface, but I do like the idea of trying to use the existing SPI hardware.....
Avery |
|
|
|