Pages: [1]   Go Down
Author Topic: DOGM128 library, DOGXL160 LCD with arduino 2560  (Read 1443 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all,

I just had success with the DOGM128 library (http://code.google.com/p/dogm128/) and the 2560.

I just had to change the SPI pins in dogm128.h. I'm sure there's a more automatic way of doing this by looking at environment variables set by the IDE, but I don't know how that works. So here's a patch:

Code:

154,157c154,164
< #define PIN_SCK   13
< #define PIN_MISO  12
< #define PIN_MOSI  11
< #define PIN_SS    10
---
> #ifdef MEGA2650
>     #define PIN_SCK   52
>     #define PIN_MISO  50
>     #define PIN_MOSI  51
>     #define PIN_SS    53
> #else
>     #define PIN_SCK   13
>     #define PIN_MISO  12
>     #define PIN_MOSI  11
>     #define PIN_SS    10
> #endif

Then define

#define MEGA2650

and restart the arduino IDE.
Logged

Germany
Offline Offline
Edison Member
*
Karma: 133
Posts: 1448
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good to hear, that it is working.
Thanks for the information.

Oliver
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Seems to be broken now. The examples work fine, but when I started to integrate it with my existing software I'm getting lots of unreliability and weird problems. Will keep the forum posted!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've had a bit of success with things working more predictably; I was printing a String with dogm.print, but hadn't initialized the string yet. Fixing this seemed to solve a problem with concatenating to that string further down the line.

Also, I've found I can't use any sketch that uses a large font; they won't even download onto the 2650!

Finally, for those confused (as I was/am) by the hardware labelling on the dog LCD, here is how to wire it in 3pin SPI mode for the dogm library. The main problem is that they are using non standard terminology for the pins (confusing I2C with SPI?)

* CS0 (dog pin 28) should be called SS, pin 53 on the mega
* SDA (dog pin 31) should be called MOSI, pin 51 on the mega
* SCK (dog pin 32) is called SCK, pin 52 on the mega
* C0 (dog pin 27) is something specific to dog LCD and can go anywhere, but usually pin 9 with the dogm library.
Logged

Pages: [1]   Go Up
Jump to: