This is a link library for the Nokia 6610, 6100, 7250, 7250i, 3100, 3200, 5100 colordisplay and compatible. 
Version 2.1.

Copyright 2004 Hagen Reddmann, HaReddmann at T-Online dot de
Greatings goes to F. Maximilian Thiele aka Ape, me at apetech dot de 
http://www.apetech.de/nokia6100.php


- entpacke ZIP mit Ordner
- ffne \lib\makefile. und ndere MCU_TARGET und -DXTAL=1600000 auf dein Device
- ffne \lib\glcd.inc und ndere die PORT Definitionen angepasst an deine Hardware
- starte \lib\compile.bat
- kopiere glcd.h, glcd.inc, lfsr.h, lfsr.inc nach c:\winavr\avr\include
- kopiere libglcd.a nach c:\winavr\avr\lib\
- obiger Ordner c:\winavr\ ist das Installationsverzeichnis von WinAVR gcc

- ffne \lib\test\makefile. und ndere MCU
- starte \lib\test\compile.bat um DEMO zu compilieren
- upload test.hex in dein Device



- unzip with folders
- open \lib\makefile. and change MCU_TARGET and -DXTAL=16000000 to your Device
- open \lib\glcd.inc and change the PORT definitions to your hardware connection of the GLCD
- run \lib\compile.bat
- copy glcd.h, glcd.inc, lfsr.h, lfsr.inc to c:\winavr\avr\include
- copy libglcd.a to c:\winavr\avr\lib
- the folder c:\winavr\ is your installation folder of WinAVR

- open \lib\test\makefile. and change MCU
- run \lib\test\compile.bat to compile DEMO
- upload test.hex to your device


important defines in glcd.inc that should be changed

XTAL                 clock frequency of targetdevice, please change it in makefile

USE_HIGHCOLOR        use 65536 colors mode, the PCF8833 supports 4096 fullcolors and the remaining colors are dithered
USE_ORGINALCOLORS    in 256 color mode setup color mapping eg. palette to original values described in PCF8833 datasheet
COLOR_TABLE_BITS     this define the count of the internal used Colortable entries, in power of 2 -> 2^x. For 4 colors in table define 2, 
                     for 16 colors define 4. The colortable is used to map all drawings to Background, Foreground, Frame and Shadow colors.
                     Second, all multi color fonts use the colortable to get the real screen color used for one pixel in the character.
                     Per default the library use a colortable with 4 entries. If you want to use symbol fonts with 8 colors, eg. 3 Bits 
                     per Pixel then you have to change COLOR_TABLE_SIZE to 3, otherwise the font data are assumed as one to one mapping.
                     As example a 256 color font use 8 bits per pixel. If the COLOR_TABLE_SIZE is set to 4 = 16 color entries then
                     each pixel of the character represent a direct color without mapping.
                     COLOR_TABLE_BITS must be >= 2 defined !!
SCREEN_COLOR0
SCREEN_COLOR1
SCREEN_COLOR2
SCREEN_COLOR3	     default colors to initialize a 4 entry colortable. Change these defines to suppress manual needed code for extra
                     initializations in your source. This save some resources.	
ORIENTATION_DEFAULT  default orientation of display at initialization 
USE_CLIPPING         inbuild clipping is active, comment out this define to use all function without clipping. This can save upto 600
                     bytes code, but then your source have to ensure that all coordinates are valid and special painting features,
                     only possible with clipping, are deactivated.

LCD_PORT             _SFR_IO_ADDR(PORTB)  Hardware access port to the display, for easyness it's assumed the display is connected to
LCD_PIN              _SFR_IO_ADDR(PINB)   only one port, eg. PORTB on most cases. The display must be for this library always
LCD_DDR              _SFR_IO_ADDR(DDRB)   connected to hardware SPI, except you rewrite my library :) The lib use SPI interrupt !!
LCD_CS               PB2, SS              can be but must be on LCD_PORT, need changing 3 source lines for other PORT in glcd00.S
LCD_SDA              PB3, MOSI            must be SPI
LCD_RESET            PB4, MISO            can be but must be on LCD_PORT, need changing 4 source lines for other PORT in glcd00.S 
LCD_SCL              PB5, SCK             must be SPI

LSFR_VARIABLE_POLYNOM in lfsr.S, define it to use global variables for Polynom_S and Polynom_A. In this way you can change the used
                     polynoms at runtime to support cryptography.

USE_FAR_JUMP         in regs.inc, define it if the gcc-linker can't relocate. If defined the lib use far jumps and far calls.


connecting the Nokia display:

see http://www.apetech.de/nokia6100.php

Pin	
1	Vdigital	2,7V - 3,3V	
2	RESET	        LCD_RESET, user defined	
3	SDATA	        LCD_SDA, SPI MOSI	
4	SCLK	        LCD_CLK, SPI CLK	
5	~CS	        LCD_CS, user defined 	
6	Vdisplay	2,7V - 3,3V	
7	n/c		
8	GND	        GND	
9	LED-	        GND or -3.2V
10	LED+	        +6.4V or +3.2V, 15 - 30mA
11	n/c	


Useing MISO as RESET line for the display have shown no drawbacks on ISP.
The Display have connected own MISO and MOSI line together.


best reagrds, Hagen
