14
AIS Cube www.aiscube.com 190 Middle Road #04-11, Fortune Centre Singapore 188979 Tel: (65) 6339 3309 Fax: (65) 6333 0188 E-Module: GLCD+RTC Combo Datasheet v1.1 Copyright 2008 AIS Cube. All rights reserved. The FlamingICE(FI) and FIDE are either registered trademarks or trademarks of AIS Cube in Singapore and/or other countries.

TechPaper GLCD RTC Combo

Embed Size (px)

DESCRIPTION

Technical Paper for AIS Cube's GLCD & RTC Combo Module

Citation preview

Page 1: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

E-Module: GLCD+RTC Combo

Datasheet

v1.1

Copyright 2008 AIS Cube. All rights reserved.

The FlamingICE(FI) and FIDE are either registered trademarks or trademarks of AIS Cube in Singapore

and/or other countries.

Page 2: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

ELECTRICAL CHARACTERISTICS

GLCD:

Function: Graphic TFT LCD

Vdd: 3.3V DC

Backlight: 6V DC

Interface Bus: SPI

LCD Display: 128 x 128 Pixels; 256 Colours; TFT

Colour Format: 8 bit RGB in format BBB/GGG/RR

Display Orientation: True x/y Axis

Real Time Clock (RTC):

Function: Real Time Clock/ Calendar

Vdd: 3.3V DC

Battery for Data Retention: 3V lithium coin cell battery (E-CR2032)

IC: PCF8583T

Memory: 240 x 8-bit low-voltage RAM

Interface Bus: I2C

Precision: Down to the Hundredth of a Second

(0,0)

y-axis

x-axis

Page 3: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

PINOUT

NOTE: Insert a 3V lithium coin cell battery (E-CR2032) for the Real-Time Clock to keep track of

timing when power from the microcontroller is cut off.

GLCD + RTC Combo

+

FRONT BACK

GN

D3

.3V

RE

SE

T

CLK

CS

N.C

6V

GN

DN

.C

DIO

SC

LIN

T

SD

A

RTCGLCD

GN

D3.3

V

CLK

CS

N.C6V

GN

DN

.C

DIO

SC

LIN

T

SD

AR

ES

ET

RTC GLCD

Page 4: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

SCHEMATICS AND CIRCUIT LAYOUT

Page 5: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

APPENDIX A

EXAMPLE CONFIGURATIONS

Page 6: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

GLCD + RTC

Full Connection to the FI80 Audio Board

Page 7: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

GLCD + RTC Full Connection to the FI40 Board

VIN GND

NC NC

GND VDDTOP

BOTTOM

FI40 BOARD

RTCGLCD

GLCD RTC

BOTTOM

TOP

Pin

(7)

Pin

(8)NC NC

NC NC NC NC

SDA SCL

Pin

(9)

Pin

(10)

Pin

(11)

Pin

(12)

Page 8: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

GLCD Connection to the FI80 Audio Board

Page 9: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

GLCD Connection to the FI40 Board

Page 10: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

RTC Connection to the FI80 AUD Board

NOTE: Insert a 3V lithium coin cell battery (E-CR2032) for the Real-Time Clock to keep track of

timing when power from the microcontroller is cut off.

Page 11: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

RTC Connection to the FI40 Board

NOTE: Insert a 3V lithium coin cell battery (E-CR2032) for the Real-Time Clock to keep track of

timing when power from the microcontroller is cut off.

Page 12: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

APPENDIX B

Programming the Module using FIDE

Page 13: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

OVERVIEW

Libraries and system functions are available to make programming the GLCD + RTC Combo Module a

whole lot easier. The RTC Library is one such example, calling the subroutines and functions from the

library automatically handle the read and write communications between the FI Microcontroller and

the module via I2C.

The FI RTC (Real Time Clock) Module Library

The FI RTC is located at the back of the GLCD + RTC Combo Module. Please refer to the PINOUTs for

pin specification.

You can add the RTC library to your project by selecting Project > Add Module and selecting

LIB_RTC.

Note that the Library Module is now a part of your project.

LIB_RTC Contains 4 Routines;

• RTC_READ_TIME

• RTC_READ_TIME_EX

• RTC_READ_DATE

• RTC_SET_TIME_AND_DATE

To get the current time, use RTC_READ_TIME(HRS, MIN, SEC). The time in Hours, Minutes and

Seconds will be returned in the HRS, MIN, SEC variable.

You can display it in the debug window using the instruction Debug.Print.

CODE:

Dim SEC, MIN, HRS As Integer

Public Sub Main()

RTC_READ_TIME(HRS, MIN, SEC) Debug.Print "DATE:"; CStr(HRS); ":"; CStr(MIN); ":"; CStr(SEC); " ";

End Sub

For precise timing operations, you can use RTC_READ_TIME_EX(HRS, MIN, SEC, T10, T100)

to get precision to a hundredth of a second.

To get the current date, use RTC_READ_DATE(DAY, MTH, YRS) to return the date.

Page 14: TechPaper GLCD RTC Combo

AIS Cube www.aiscube.com

190 Middle Road #04-11, Fortune Centre Singapore 188979

Tel: (65) 6339 3309 Fax: (65) 6333 0188

To set the date and time for the RTC to start keeping track of, you can make use of the function

specifying the hours, minutes, year, and month; RTC_SET_TIME_AND_DATE(HRS, MIN,

YEARDATE, MTH). Note that you cannot set the seconds.

Variables mentioned must be declared by the user.

CODE:

Dim T10, T100, SEC, MIN, HRS, DAY, MTH, YEAR As Integer

Programming the GLCD

Interacting with the GLCD is a very versatile affair; you can store images to dump into the screen

using an External EEPROM, or the FICE SD Card, or programmatically plot the image to the screen

pixel by pixel.

The FlamingICE Operating System, aka the FI Firmware onboard the FI chip contains system

commands to write to the GLCD. The full coverage can be obtained by referring to the FIDE System

Library under OS.GLCD.

You can also refer to the online tutorial on how to load an image to the GLCD using an external

EEPROM.

Writing text to the screen is as simple as stating the string you want on the screen by using the

OS.GLCD.Print command.

Example:

‘The following program initializes the GLCD, fills the GLCD with the

‘colour white, sets the position of the cursor to the x,y point (5,10),

‘sets the font size to large, and prints the lines at the cursor ‘position.

OS.GLCD.Init()

OS.GLCD.Fill(255)

OS.GLCD.SetPosition(5, 10)

OS.GLCD.FontSize(1)

OS.GLCD.Print "TEST 1"

OS.GLCD.Print "Test 2"