EA DOGM128-6 Display with SPI
Clemens
Posts: 236
Hi all,
this will be a loooong question, so if you're in a hurry I advise you to ignore this posting.
Thanks to all those who take the time to read it.
I'm stuck with my EA DOGM128-6 Display.
http://www.electronic-assembly.de/eng/dog/dog.htm
I bought it because I like the friendly Triceratops in the adds.
I'm stuck mainly because I don't know if I got the hardware setup right so I don't know if I can even expect to get something on the screen when trying out some code.
I interpreted the datasheet (http://www.electronic-assembly.de/eng/pdf/grafik/dogm128e.pdf) that I have to make the following connections:
Now I must admit that I'm stuck with SPI just the same.
I read a couple of articles (http://en.wikipedia.org/wiki/Spi) but it sais that SPI is two way communication, but the display doesn't have an output.
I also found an SPI Object on the german forum and it is even for another Dogm Display http://propellerforum.sps-welt.de/viewtopic.php?t=26, but I couldn't get it to work when I tried things like·putting these commands in the init section:
I also looked at the SPI example "Assembly Code Examples for the Beginner: SPI Engine Demo"
http://forums.parallax.com/showthread.php?p=601870
but it is also two way communication, right?
So you see I'm totally lost. This may be a too big step for me right now, I now. But if you have any suggestions other than "put that thing in the drawer and don't take it out until someone has written an object for it" I would really appreciate it...
Thanks for reading,·
Clemens
·
this will be a loooong question, so if you're in a hurry I advise you to ignore this posting.
Thanks to all those who take the time to read it.
I'm stuck with my EA DOGM128-6 Display.
http://www.electronic-assembly.de/eng/dog/dog.htm
I bought it because I like the friendly Triceratops in the adds.
I'm stuck mainly because I don't know if I got the hardware setup right so I don't know if I can even expect to get something on the screen when trying out some code.
I interpreted the datasheet (http://www.electronic-assembly.de/eng/pdf/grafik/dogm128e.pdf) that I have to make the following connections:
- SI and CLK to two propeller pins.
- CS to ground (it says Chip select: active low) Is that correct?
- A0 also to ground for command input, which i thought would be enough for testing by initializing the display and setting all pixels to black:
Now I must admit that I'm stuck with SPI just the same.
I read a couple of articles (http://en.wikipedia.org/wiki/Spi) but it sais that SPI is two way communication, but the display doesn't have an output.
I also found an SPI Object on the german forum and it is even for another Dogm Display http://propellerforum.sps-welt.de/viewtopic.php?t=26, but I couldn't get it to work when I tried things like·putting these commands in the init section:
Write_cmd($40) Write_cmd($A1) Write_cmd($C0) Write_cmd($A7) Write_cmd($A2) Write_cmd($2F) Write_cmd($F8) Write_cmd($00) Write_cmd($27) Write_cmd($81) Write_cmd($16) Write_cmd($AC) Write_cmd($00) Write_cmd($AF) Write_cmd(%10100101)
I also looked at the SPI example "Assembly Code Examples for the Beginner: SPI Engine Demo"
http://forums.parallax.com/showthread.php?p=601870
but it is also two way communication, right?
So you see I'm totally lost. This may be a too big step for me right now, I now. But if you have any suggestions other than "put that thing in the drawer and don't take it out until someone has written an object for it" I would really appreciate it...
Thanks for reading,·
Clemens
·
Comments
It needs to be driven in accordance with the data sheet - it tells the device where the start of the command is.
So the sequence is: (for every command)
- Chip select ON
- Send 1 command - not 1 byte, but 1 whole command sequence.
- Chip select OFF
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I am sure we will get it working tomorrow... you will know what time it is now around Greenwich
Post Edited (deSilva) : 1/19/2008 1:13:59 AM GMT
http://propellerforum.sps-welt.de/viewtopic.php?t=26
I just had a look at the ST7565R datasheet (http://www.lcd-module.de/eng/pdf/zubehoer/st7565r.pdf) on page 64 and I'll try to understand this. I'm a little confused that the timing is so flexable.
Thanks deSilva I was hoping you have one since it was your posting from a couple of weeks ago where I first saw the dogm.
So now there's hope that I'll get this thing running. good.
Clemens
But good night now ..
How much do these display's cost ? With the SPI interface.
The interface chip these units use is a sistronics 7036 I think..
It has a 4 wire SPI protocol..
Cheers Ron Mel OZ
Despite their high WAF, they are extremely low cost,
128x64 around 22 Euro
132x32 around 14 Euro
Yes, I'm starting to understand why it said 4-wire SPI and not just SPI.
I should have posted something long ago... But it turned out to be a little bit tricky... The commands are NOT well documented...
Edit:
improved version in next posting..
Post Edited (deSilva) : 1/20/2008 12:16:50 AM GMT
Just tried it but couldn't get it to work so far...
I think I have the four wires connected correctly, but no luck so for.
But thanks anyway at least now I know that it must be something wrong with my setup...
Clemens
Do you have any reactions at all? Looking at your photograph the caps look fine... You have to connect CS of course.
RESET was WRONG at GND!
It is NON-RESET
Yes, I connected:
SI (36) to pin 0
CLK (37) to pin 1
Reset (38) nowhere
A0 (39) to pin 2
CS (40) to pin 3
I'm confused that there are no "waitcnt"'s in the program.
does this mean it works at the highest possible spin-speed?
Do I have t set :
_CLKMODE = XTAL1 + PLL16X
_XINFREQ = 5_000_000
?
It works with all speeds! I tested without crystal, and with 80 MHz,,,
So, again:
36 -> I/O 0 (= pin 1)
37 -> I/O 1
38 -> I/O 2
39 -> plus 3V
40 -> I/O 3 (=pin 4)
Should work! Well, MUST work!! Just run the program...
I didn't have reset connected to plus 3V but did so now - still nothing happens when I load the program.
I'm sorry to take up your time like this.
Oh, sorry, my german breaks through when I'm getting emotional...
I just changed the Initialization to the defaults in the datasheet:
BYTE $A1 'ADC reverse
BYTE $C0 'reverse COM
BYTE $A6 'normal display
BYTE $A2 'set bias 1/9
BYTE $2F 'set Booster
BYTE $F8, $00 'set Booster x4
BYTE $27 ' change here for contrast: $24..$27
BYTE $81, $16 'set contrast ($3f to $00)
BYTE $AC, $00 'no static indicator
BYTE $AF ' Display ON
and now it's working!
Thanks DeSilva, I'm in deep debt, I would have never gotten there myself...
... and the funny thing is, I almost understand every part of your program.
this will keep me occupied for a while.
Cool.
Clemens
I made some changes in the contrast setting... Maybe you will change them back to the recommended values...
But that cannot be the reason... If the contrast is bad, the display should look "black" - that's how it started with me 4 hours ago
I will post a minor update of the test program in 10 minutes, so you can see some more of the commands in action...
Post Edited (deSilva) : 1/20/2008 2:33:01 PM GMT
The driver (version 5) is in the enclosed ZIP. Sorry I changed some conventions:
spiWrite is now called write
init has a parameter ("upside down", FALSE or else)
clearLine is now called clearPage
I have a low cost 32 lines display only. however it contains full 64 lines RAM and can be scrolled !
Edit:
Sory I had to modify this again for a grave - but not noticeable - error in the COG completion logic ...
Post Edited (deSilva) : 1/20/2008 3:02:36 PM GMT
I see that the scrambling is because you have the 132x32, right? (*overlapped post again*)
But don't tell me what to change, this is a good exercise for me!
I'll report back as soon as I figured it out.
Cool, it also shows how to use the internal font!
This must go to the wiki or Object Exchange as soon as it is finished.
Thank you,
Clemens
The scrambling is unclear....
Can you try the GOLEM please
I think it was my fault: When you have just copied the code from the browser window - WITHOUT FIRST getting the true contents with "respond to message" - some brackets might have got lost! [noparse][[/noparse] 0], [noparse][[/noparse] 1] , [noparse][[/noparse] 2]
Best use the driver 005 in the zip!
Life is forming on my display. Beautiful!
I will try to get·a smaller font running·(starting with a bitmap font like the hydra-people do for their games.)
Unfortunately I still have some work to do, or there will be some very unhappy customers tomorrow. LOL
Thank you so much again, this was a giant step for me, I've learned a lot this weekend.
Clemens
Here is my small Dogmfont. It is non-mono-space, so characters have different widths between one and five pixels. This way if you're lucky you can get 30 Characters per line.
It requires deSilvas driver "MPE_SPI_DOGM_005.spin" (5 posts up).
I tried my best to program this like the pros do - but any criticism is very welcome.
Next I will try to get one bit images from an SD-Card to the screen. Guess I'll take a look at Rayman's website to see how to do that...
Cheers,
Clemens