Has anyone succeeded in running a GLCD (ks0108) on the newest Teensy++ (with ATMEL 90USB1286)? A tried to adopt the code by mem (http://www.arduino.cc/playground/Code/GLCDks0108) to the new Processor but even with his help I couldn’t get it running.
What ports/pins did you connect and how did you adapt ks0108.h and Arduino.h (or a similar config-file)?
/*
ks0108_Arduino.h - Arduino library support for ks0108 and compatable graphic LCDs
Copyright (c)2008 Michael Margolis All right reserved
This is the configuration file for mapping Teensy++ pins to the ks0108 Graphics LCD library
*/
#ifndef KS0108_CONFIG_H
#define KS0108_CONFIG_H
#define CSEL1 18 // CS1 Bit
#define CSEL2 19 // CS2 Bit
#define R_W 8 // R/W Bit
#define D_I 9 // D/I Bit
#define EN 7 // EN Bit
#define LCD_CMD_PORT PORTE // pins 8, 9, 18, 19
// these macros map pins to ports using the defines above
// the following should not be changed unless you really know what your doing
#define LCD_DATA_LOW_NBL C // port for low nibble: pins 10-13
#define LCD_DATA_HIGH_NBL C // port for high nibble: pins 14-17
// Teensyduino always optimizes digitialWrite when used with const inputs
#define fastWriteHigh(_pin) (digitalWrite((_pin), HIGH))
#define fastWriteLow(_pin) (digitalWrite((_pin), LOW))
#endif
Connect the 8 data lines to pins 10 to 17, and the 5 control signals to pins 7, 8, 9, 18 and 19, as documented in the comments.
It works great.
Soon I'll take some photos and draw some wiring diagrams and get them up on the website.