View previous topic :: View next topic |
Author |
Message |
micro2 Guest
|
|
|
micro2 Guest
|
|
Posted: Wed Jan 18, 2006 1:54 pm |
|
|
no help?
in practice it would be necessary to drive the KS0073 in SPI mode, my approach is as in the datasheet but I am not able to show no character..... |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Jan 18, 2006 2:02 pm |
|
|
The data sheet is completely minimal. There is no timing
information shown for the SPI interface. The company
must provide more information, in order to write a driver.
Search their website or contact them.
http://www.lcd-module.de/deu/dbl/dbl.htm#Software |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Wed Jan 18, 2006 2:09 pm |
|
|
PCM, inside the link is a link towards the bottom, which points to the samsung chip that is used. Timing is included.
((but I don't want to end up writting another LCD driver )) |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Wed Jan 18, 2006 3:46 pm |
|
|
Quote: |
in practice it would be necessary to drive the KS0073 in SPI mode, my approach is as in the datasheet but I am not able to show no character.....
|
Pls could you post the code you had been trying ?
Humberto |
|
|
Guest
|
|
|
micro2 Guest
|
|
Posted: Sat Jan 21, 2006 2:25 am |
|
|
|
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Sat Jan 21, 2006 8:06 am |
|
|
Quote: |
How i can use in SPI mode the LCD EADIP204-6?
|
To use it in serial mode, the IM (Interface Mode) port pin should be set to Low at power up.
The KS0073 is initialized automatically, while doing so, it keep High the BF (Busy Flag) pin.
I don't see this caution in your code before to start sending any command.
It needs at least 20ms after power up.
Humberto |
|
|
micro2 Guest
|
|
Posted: Sat Jan 21, 2006 8:18 am |
|
|
I have soldering correctly the pad for SPI mode, so the problem is not this.
you say to check Busy flag with SPI_read()?
let me a example.
Thanks |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Sat Jan 21, 2006 8:31 am |
|
|
Quote: |
you say to check Busy flag with SPI_read()?
|
I didn't say to do it with SPI. I mean that if you do not test this bit, at least
you should give the KS0073 enough time to end its power up.
Humberto |
|
|
micro2 Guest
|
|
Posted: Tue Jan 24, 2006 6:36 am |
|
|
looking at the Datasheet of the Ks0073, one sees that the first bit transmitted is the LSB.........the problem will certainly be this.
what the Interrupts are of the SSP (in SPI mode)?
Bye |
|
|
micro2 Guest
|
|
Posted: Tue Jan 24, 2006 6:37 am |
|
|
looking at the Datasheet of the Ks0073, one sees that the first bit transmitted is the LSB.........the problem will certainly be this.
what the Interrupts are of the SSP (in SPI mode)?
Bye |
|
|
micro2 Guest
|
|
Posted: Sun Jan 29, 2006 1:05 pm |
|
|
Ok, now it works, but there is a problem in reading ....
in spi_read() the SCK (PIN_C3) is inactive, why?
PIC works in this mode: (SPI_MASTER|SPI_H_TO_L|SPI_CLK_DIV_16)
Bye |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Jan 29, 2006 1:47 pm |
|
|
Quote: | but there is a problem in reading ....
in spi_read() the SCK (PIN_C3) is inactive |
Read the CCS manual in the section on spi_read(). It says:
If a value is passed to SPI_READ the data (ie., the value) will be
clocked out and the data received will be returned. If there is no
data to send just do a SPI_READ(0) to get the clock.
CCS manual:
http://www.ccsinfo.com/ccscmanual.zip
Also the CCS example file, 9356spi.c, shows an example.
It's in this folder: c:\Program Files\Picc\Examples |
|
|
Ttelmah Guest
|
|
Posted: Sun Jan 29, 2006 3:39 pm |
|
|
It is perhaps worth 'adding' the PCM Programmers comments, to explain 'wy' the command begaes as it does.
SPI is a two directional bus. Data is sent both ways at the same time, and you cannot actually perform a standalone 'read' without sending a byte, even if it is a 'dummy'. Whenever you do an SPI_WRITE, a byte is simultaneously received, and if you call 'SPI_READ', without a value to send, it simply returns the byte that was read in the last transfer. So if you go:
SPI_WRITE(val);
result=SPI_READ();
Clocks are generated for the 'write', and the byte transfered during this write, is then returned by the read, with no clocks generated.
SPI_READ, also contains a 'shortcut' to this,and if you perform:
result=SPI_READ(val);
It performs the same operation, as the two seperate instructions, in one command.
Best Wishes |
|
|
|