Wim Huiskamp / PT6964

Dependents:   mbed_PT6964

Embed: (wiki syntax)

« Back to documentation index

PT6964_DVD538A Class Reference

Constructor for class for driving Princeton PT6964 controller as used in DVD538A. More...

#include <PT6964.h>

Inherits PT6964.

Public Types

enum  Icon
 

Enums for Icons.

More...
enum  Mode
 

Enums for display mode.

More...
typedef char DisplayData_t [PT6964_DISPLAY_MEM]
 Datatypes for display and keymatrix data.

Public Member Functions

 PT6964_DVD538A (PinName mosi, PinName miso, PinName sclk, PinName cs)
 Constructor for class for driving Princeton PT6964 VFD controller as used in DVD538A.
int putc (int c)
 Write a character to the Display.
int printf (const char *format,...)
 Write a formatted string to the Display.
void locate (int column)
 Locate cursor to a screen column.
void cls (bool clrAll=false)
 Clear the screen and locate to 0.
void setIcon (Icon icon)
 Set Icon.
void clrIcon (Icon icon)
 Clr Icon.
void setUDC (unsigned char udc_idx, int udc_data)
 Set User Defined Characters (UDC)
int columns ()
 Number of screen columns.
void writeData (DisplayData_t data, int length=(DVD538A_NR_GRIDS *2))
 Write Display datablock to PT6964.
void cls ()
 Clear the screen and locate to 0.
void writeData (int address, char data)
 Write databyte to PT6964.
bool getKeys (KeyData_t *keydata)
 Read keydata block from PT6964.
void setBrightness (char brightness=PT6964_BRT_DEF)
 Set Brightness.
void setDisplay (bool on)
 Set the Display mode On/off.

Protected Member Functions

virtual int _putc (int value)
 Write a single character (Stream implementation)

Detailed Description

Constructor for class for driving Princeton PT6964 controller as used in DVD538A.

Supports 4 Digits of 7 Segments, 1 Grid of 9 Icons. Also supports a scanned keyboard of 4 keys.

Parameters:
PinNamemosi, miso, sclk, cs SPI bus pins

Definition at line 240 of file PT6964.h.


Member Typedef Documentation

typedef char DisplayData_t[PT6964_DISPLAY_MEM] [inherited]

Datatypes for display and keymatrix data.

Definition at line 143 of file PT6964.h.


Member Enumeration Documentation

enum Icon

Enums for Icons.

Definition at line 245 of file PT6964.h.

enum Mode [inherited]

Enums for display mode.

Definition at line 135 of file PT6964.h.


Constructor & Destructor Documentation

PT6964_DVD538A ( PinName  mosi,
PinName  miso,
PinName  sclk,
PinName  cs 
)

Constructor for class for driving Princeton PT6964 VFD controller as used in DVD538A.

Constructor for class for driving Princeton PT6964 controller as used in DVD538A.

Supports 4 Digits of 7 Segments, 1 Grid of 9 Icons. Also supports a scanned keyboard of 4 keys.

Parameters:
PinNamemosi, miso, sclk, cs SPI bus pins

Supports 4 Digits of 7 Segments, 1 Grid of 9 Icons. Also supports a scanned keyboard of 4.

Parameters:
PinNamemosi, miso, sclk, cs SPI bus pins

Definition at line 240 of file PT6964.cpp.


Member Function Documentation

int _putc ( int  value ) [protected, virtual]

Write a single character (Stream implementation)

Definition at line 366 of file PT6964.cpp.

void clrIcon ( Icon  icon )

Clr Icon.

Parameters:
Iconicon Enums Icon has Grid position encoded in 8 MSBs, Icon pattern encoded in 16 LSBs
Returns:
none

Definition at line 333 of file PT6964.cpp.

void cls ( bool  clrAll = false )

Clear the screen and locate to 0.

Parameters:
boolclrAll Clear Icons also (default = false)

Definition at line 288 of file PT6964.cpp.

void cls (  ) [inherited]

Clear the screen and locate to 0.

Definition at line 66 of file PT6964.cpp.

int columns (  )

Number of screen columns.

Parameters:
none
Returns:
columns

Definition at line 280 of file PT6964.cpp.

bool getKeys ( KeyData_t *  keydata ) [inherited]

Read keydata block from PT6964.

Parameters:
*keydataPtr to Array of PT6964_KEY_MEM (=5) bytes for keydata
Returns:
bool keypress True when at least one key was pressed

Note: Due to the hardware configuration the PT6964 key matrix scanner will detect multiple keys pressed at same time, but this may result in some spurious keys also being set in keypress data array. It may be best to ignore all keys in those situations. That option is implemented in this method depending on define setting.

Parameters:
*keydataPtr to Array of PT6964_KEY_MEM (=5) bytes for keydata
Returns:
bool keypress True when at least one key was pressed

Note: Due to the hardware configuration the PT6964 key matrix scanner will detect multiple keys pressed at same time, but this may also result in some spurious keys being set in keypress data array. It may be best to ignore all keys in those situations. That option is implemented in this method depending on define setting.

Definition at line 156 of file PT6964.cpp.

void locate ( int  column )

Locate cursor to a screen column.

Parameters:
columnThe horizontal position from the left, indexed from 0

Definition at line 266 of file PT6964.cpp.

int printf ( const char *  format,
  ... 
)

Write a formatted string to the Display.

Parameters:
formatA printf-style format string, followed by the variables to use in formatting the string.
int putc ( int  c )

Write a character to the Display.

Parameters:
cThe character to write to the display
void setBrightness ( char  brightness = PT6964_BRT_DEF ) [inherited]

Set Brightness.

Parameters:
charbrightness (3 significant bits, valid range 0..7 (1/16 .. 14/14 dutycycle)
Returns:
none

Definition at line 85 of file PT6964.cpp.

void setDisplay ( bool  on ) [inherited]

Set the Display mode On/off.

Parameters:
booldisplay mode

Definition at line 96 of file PT6964.cpp.

void setIcon ( Icon  icon )

Set Icon.

Parameters:
Iconicon Enums Icon has Grid position encoded in 8 MSBs, Icon pattern encoded in 16 LSBs
Returns:
none

Definition at line 315 of file PT6964.cpp.

void setUDC ( unsigned char  udc_idx,
int  udc_data 
)

Set User Defined Characters (UDC)

Parameters:
unsignedchar udc_idx The Index of the UDC (0..7)
intudc_data The bitpattern for the UDC (16 bits)

Definition at line 352 of file PT6964.cpp.

void writeData ( DisplayData_t  data,
int  length = (DVD538A_NR_GRIDS*2) 
)

Write Display datablock to PT6964.

Parameters:
DisplayData_tdata Array of PT6964_DISPLAY_MEM (=14) bytes for displaydata (starting at address 0)
lengthnumber bytes to write (valid range 0..(DVD538A_NR_GRIDS*2) (=14), starting at address 0)
Returns:
none

Reimplemented from PT6964.

Definition at line 327 of file PT6964.h.

void writeData ( int  address,
char  data 
) [inherited]

Write databyte to PT6964.

Parameters:
intaddress display memory location to write byte
chardata byte written at given address
Returns:
none

Definition at line 113 of file PT6964.cpp.