Wim Huiskamp / PT6302

Dependents:   mbed_PT6302 mbed_PT6301

Embed: (wiki syntax)

« Back to documentation index

PT6302_HANNSTAR Class Reference

Constructor for class for driving Princeton PT6302 VFD controller as used in HANNSTAR. More...

#include <PT6302.h>

Inherits PT6302.

Public Types

enum  Mode
 

Enums for display mode.

More...

Public Member Functions

 PT6302_HANNSTAR (PinName mosi, PinName sclk, PinName cs)
 Constructor for class for driving Princeton PT6302 VFD controller as used in HANNSTAR.
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.
int columns ()
 Number of screen columns.
void setPort (char port=0)
 Set Port.
void setVGen (bool on=true)
 Set VFD VGen.
void cls ()
 Clear the screen.
void setBrightness (char brightness=PT6302_BRT_DEF)
 Set Brightness.
void setDisplay (bool on)
 Set the Display mode On/off.
void setUDC (unsigned char udc_idx, UDCData_t udc_data)
 Set User Defined Characters (UDC)
void writeData (char data, char address)
 Write Data to PT6302.
void writeAData (char adata, char address)
 Write Additional Data to PT6302.

Protected Member Functions

virtual int _putc (int value)
 Write a single character (Stream implementation)
virtual int _getc ()
 Get a single character (Stream implementation)
void _writeCmd (char cmd, char data)
 Write command and parameters to PT6302.
void _writeCmd (char cmd)
 Write command to PT6302.

Detailed Description

Constructor for class for driving Princeton PT6302 VFD controller as used in HANNSTAR.

Supports 16 Grids of 35 Segments without additional Segments.

Parameters:
PinNamemosi, sclk, cs SPI bus pins

Definition at line 387 of file PT6302.h.


Member Enumeration Documentation

enum Mode [inherited]

Enums for display mode.

Definition at line 236 of file PT6302.h.


Constructor & Destructor Documentation

PT6302_HANNSTAR ( PinName  mosi,
PinName  sclk,
PinName  cs 
)

Constructor for class for driving Princeton PT6302 VFD controller as used in HANNSTAR.

Constructor for class for Princeton PT6302 VFD controller as used in HANNSTAR.

Supports 16 Grids of 35 Segments without additional Segments.

Parameters:
PinNamemosi, sclk, cs SPI bus pins

Supports 16 Grids of 35 Segments without additional Segments.

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

Definition at line 271 of file PT6302.cpp.


Member Function Documentation

int _getc (  ) [protected, virtual]

Get a single character (Stream implementation)

Parameters:
none
Returns:
-1

Definition at line 403 of file PT6302.cpp.

int _putc ( int  value ) [protected, virtual]

Write a single character (Stream implementation)

Parameters:
valuechar to print
Returns:
value;

Definition at line 365 of file PT6302.cpp.

void _writeCmd ( char  cmd,
char  data 
) [protected, inherited]

Write command and parameters to PT6302.

Write command and data to PT6302.

Parameters:
charcmd Command byte
chardata Parameter for command
Returns:
none

Definition at line 206 of file PT6302.cpp.

void _writeCmd ( char  cmd ) [protected, inherited]

Write command to PT6302.

Parameters:
charcmd Command byte
Returns:
none

Definition at line 228 of file PT6302.cpp.

void cls ( bool  clrAll = false )

Clear the screen and locate to 0.

Parameters:
boolclrAll Clear Icons also (default = false)
boolclrAll Clear Icons also (default = false)
Returns:
none

Definition at line 308 of file PT6302.cpp.

void cls (  ) [inherited]

Clear the screen.

Parameters:
none
Returns:
none

Definition at line 82 of file PT6302.cpp.

int columns (  )

Number of screen columns.

Parameters:
none
Returns:
columns

Definition at line 298 of file PT6302.cpp.

void locate ( int  column )

Locate cursor to a screen column.

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

Definition at line 284 of file PT6302.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
Returns:
char written
void setBrightness ( char  brightness = PT6302_BRT_DEF ) [inherited]

Set Brightness.

Parameters:
charbrightness (3 significant bits, valid range 0..7 (dutycycle linked to number of grids)
Returns:
none
Parameters:
charbrightness (3 significant bits, valid range 0..7)
Returns:
none

Definition at line 100 of file PT6302.cpp.

void setDisplay ( bool  on ) [inherited]

Set the Display mode On/off.

Parameters:
booldisplay mode
Returns:
none

Definition at line 113 of file PT6302.cpp.

void setPort ( char  port = 0 )

Set Port.

Parameters:
charport (Only Bit 1 is used)
Returns:
none

Reimplemented from PT6302.

Definition at line 330 of file PT6302.cpp.

void setUDC ( unsigned char  udc_idx,
UDCData_t  udc_data 
) [inherited]

Set User Defined Characters (UDC)

Parameters:
unsignedchar udc_idx The Index of the UDC (0..7)
UDCData_tudc_data The bitpattern for the UDC (5 bytes)
Returns:
none

Definition at line 147 of file PT6302.cpp.

void setVGen ( bool  on = true )

Set VFD VGen.

Parameters:
boolon
Returns:
none

Definition at line 346 of file PT6302.cpp.

void writeAData ( char  adata,
char  address 
) [inherited]

Write Additional Data to PT6302.

Parameters:
charadata Additional code (annunciator)
charaddress Parameter for data
Returns:
none

Definition at line 191 of file PT6302.cpp.

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

Write Data to PT6302.

Parameters:
chardata Character code
charaddress Parameter for data
Returns:
none

Definition at line 176 of file PT6302.cpp.