Just released a Nokia 3110 GLCD display driver using the PCD8544.
The GLCD.h driver for the Nokia 3110 PCD8544 supports two modes of operation.
1 - Full support for BMP's, text (all pixels addressable) , line, box, circle etc. Requires large RAM 16f devices of 1024 bytes, or AVR or 18F. This method uses page buffering hence the need for the RAM.
2 - Support for BMP's and text only 13 * 7 characters only. No page buffering.
The command set is the standard GLCD command set. See code below and the attachment for an example.
~~~~~
'
'This program was written using the Great Cow Basic IDE for use with the PIC
'Microchio development board and a Nokia 3310 LCD. It is a nice small graphical LCD, suitable for a lot of various projects.
'The display is 3835 mm, with an active display surface of 3022 mm, and a 84*48 pixel resolution.
'The display is easy to interface, using an SPI type of communication.
'A 1-10 uF electrolytic capacitor from VOUT to GND, is the only external component needed on to display connection 7
' Display connection 1 = 3.3v
' Display connection 6 = 0v
' Display connection 7 = 4.7uf CAP
'
'You may copy, alter and reuse this code in any way you like, but please leave
'reference to Great Cow Basic and Anobium in your comments if you redistribute this code. '
'THIS SOFTWARE IS PROVIDED "AS IS". WE MAKE, OR PROVIDE, ANY WARRANTIES,
'WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED
'WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR
'LACK OF NEGLIGENCE. ANOBIUM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE
'FOR ANY DAMAGES INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR
'CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER.
#define GLCD_WIDTH 84
#define GLCD_HEIGHT 48
' For devices with limited RAM you can use Character and Picture mode (no lines, circles etc.
' Remove the arrays above and remove the remarks from the two defines below
' #define GLCD_TYPE_PCD8544_CHARACTER_MODE_ONLY
'Pin mappings for Nokia 3310 Device for CHIPINO
#define GLCD_DC D5 ' to display connection 4
#define GLCD_CS D6 ' to display connection 5
#define GLCD_RESET D7 ' to display connection 8
#define GLCD_DO D2 ' to display connection 3
#define GLCD_SCK D4 ' to display connection 2
#define _GLCD_DC _D5 ' LAT addresses
#define _GLCD_CS _D6
#define _GLCD_RESET _D7
#define _GLCD_DO _D2
#define _GLCD_SCK _D4
#DEFINE GLCD_TYPE GLCD_TYPE_PCD8544
#define GLCD_WIDTH 84
#define GLCD_HEIGHT 48
' For devices with limited RAM you can use Character and Picture mode (no lines, circles etc.
' Remove the remark from the define below:
' #define GLCD_TYPE_PCD8544_CHARACTER_MODE_ONLY
' Comment out following paragraph for a non LAT port configuration and for ATMEL etc. devices.
#define GLCD_LAT
' Pin mappings for Nokia 3310 Device please use LAT and Port definitions as appropiate
#define GLCD_DO latc.5
#define GLCD_SCK latc.3
#define GLCD_DC latc.2
#define GLCD_CS latc.1
#define GLCD_RESET latc.0
#define _GLCD_DO portc.5
#define _GLCD_SCK portc.3
#define _GLCD_DC portc.2
#define _GLCD_CS portc.1
#define _GLCD_RESET portc.0
' Pin mappings for SPI for Nokia 3310 Device
' None LAT configurations
' #define GLCD_DO portc.5
' #define GLCD_SCK portc.3
' #define GLCD_DC portc.2
' #define GLCD_CS portc.1
' #define GLCD_RESET portc.0
Last edit: Anobium 2014-10-22
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just released a Nokia 3110 GLCD display driver using the PCD8544.
The GLCD.h driver for the Nokia 3110 PCD8544 supports two modes of operation.
1 - Full support for BMP's, text (all pixels addressable) , line, box, circle etc. Requires large RAM 16f devices of 1024 bytes, or AVR or 18F. This method uses page buffering hence the need for the RAM.
2 - Support for BMP's and text only 13 * 7 characters only. No page buffering.
The command set is the standard GLCD command set. See code below and the attachment for an example.
Have fun,
Anobium
Last edit: Anobium 2014-10-22
Thanks and Youtube.
My thanks go to Hugh! He provided the method of creating a large scale RAM buffer for the 16f devices! Thank you.
The GLCD demo, see http://youtu.be/nohcIHt6Pkw
An example using the Chipino.
~~~~~
'
'This program was written using the Great Cow Basic IDE for use with the PIC
'Microchio development board and a Nokia 3310 LCD. It is a nice small graphical LCD, suitable for a lot of various projects.
'The display is 3835 mm, with an active display surface of 3022 mm, and a 84*48 pixel resolution.
'The display is easy to interface, using an SPI type of communication.
'A 1-10 uF electrolytic capacitor from VOUT to GND, is the only external component needed on to display connection 7
' Display connection 1 = 3.3v
' Display connection 6 = 0v
' Display connection 7 = 4.7uf CAP
'
'You may copy, alter and reuse this code in any way you like, but please leave
'reference to Great Cow Basic and Anobium in your comments if you redistribute this code. '
'THIS SOFTWARE IS PROVIDED "AS IS". WE MAKE, OR PROVIDE, ANY WARRANTIES,
'WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED
'WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR
'LACK OF NEGLIGENCE. ANOBIUM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE
'FOR ANY DAMAGES INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR
'CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER.
#chip 16f1938,32
#config Osc = INT, VCAPEN_OFF, MCLRE_ON, PLLEN_ON, CLKOUTEN_OFF
#include <glcd.h>
#include <chipino.h>
#define GLCD_LAT
#DEFINE GLCD_TYPE GLCD_TYPE_PCD8544
' #define GLCD_TYPE_PCD8544_CHARACTER_MODE_ONLY
'main program
end
' Valid BMP file found
' BMP Metrics
' BMP Magic Number = BM, Width < 129, Height < 65, CompressionType = 0 & BitsPerPixel = 1
' BMP MagicNumber = BM
' BMP Width = 84
' BMP Height = 48
' BMP CompressionType = 0
' BMP BitsPerPixel = 1
' Completed Examination of BMP file
' ------------------------------------------------------------------------------
' File generated by BMP2GCB
' See http://sourceforge.net/projects/bmptoglcd/
Table Anobium84_48 as Byte
' start data
0x54
0x30
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x80
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x80
0xF0
0x9C
0xE7
0x38
0x0E
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x02
0x06
0x0D
0x0B
0x1E
0x34
0x68
0xD8
0xF0
0x60
0xC0
0x80
0x80
0x80
0xC0
0xC0
0x40
0x40
0x60
0x60
0x60
0x20
0x20
0x20
0x30
0x30
0x10
0x10
0x10
0x18
0x18
0x08
0x0E
0x1B
0x7E
0xE3
0x80
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0xC0
0x20
0xC0
0x00
0x00
0x01
0x7F
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0xE0
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x20
0x00
0x03
0x07
0x0C
0x08
0x30
0x60
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0xC0
0x38
0x16
0x11
0x10
0x11
0x16
0x38
0xC0
0x00
0xFF
0x02
0x01
0x01
0x01
0xFE
0x00
0x00
0x7E
0x81
0x81
0x81
0x81
0x7E
0x00
0x00
0xFF
0x42
0x81
0x81
0x81
0x7E
0x00
0x00
0xFF
0x00
0x00
0x7F
0x80
0x80
0x80
0x40
0xFF
0x00
0x00
0xFF
0x02
0x01
0x01
0x01
0xFE
0x02
0x01
0x01
0x01
0xFE
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x3E
0x60
0x40
0xC0
0x80
0x80
0x80
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x80
0xC0
0xE0
0x70
0x18
0x0C
0x06
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x01
0x01
0x01
0x03
0x02
0x06
0x06
0x04
0x0C
0x08
0x18
0x18
0x10
0x30
0x20
0x60
0x60
0x40
0x60
0x30
0x18
0x0C
0x06
0x03
0x01
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
0x00
End Table
Last edit: Anobium 2014-10-22
Last edit: Anobium 2014-10-22