BCoreRevE_ 11. OLED

Page 1

AIS Cube

OLED

[THE

BLAZINGCORE SERIES]

With superior number crunching abilities and peripheral handling on our custom embedded OS, Rapid prototyping is now easy... and blazing fast.

REV.E | MARCH 2012 RELEASE |


TECHNICAL OVERVIEW

Diagonal Size Driving Mode Colour Mode Interface Mode Driver IC Resolution Pixel Pitch Active Area Outline Area Thickness Weight Touch Screen

2.83� Active Matrix 16bit RGB 5/6/5 262K Colours 16bit RGB Interface (One Transfer per Pixel) S6E63D6 320 x RGB x 240 0.06 x 0.18 mm 43.2 x 57.6 mm 49.1 x 67.3 mm 1.75mm (Typical) 16g 4-wire Resistive

REV.E | MARCH 2012 RELEASE |P a g e | 1


oled pin assignment

Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Name AR_VDD AR_VSS VCI VCI1 GND C12M C12P C11M C11P VLOUT1 C31P C31M C32P C32M VLOUT3 VLOUT2 C21P C21M VGS IOVCC

21

SPB

22

ID_MIB

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

DB17 DB16 DB15 DB14 DB13 DB12 DB11 DB10 DB9 DB8 DB7 DB6 DB5 DB4 DB3 DB2 DB1

Description Positive Voltage for OLED (+4.6V) Negative Voltage for OLED (-4.6V) Power Supply for Analogue Circuit (2.5V-3.3V) A reference voltage for 1st booster(Connect a 1uF/10v capacitance to Gnd) Ground External capacitance connect pin between C12M and C12P (1uF/10V) External capacitance connect pin between C11M and C11P 1st booster output pin. (1uF/10V) External capacitance connect pin between C31M and C31P (1uF/10V) External capacitance connect pin between C32M and C32P (1uF/10V) 3rd booster output pin. (1uF/16V) 2nd booster output pin. (1uF/16V) External capacitance connect pin between C21M and C21P. (1uF/10V) A reference level for the grayscale voltage generation circuit. (Connect to Gnd) I/O power supply Select the CPU interface mode. (0=parallel interface 1=serial interface) Select the CPU type (0=Intel 80x-system 1=Motorola 68x-system)

Bi-Directional Data bus. BlazingCore Usage: 16bit CPU Interface Connection Pins: DB17 - DB10, DB8 - DB1

REV.E | MARCH 2012 RELEASE |P a g e | 2


oled pin assignment 40

DB0

41

VSYNC

42

HSYNC

43

DOTCLK

44

ENABLE

45

SDI

46

SDO

47

CSB (CS/NCS)

48

RW_WRB (SCL)

49

RS

50

E_RDB

51 52 53 54 55 56 57 58 59 60 61

RESETB MVDD VREG1OUT VCI VGH VGL GND XYX+ Y+

Frame-synchronizing signal. (VSPL=0 Low active, VSPL=1 High active) FIX this pin at VSS level if the pin is not used Line-synchronizing signal. (HSPL=0 Low active, HSPL=1 High active) FIX this pin at VSS level if the pin is not used Input pin for clock signal of external interface: dot clock. DPL=0 Display data is fetched at DOTCLK’s rising edge DPL=1 Display data is fetched at DOTCLK’s falling edge Fix this pin at VSS level if the pin is not used. Data enable signal pin for RGB interface. EPL ENABLE GRAM write GRAM address 0 0 Valid Updated 0 1 Invalid Held 1 0 Invalid Held 1 1 Valid Updated For a serial peripheral interface (SPI), input data is fetched at the rising edge of the SCL signal, Fix SDI pin at VSS level if the pin is not used. For a serial peripheral interface (SPI), serves as the serial data output pin (SDO), Successive bits are output at the falling edge of the SCL signal. Chip select signal input pin. 0= driver IC is selected and can be accessed. 1= driver IC is not selected and cannot be accessed. Pin Function CPU Type Pin Description Read/Write operation selection pin RW 68-System 0=write 1=read Write strobe signal (Input pin) WRB 80-System Data is fetched at the rising edge. SCL SPI The synchronous clock signal Register select pin. 0=Index/status, 1=instruction parameter, GRAM data Must be fixed at VDD3 level when not used. Pin Function CPU Type Pin Description E 68-System Read/Write operation enable pin Read strobe signal. RDB 80-system Read out data at the low level When SPI mode is selected, fix this pin at VDD3 level Reset pin initializes the IC when low. Should be reset after power-on. Internal power for RAM. Connect a capacitance (1u/10v) to Gnd. A reference level for the grayscale voltage. Connect a capacitance (1u/10v) to Gnd. Power supply for analogue circuit(2.5v~3.3v) The positive voltage used in the gate driver. Connect a capacitance(1u/10v) to Gnd. The negative voltage used in the gate driver. Connect a capacitance(1u/10v) to Gnd. Ground (Touch Screen) (Touch Screen) (Touch Screen) (Touch Screen)

REV.E | MARCH 2012 RELEASE |P a g e | 3


Electrical characteristics Dc characteristics

REV.E | MARCH 2012 RELEASE |P a g e | 4


Electrical characteristics Dc characteristics (Cont’d)

REV.E | MARCH 2012 RELEASE |P a g e | 5


Absolute maximum ratings

Environmental absolute ratings Item

Symbol

Temperature Min. Max.

Unit

Storage Temperature

TST

-40

+80

ºC

Operating Ambient Temperature

TOP

-20

+60

ºC

Remarks The storage duration for both critical temperatures (-40 & 80 ºC) meet reliability test criteria. The operating duration for both critical temperatures (-20 & 60 ºC) meet reliability test criteria.

electrical absolute ratings Item

Symbol

Value

Unit

Power Supply Voltage 1

AR_Vdd

+4.6V ± 0.05

V

Power Supply Voltage 2

AR_Vss

-4.4V ± 0.1

V

Power Supply Voltage 3

VCI

+2.5 ~ +3.3

V

Power Supply Voltage 4

VDD3 (IOVcc)

+1.65 ~ +3.3

V

Note: Note Stresses above those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied. Exposure to maximum rating conditions for extended periods may affect device reliability.

REV.E | MARCH 2012 RELEASE |P a g e | 6


Technical drawing

REV.E | MARCH 2012 RELEASE |P a g e | 7


oled ORIENTATION

Horizontal (Default)

Vertical

REV.E | MARCH 2012 RELEASE |P a g e | 8


oled interface board Features AT A GLANCE The OLED interface board (REV.2) comes with the following onboard features:

REV.E | MARCH 2012 RELEASE |P a g e | 9


oled interface board pinout

REV.E | MARCH 2012 RELEASE |P a g e | 10


Interfacing to bcore100 The following image illustrates an overview of the full basic setup of what will be needed if using just the OLED + BCore100 Platform.

OLED Interfacing Board SIDE VIEW

Power Supply DC (6V-12V)

Comm.Key Cable

BOTTOM VIEW

*Detailed information of the boards will be covered on the next page.

REV.E | MARCH 2012 RELEASE |P a g e | 11

Serial Comm.Key

OLED

USB 2.0 to USB Mini-B Cable

USB Port on PC

TOP VIEW


Interfacing to bcore100

OLED BOARD PINS CSB RW_WRB RS E-RDB RESETB

N.C ACK N.C RX TX

+3.3V GND N.C GND V+

BCore100 Pins

BCore100 Pins

PORT7 54 53 55 52 56 51 57 50 58 49 32 32 31 31 30 30 29 29 28 28 27 27 26 26 25 25 24 24 23 23 22 22 21 21 20 20 19 19 18 18 17 17 3.3V 3.3V GND GND MCLR MCLR GND GND VCC VCC

RESERVED

GND 3.3V 59 60

COMM1 COMM2 JST4 JST3

3.3V GND MCLR GND VCC

JST1 JST2 JST1 JST2

Power Socket Power Indicator

65 64 63 62 61 3.3V GND

48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 16 15 14 13 12 11 10 9 3.3V GND

OLED BOARD PINS D17 D16 D15 D14 D13 D12 D11 D10 D01 D02 D03 D04 D05 D06 D07 D08

Power Switch

BCore100

The BCore Series boards are designed to be entirely stackable. You will find that interfacing the OLED board with the BCore100 Board is just a matter stacking the two boards with the use of standard header pins, which at the same time serves as I/O Bus and Data Connection. Pins should match up as above. Recommended stacking method as shown above, with the BCore100 & OLED Display both facing outwards. REV.E | MARCH 2012 RELEASE |P a g e | 12


Board stack pin comparison Pins

BCore100 (REV.2)

1

GIO

INT (PIN1)

2

GIO

INT (PIN2)

3

GIO

I2C (SCL)

4

GIO

I2C (SDA)

JST1

OLED

Pins

-

49

GIO

RESETB

-

50

GIO

E-RDB

-

51

GIO

-

52

GIO

RW_WRB

-

53

GIO

CSB

JST2 PORT0

GIO

5

JST3

BCore100 (REV.2)

OLED

PORT6

RS

6

GIO

-

54

GIO

N.C

7

GIO

-

55

GIO

COMM1(ACK)

8

GIO

-

56

GIO

N.C

JST4 9

GIO

-

57

GIO

COMM3 (TX)

10

GIO

-

58

GIO

COMM3 (RX)

11

GIO

-

59

GIO

12

GIO

-

60

GIO

13

GIO

-

61

GIO

-

14

GIO

-

62

GIO

-

15

GIO

-

63

GIO

16

GIO

-

PORT1

PORT7

COMM1(RX) COMM1(TX) -

PORT8

-

64

GIO

17

GIO

ADC

-

-

65

GIO

18

GIO

ADC

-

OS

LED1

-

19

GIO

ADC

-

OS

LED2

-

20

GIO

ADC

-

21

GIO

ADC

-

22

GIO

ADC

-

23

GIO

ADC

-

24

GIO

ADC

-

25

GIO

ADC

-

26

GIO

ADC

27

GIO

ADC

28

GIO

ADC

-

PORT2

PORT3

29

GIO

ADC

-

30

GIO

ADC

-

31

GIO

ADC

-

32

GIO

ADC

-

33

GIO

D8

34

GIO

D7

35

GIO

D6

36

GIO

PWM (5)

37

GIO

PWM (4)

D5 D4

38

GIO

PWM (3)

D3

39

GIO

PWM (2)

D2

40

GIO

PWM (1)

D1

PORT4

41

GIO

D10

42

GIO

D11

43

GIO

D12

44

GIO

45

GIO

D14

46

GIO

D15

16bit Data Bus Line

D13 PORT5

47

GIO

COMM4 (RX)

48

GIO

COMM4 (TX)

D16

REV.ED17 | MARCH 2012 RELEASE |P a g e | 13


Board Dimension

REV.E | MARCH 2012 RELEASE |P a g e | 14


OLED OLED COMMAND REFERENCE COMMAND REFERENCE

REV.E | MARCH 2012 RELEASE |P a g e | 15


OLED command reference OLED

The following pages list the members in the library available to interface with the 2.83” OLED Display with Touch Screen Board. Ready methods like playing audio files, printing text to screen, drawing primitives or even placing bitmaps to the screen are available for immediate usage. Examples of use are also included.

OLED Part of the Sonata IDE library for the BlazingCore OS consists of optimized methods to control the OLED natively to ensure efficiency and speed of data transfer to the OLED Driver.

Method

Description

Init() Foreground Background Clear() Orientation Cursor FontType Print Draw UI Touch Accel Audio GRAM

Does the necessary one-time initialization of the OLED with a specified colour Set Foreground colour Set Background colour Clears the screen Set the orientation of the screen to portrait or landscape Get or Set the Cursor Position Set the Font Size Print text to OLED Graphic library for drawing Primitives and Bitmaps to Screen *refer to subtopic for details. User Interface Library consisting of UI Components like an Onscreen-Keyboard Provides access to reading values from the touch screen Provides Access to reading values from the onboard accelerometer Audio Library for playing sounds from the OLED Board Provides Read-Only Access to the Graphics RAM Provides read abilities to the OLED driver (S6E63D6) registers¹ Provides write abilities to the OLED driver (S6E63D6) registers¹ Provides access to the libraries supported by the peripheral core processor on the OLED

ReadRegister WriteRegister PCore

¹ Please refer to S6E63D6 Driver IC Datasheet for full register listing.

.Init() Does the necessary one-time initialising required for the OLED to be controlled thereafter. Parameter accepts colour for the OLED screen to be initialised with. *Note: Colour listing available. Please refer to the page on using colour constants. OLED.Init(colour)

Code: 'CODE1 Public Sub Main() 'INIT THE OLED AND SET THE BACKGROUND COLOUR TO BLACK OLED.Init(Const.Colour.Black) End Sub

REV.E | MARCH 2012 RELEASE |P a g e | 16


OLED command Reference OLED | FOREGROUND | BACKGROUND | CLEAR | ORIENTATION

.foreground Get/Set the foreground colour of the OLED. OLED.Foreground.Colour

Code: 'CODE1 Public Sub Main() 'INIT THE OLED AND SET THE BACKGROUND COLOUR TO BLACK OLED.Init(Const.Colour.Black) OLED.Foreground.Colour = Const.Colour.Fuschia OLED.Print “Hello World!” End Sub

.background Get/Set the background colour of the OLED. OLED.Background.COLOUR

Code: 'CODE1 Public Sub Main() 'INIT THE OLED AND SET THE BACKGROUND COLOUR TO BLACK OLED.Init( Const.Colour.Black ) ‘CHANGE THE BACKGROUND COLOUR TO FUSCHIA OLED.Background.Colour = Const.Colour.Fuschia End Sub

.Clear() Clears the screen. OLED.Clear()

.ORIENTATION Get/Set the orientation of the OLED screen to portrait or landscape. OLED.Orientation Parameter/s: Orientation; 0: Landscape (Default) 1: Portrait

Code: 'CODE1 Public Sub Main() OLED.Orientation = Const.OLED.Landscape End Sub

REV.E | MARCH 2012 RELEASE |P a g e | 17


OLED command Reference OLED | CURSOR | FONT TYPE |PRINT

.cursor Get or Set the Cursor Position

Member

Description

X Y Home

Set X coordinate of cursor Set Y coordinate of cursor Sets the cursor to (0,0) position

To set the cursor position; OLED.Cursor.X = value OLED.Cursor.Y = value OLED.Cursor.Home()

Value: Any literal, constant, or expression To get the cursor position; value = OLED.Cursor.X value = OLED.Cursor.Y

.fonttype Sets the font size of text printed to the screen. Available font sizes are 8x8, 10x12, 16x16 pixels OLED.FontType Assignment • OLED.FontType = font size; 0 = 8x8 pixel; 1 =10x12 pixel; 2 = 16x16 pixel A BCore Constant that stores the font size values is available to make the code more readable. The following shows a code comparison on how to set the font size using direct assignment of values and using the BCore Constants. Both codes achieve the same effect.

Code:

Code:

OLED.FontType = 0 OLED.FontType = 1 OLED.FontType = 2

OLED.FontType = Const.Font.Small OLED.FontType = Const.Font.Medium OLED.FontType = Const.Font.Large

.print Prints text to screen using specified foreground colour. Works just like Debug.Print. *Note: Default text size is 8x8pixels. OLED.Print “[string]” | String Variable | String Const *Full set of 256 ASCII characters supported.

REV.E | MARCH 2012 RELEASE |P a g e | 18


OLED command Reference OLED | DRAW

.DRAW Uses inbuilt native libraries in BCore to draw primitives and bitmaps on to the screen. All primitives are drawn using the specified foreground colour. Note: All drawing methods conform to OLED’s current orientation setting.

Method

Description

Point Points Line Lines Rectangle FillRectangle Circle BitmapFromDFlash BitmapFromMCard

Plots a pixel at a specified point on the OLED Screen Plots an array of points. Draws a Line. Draws an array of Lines. Draws a Rectangle of specified sizing at a specified position. Draws a Filled Rectangle of specified sizing at a specified position. Draws a Circle of specified sizing at a specified position. Draws a bitmap file from the data flash memory chip. Draws a bitmap from External Memory Card (MMC) to the Screen

ORIENTATION **A note on orientation. All coordinates used to display fonts/drawing/bitmaps correspond to the axes as shown, respective to the orientation that the OLED is set. Default: Horizontal.

Horizontal (Default)

Vertical

REV.E | MARCH 2012 RELEASE |P a g e | 19


OLED command Reference OLED | Draw | Primitives

.POINT Plots a single pixel at a specified point on the OLED Screen. Point1 <x1, y1>

OLED.Draw.Point(point)

.POINTs Plots an array of pixels. Points(1) <x1, y1>

Parameters: • Points() = point array; • Zero-offset start = zero-offset start index of point array to start plotting from; • Number of points = number of points to plot.

Points(2) <x2, y2> Points(0) <x0, y0> Points(3) <x3, y3>

OLED.Draw.Points(points(),zero-offset start, number of points)

.LINE

Point2 <x2, y2>

Draws a Line from point1 to point2 on the OLED Screen. OLED.Draw.Line(point1, point2) Point1 <x1, y1>

.LINEs Draws an array of points as a continuous connected line. Parameters: • Points() = point array; • Zero-offset start = zero-offset start index of point array to start plotting from; • Number of points = number of points to plot.

Points(1) <x1, y1> Points(2) <x2, y2> Points(0) <x0, y0> Points(3) <x3, y3>

OLED.Draw.Lines(points(),zero-offset start, number of points)

Point1 <x1, y1>

x

.Rectangle Draws a Rectangle using 2 points.

x

OLED.Draw.Rectangle(point1, point2)

Point2 <x2, y2>

.fillrectangle Draws a solid/filled rectangle of foreground colour from point1 to point2 on the OLED Screen.

Point1 <x1, y1>

x

OLED.Draw.FillRectangle(point1, point2)

x

Point2 <x2, y2>

.circle Draws a circle. Parameters accept center point position and radius of circle. OLED.Draw.Circle(center-point, radius)

REV.E | MARCH 2012 RELEASE |P a g e | 20

Center-point R <x,y>


OLED command Reference OLED | DRAW | Bitmaps

Drawing Bitmaps to screen Storage and Rendering of Bitmap files are supported by the BCore OS. However, due to the nature of bitmap files, they tend to require a large amount of memory. As such, Bitmaps are only allowed to be stored on External Memory Cards (like MMC Cards), or the external DataFlash chip. Depending on where you store your Bitmap Files, a single line command is able to fetch the image file and draw it onto the OLED screen, provided it is given the correct information. Please note: The commands to draw bitmaps to screen returns a value and must be assigned to a variable. This value will indicate if there has been any error during file fetching and/or drawing to the screen. Value ‘0’: Successful Value ‘1’: Error Note: ¹Bitmaps must be in Windows® Bitmap .bmp format. ²Bitmaps of bit depth 16bit 565 Mode, 24bpp, 32bpp are supported. ³For applications that require the OLED to update images really quickly, we recommend that the bitmaps are first converted to the 16bit 565 RGB Format before importing it into the storage media for the BCore to access, since 24bpp and 32bpp files are converted by the chip to the 16bit 565 format before sending to the OLED Display, thereby imposing a limitation to the update rate from the BCore to the OLED Display.

.Bitmapfromdflash Draws a bitmap on the OLED screen from a .bmp file stored in the external DataFlash chip. Code: Dim P1 As Point Public Sub Main() Dim I1 As Integer DEBUG.PRINT "OLED - BITMAP" DELAY(200) OLED.INIT(0) OLED.SETCOLOUR.FOREGROUND(31) I1 = ADDRESSOF(DATA1.B_PLAYER) P1.X = 50 P1.Y = 20 OLED.DRAW.BitmapFromDFlash(P1, I1) End Sub

Note: Please refer to APPENDIX A for more details on transferring Bitmap Files from the PC to the BCore’s External DataFlash.

.BitmapfromMCard Draws a bitmap on the OLED screen from a .bmp file stored in the External Memory Card (MMC / SD Compatible). <variable> =

OLED.Draw.BitmapFromMCard(ByRef FileName As String, ByRef Position As Point)

Parameters: • FileName: Name of Bitmap File in String • Position: Point XY location to draw bitmap Returns: MCard File Operation Result

Code: Dim P1 As Point Public Sub Main() Dim I As Integer Dim STR1 AS STRING OLED.INIT(0) OLED.SETCOLOUR.FOREGROUND(31) I = OS.MEMCARD.INIT() STR1 = "B_PLAYER.BMP" P1.X = 50 P1.Y = 20 I = OLED.Draw.BitmapFromMCard(STR1, P1) End Sub

REV.E | MARCH 2012 RELEASE |P a g e | 21


Bi

OLED command Reference

OLED | UI

.UI User Interface Library consisting of UI Components like an Onscreen-Keyboard Note: Keypad Display conforms to Orientation Setting

Member

Description

Init Keypad Entry

Initialise User Interface with the specified Mode Provides access to methods for the Keypad region of the Onscreen Keyboard Provides access to methods for the Entry region of the Onscreen Keyboard

.Init Initialise User Interface with the specified Mode OLED.UI.Init(ByVal Block As Integer, ByVal Mode As Integer) Parameters; Block: Block Number in the Data Flash Chip containing the files used for the UI Mode: Colour Scheme

.Keypad Provides access to methods for the Keypad region of the Onscreen Keyboard

Member

Description

Hide Show

Hide the Keypad region with a specified colour Show the Keypad with a specified mode

.HIDE Hide the Keypad region with a specified colour OLED.UI.Keypad.Hide(ByVal Colour As Integer) Parameters; Colour: Colour Value used to hide the Keypad region

.SHOW Show the Keypad with a specified mode OLED.UI.Keypad.Show(ByVal Mode As Integer) Parameter/s; Mode: ‘0’: Captital/Uppercase Alphabetical Letters ‘1’: Lowercase Alphabetical Letters ‘2’: Numerical

REV.E | MARCH 2012 RELEASE |P a g e | 22


Bi

OLED command Reference

OLED | UI | ENTRY

.ENTRY Provides access to methods for the Keypad region of the Onscreen Keyboard

Member

Description

Hide Display GetKey

Hide the Entry region with a specified colour Display the Entry Field with a specified String value Poll the Keyboard for keys pressed

.HIDE Hide the Entry region with a specified colour OLED.UI.Entry.Hide(ByVal Colour As Integer) Parameters; Colour: Colour Value used to hide the Keypad region

.DISPLAY Display the Entry Field with a specified String value OLED.UI.Entry.Display(ByVal Data As String) Parameter/s; Data: String variable of keys obtained from onscreen keyboard to display in the entry field.

.GETKEY Poll the Keyboard for keys pressed <variable> = OLED.UI.Entry.GetKey( ) As Integer Returns: Value of Key Pressed

REV.E | MARCH 2012 RELEASE |P a g e | 23


OLED command Reference Touch Screen

.Touch Provides access to touch screen methods.

Member

Description

X Y

Returns optimized X coordinate of touch Returns optimized Y coordinate of touch X Returns Raw Value of X Y Returns Raw Value of Y

Raw

X Returns calculated X coordinate of a touch on the touch screen. <variable> = OLED.Touch.X()

Y Returns calculated Y coordinate of a touch on the touch screen. <variable> = OLED.Touch.Y() Code: Public X,Y as Integer Public Sub Main() Do X = OLED.Touch.X() Y = OLED.Touch.Y() Debug.Print Cstr(X);" ";Cstr(Y) Delay(200) Loop End Sub

X.raw Returns raw X coordinate of a touch on the touch screen. <variable> = OLED.Touch.X.Raw()

Y.raw Returns raw Y coordinate of a touch on the touch screen. <variable> = OLED.Touch.Y.Raw()

0,0

0,240

320,0

~100,120

~950,120

240,320

~100,910

~950,910

Optimized Values

Raw Values

REV.E | MARCH 2012 RELEASE |P a g e | 24


OLED command Reference Accelerometer | Audio

.accel Provides Access to methods for reading values from the onboard accelerometer. *As of REV.2, the former MMA7260QT accelerometer has been replaced with part number ADXL335. For applications that require specific technical information, please refer to both ADXL335 Datasheet as well as our OLED hardware datasheet.

Member

Description

X Y Z

Get X axis reading Get Y axis reading Get Z axis reading

<variable> = OLED.Accel.X() <variable> = OLED.Accel.Y() <variable> = OLED.Accel.Z()

Code: Public X,Y,Z as Integer Public Sub Main() Do X = OLED.Accel.X() Y = OLED.Accel.Y() Z = OLED.Accel.Z() Debug.Print Cstr(X);" ";Cstr(Y);" ";Cstr(Z) Delay(200) Loop End Sub

REV.E | MARCH 2012 RELEASE |P a g e | 25


OLED command Reference Audio

.Audio Provides Access to methods for playing audio sound files from the OLED Board. The OLED Audio segment for both hardware and software currently supports dual channel playing of sound files. What this means is that you can have 2 different sound files playing at the same time.

Member

Description

Reset ChDir Volume Ch1 Ch2

Resets the Audio Chip on the OLED Board Change current directory within the external memory card Change the current volume at which the sound files are playing Provides access to members for playing sound files in Channel 1 Provides access to members for playing sound files in Channel 2

.RESET Resets the Audio Chip on the OLED Board. OLED.Audio.Reset()

.CHDIR Change current directory within the external memory card. OLED.Audio.ChDir(ByVal DirNum As Integer) Parameter/s; DirNum: Directory Number within the MCard(MMC/microSD)

.Volume Change the current volume at which the sound files are playing

Member

Description

Up Down

Increase the Volume of the sound from the OLED Board by 1 Decrease the Volume of the sound from the OLED Board by 1

.UP Increase the Volume of the sound from the OLED Board by 1 OLED.Audio.Volume.Up()

.Down Decrease the Volume of the sound from the OLED Board by 1 OLED.Audio.Volume.Down()

REV.E | MARCH 2012 RELEASE |P a g e | 26


OLED command Reference Audio

.Ch1/ Ch2 Provides access to members for playing sound files in Channel 1 or 2

Member

Description

Load Play Pause Stop

Load specified sound file into selected channel Play current loaded sound file Pause currently playing sound file Stop currently playing sound file

.Load Load specified sound file into selected channel OLED.Audio.Ch1.Load(ByVal FileNum As Integer) OLED.Audio.Ch2.Load(ByVal FileNum As Integer) Parameter/s; FileNum: Number assigned to sound file located in the MCard (MMC/microSD)

.Play Play current loaded sound file OLED.Audio.Ch1.Play() OLED.Audio.Ch2.Play()

.Pause Pause currently playing sound file OLED.Audio.Ch1.Pause() OLED.Audio.Ch2.Pause()

.Stop Stop currently playing sound file OLED.Audio.Ch1.Stop() OLED.Audio.Ch2.Stop()

REV.E | MARCH 2012 RELEASE |P a g e | 27


OLED command Reference GRAM

.GRAM The pixels displayed on the OLED screen correspond to the image data stored in the Graphics RAM (GRAM). Read access to the OLED GRAM is provided to the user. Read the colour data direct from GRAM, by providing the position to read. Read command returns the colour in 16bit 565 RGB Integer format.

Member

Submember

Description

Read

Point Rectangle

Returns the colour value from a single point in the GRAM Returns the colour values from a specified rectangular area in the GRAM into a specified user declared integer array.

<variable> = OLED.GRAM.Read.Point(point) <variable> = OLED.GRAM.Read.Rectangle(memoryArr(),point1,point2) Parameter/s: memoryArr(); User declared single or 2 dimensional integer array to store the colour values read from the GRAM Users are expected to ensure that the memory allocation of the Integer Array is sufficient to store the total number of points being read to it Data from specified area will be stored in a continuous stream inside the integer array. Any row alignments (applicable only to 2 dimensional arrays) will be automatically done. point1 Starting point of Rectangle (0,0) ……. point2 X Axis (0,0) (320,0) Ending point of Rectangle …….

Y Axis

(0,240)

.READRegister Returns the contents of the OLED driver (S6E63D6) register at a specified address. <variable> = OLED.ReadRegister(Address)

.WriteRegister Provides write abilities to the OLED driver (S6E63D6) registers ¹ Please refer to S6E63D6 Driver IC Datasheet for full register listing. OLED.WriteRegister(Address, Value)

REV.E | MARCH 2012 RELEASE |P a g e | 28

GRAM


OLED command Reference PCore

.PCore Provides access to the libraries supported by the peripheral core processor on the OLED. *Currently, the Peripheral Core provides access to the PWM Servo Pins on the OLED Board.

Member

Submember

Description

Servo1/ Servo2/ Servo3/ Servo4

Position

Set Servo Motor to specified Position

OLED.PCore.Servo1/2/3/4.Position(ByVal Position As Integer) Parameter/s: Position: Desired position using pulse width in microseconds(us)

REV.E | MARCH 2012 RELEASE |P a g e | 29


Notes Latest documentation All of our documentations are constantly updated to provide accurate and/or new information that we feel would help you with developing with our products. The latest documentation may be obtained from our website: http://www.aiscube.com/main/downloads.html How you can help You can help us to improve our documentations by emailing to us or posting a thread in our forum, reporting any mistakes/typos or errata that you might spot while reading our documentation. Email: TechSupport@aiscube.com Forum: http://forum.aiscube.com/index.php

Disclaimer All information in this documentation is provided ‘as-is’ without any warranty of any kind. The products produced by AIS Cube are meant for rapid prototyping and experimental usage; they are not intended nor designed for implementation in environments that constitute high risk activities. AIS Cube shall assume no responsibility or liability for any indirect, specific, incidental or consequential damages arising out of the use of this documentation or product.

Copyright 2012 AIS Cube. All rights reserved. All product and corporate names appearing in this documentation may or may not be registered trademarks or copyrights of their respective companies, and are only used for identification or explanation for the owner’s benefit, with no intent to infringe. Sonata ide and BlazingCore(BCore) are trademarks of AIS Cube in Singapore and/or other countries. All images depicting the Blazingcore anyRELEASE part of it|Pisacopyrighted. REV.E | MARCH or 2012 g e | 30 All other trademarks or registered trademarks are the property of their respective owners.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.