GlcdSSD1325 96x64

From MCS Wiki AVR
Jump to: navigation, search

This lib is for SSD1325 based displays. This lib supports screen 96x64.

The lib is based on bascom code from Robert Wolgajew.

 

SSD1325 is used for OLED displays. Each pixel can have 16 tints.

The usual graphic statements are supported.

Images such as bitmaps can be converted into 16 grey tone images.

The ssd1325 conversion tool you can download from the MCS web server.

 

 

The sample below is using porta pins to control BS1 and BS2. Of course you would connect them to VDD directly.

 

The pins used, and bascom pins names are :

SSD pin

BASCOM pin

WR

WR

RD

RD

D0-D7

PORTx

D/C

A0

RES

RST

CS

CS1

VCC

VCC

 

The VCC pin controls a 12V generator.

 

Since the display is using a pallet of 16 grey tones, you must specify the foreground and background colors with LCDAT.

 

 
'-------------------------------------------------------------------------------
' (c) 1995-2011 MCS Electronics
' oled_ssd1325.bas
' demonstrates OLED display 96x64 with SSD1325 chip
' Based on bascom SSD1325 code from Robert Wolgajew
'-------------------------------------------------------------------------------
$regfile = "m8535.dat"
$crystal = 3686000
$hwstack = 48
$swstack = 48
$framesize = 48
 
 
'normally the BS1 and BS2 pins would be connected to VCC on the PCB
'but the test PCB used 2 port pins
Config Porta.0 = Output
Config Porta.1 = Output
Porta.0 = 1
Porta.1 = 1
 
 
$lib "glcdSSD1325_96x64.lbx" ' include the lib
 
'vcc is 12V and must be enabled later. This means vcc needs a control pin.
Config Graphlcd = 96x64ssd1325 , Dataport = Portc , Wr = Portd.6 , Rd = Portd.7 , Cs1 = Portd.3 , A0 = Portd.5 , Rst = Portd.4 , Vcc = Portd.2
 
 
Cls 'as usual clear display
 
Dim J As Byte , K As Byte , W As Word
 
Line(0 , 0) -(95 , 63) , 15 ' diagonal line
Line(0 , 63) -(95 , 0) , 6 ' diagonal line with other color
 
 
Pset 1 , 0 , 15 'set a pixel
 
Setfont Color8x8 ' font to use
Lcdat 20 , 0 , "123" , 15 , 0 'and show some text
 
Waitms 3000
 
Showpic 0 , 0 , Plaatje
 
 
End
'include font
$include "color8x8.font"
'$include "color16x16.font"
 
 
Plaatje:
$bgf "ssd1325.bgc"


Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language