Pages: [1]   Go Down
Author Topic: glcd und i2C  (Read 864 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hallo
Ich habe ein 128X64 Graphic LCD.
Ich würde gerne das Pin mapping der glcd Libary geringfügig ändern um den Analog PIN A4  wieder zur Verfügung zu haben.
Wie muss ich das anstellen?

An Pin A4 und A5 möchte ich dann einen I²C Port Expander 9535 betreiben um weitere I/O's für Tasten etc. zur Verfügung zu haben.

grüße baschtler
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2732
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know any German so here is an English response:
I assume you are wanting to re-map a few pins. This is can be done
very easily if you are using the glcd v3 library from here:
http://code.google.com/p/glcd-arduino/
It allows you to map any glcd pin to any Arduino/AVR pin.
You will need to edit the pin configuration file in
glcd/config/ks0108_{board_type}.h

Where {board_type} is "Arduino", "Mega", or "Teensy" depending on
which board you are using.
You can use any pin for any function. Simply change the pin numbers as
needed.
Hope that helps.

--- bill
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thank you - it works - now i can use PIN A4 and PIN A5 for an I²C Expander.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 220
Posts: 13846
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@baschtler

If you post in German in the international sections, please consider google translate (like this post)
It may not be 100% perfect but you will get more positive feedback,

-----

Wenn Sie post in deutscher Sprache in der internationalen Sektionen, beachten Sie bitte google translate (wie dieser Beitrag)
Es ist vielleicht nicht 100% perfekt, aber Sie werden mehr positives Feedback bekommen.

Rob
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2732
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Fantastic.
You can also use PIN_Pb notation where Pb represents an AVR port and bit number.
For example: instead of using the arduino pin numbers you can specify the AVR port/bit
number directly.
i.e.
#define glcdCSEL1 PIN_D3

Will assign this glcd function to AVR port D bit 3.

Can you give me a little feedback?
There is some information about this in the documentation. (both the pdf file and the HTML)
Was this mainly a case of language (english vs german) or was it
hard or difficult to locate in documentation?

Thank You,
--- bill
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Rob.
I didn't find a German section so i write in German. But maybe you are right it is better to write in my "german english" and get more reply. 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Bill.
Now i read the glcd Documentation Line by Line an found the required Information.
...
The panel configuration file includes a board specific configuration file that specifies the
pins used for each specific board type.
The pin configuration file naming is a follows:
"{PANELNAME}_{BOARDNAME}.h"
{PANELNAME} is the glcd panel type. (for example, ks0108)
{BOARDNAME} is the name of the board (as selected in the Arduino IDE).
...

Maybe a small Example would help to understand this a little better.
If my I²C Port Expander (A4,A5) runs together with my 128x64 GLCD (EN -> PIN D3) I will give you some Information again.
Logged

Pages: [1]   Go Up
Jump to: