Go Down

Topic: Pinout Change for GLCD (Read 708 times) previous topic - next topic

Mar 12, 2012, 01:14 pm Last Edit: Mar 12, 2012, 01:27 pm by MarkBeetge Reason: 1
I have a Pinout B 128x64 LCD display and have it working properly on a UNO. I would like to change the EN line from 18 to 12 but although I have edited the ks0108_Arduino.h file to: #define glcdEN           12, the compiler still used the standard pin configuration. Please can someone enlighten me as to where I need to change it, I want to use the I2C for reading a RTC and DS18B20, or is that not possible? I am using GLCD ver3 and ver 1.0 IDE


That should work.
The diag sketch will show all the pins that the library is using.
Run the diag sketch and look at the pin number reported
or post the output back here and I'll have a look at it to
see if anything looks out of place.

--- bill

Here are the lines from the ks0108_Arduino.h file:

#define glcdData0Pin        8
#define glcdData1Pin        9
#define glcdData2Pin        10
#define glcdData3Pin        11
#define glcdData4Pin        4
#define glcdData5Pin        5
#define glcdData6Pin        6
#define glcdData7Pin        7

/* Arduino pins used for Commands
* default assignment uses the first five analog pins

#define glcdCSEL1        14
#define glcdCSEL2        15

#define glcdCSEL3         3   // third chip select if needed

#define glcdCSEL4         2   // fourth chip select if needed

#define glcdRW           16
#define glcdDI           17
#define glcdEN           12
// Reset Bit  - uncomment the next line if reset is connected to an output pin
//#define glcdRES          19    // Reset Bit


Here is the serial printout:

GLCD:ks0108 DisplayWidth:128 DisplayHeight:64
Chips:2 ChipWidth:64 ChipHeight:64
CSEL1:14(PIN_C0) CSEL2:15(PIN_C1)
RW:16(PIN_C2) DI:17(PIN_C3) EN:18(PIN_C4)
D0:8(PIN_B0) D1:9(PIN_B1) D2:10(PIN_B2) D3:11(PIN_B3)
D4:4(PIN_D4) D5:5(PIN_D5) D6:6(PIN_D6) D7:7(PIN_D7)
Delays: tDDR:320 tAS:140 tDSW:200 tWH:450 tWL:450
ChipSelects: CHIP0:(14,0x1, 15,0x0) CHIP1:(14,0x0, 15,0x1)
Data mode:
d0-d3:nibble mode-Non-Atomic
d4-d7:nibble mode-Non-Atomic

Seems it doesnt change. I dont know where to try next?


Can you post the rest of the diag output?
There is additional information that is helpful.
(IDE version, library build data, config file information,  etc...)

I can't think of very many ways that this could happen.
When the library builds, it has to use that file when building for
a m328 processor using the default config file.

Are you using the default Auto configuration config file?
(no modifications to glcd/glcd_Config.h)

Where is the library installed?
Is there only one copy of it installed?
(It can either be in the distribution tree, or in the sketches folder but not both)

Or that the library is not being rebuilt or no uploaded.
Are you sure the code is being rebuilt and uploaded?

Have you made any mods to the IDE that make it "smarter" about what to build?

--- bill

OK problem solved, the IDE was compiling the sketch from a different library from the one I was modifying. Thanks for the help, it works now.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131