CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

9 BIT spi

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Thorsten
Guest







9 BIT spi
PostPosted: Fri Apr 21, 2006 4:55 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Apr 21, 2006 8:25 am     Reply with quote

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







PostPosted: Fri Apr 21, 2006 8:32 am     Reply with quote

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







PostPosted: Fri Apr 21, 2006 9:01 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Apr 21, 2006 10:36 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Apr 21, 2006 10:38 am     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Sat Apr 22, 2006 6:37 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Apr 22, 2006 11:38 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group