Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
DISPLAY - LCD Display - DIP204B-4ORT01

Driver for Ortek DIP204B-4ORT01 LCD module (4*20 characters).

Provides functions for initialization, controlling back-light, and writing characters and strings to the display.

Enumerations

enum  backlight_options {
  backlight_IO = 0,
  backlight_PWM
}
 
enum  backlight_power {
  backlight_power_increase = 0,
  backlight_power_decrease
}
 

Functions

void dip204_clear_display (void)
 
void dip204_create_char (char ascii_code, const unsigned char data[8])
 
void dip204_hide_cursor (void)
 
void dip204_init (backlight_options option, bool backlight_on)
 
void dip204_printf_string (const char *format,...)
 
void dip204_read_data (unsigned char *data)
 
void dip204_set_backlight (backlight_power power)
 
void dip204_set_cursor_position (unsigned char column, unsigned char line)
 
void dip204_show_cursor (void)
 
void dip204_write_data (unsigned char data)
 
void dip204_write_string (const char *string)
 

type for Backlight options : use PWM or IO to drive the backlight

Enumerator
backlight_IO 
backlight_PWM 

type for Backlight power : increase or decrease the backlight

Enumerator
backlight_power_increase 
backlight_power_decrease 

void dip204_clear_display ( void  )

Clear the LCD screen (need void delay_ms(unsigned short time_ms) function to perform active wait)

References delay_ms, dip204_select(), dip204_unselect(), dip204_wait_busy(), dip204_write_byte(), and DIP204_WRITE_COMMAND.

void dip204_create_char ( char  ascii_code,
const unsigned char  data[8] 
)

Create a new ASCII character

Parameters
ascii_codeInput. ascii code of the new character. Must fit in the range [0; 7].
dataInput. pixel map of the character. It is composed of 5 columns and 8 lines.

References DIP204_CGRAM_BASE_ADDR, dip204_read_byte(), DIP204_READ_COMMAND, dip204_select(), dip204_set_cursor_position(), dip204_unselect(), dip204_wait_busy(), dip204_write_byte(), DIP204_WRITE_COMMAND, and DIP204_WRITE_DATA.

void dip204_hide_cursor ( void  )
void dip204_printf_string ( const char *  format,
  ... 
)

Write a formatted string

Parameters
formatInput. Formatted null terminated string to display

References dip204_select(), dip204_unselect(), dip204_wait_busy(), dip204_write_byte(), and DIP204_WRITE_DATA.

void dip204_read_data ( unsigned char *  data)

Read data at current position

Parameters
dataOutput. data read at current position

References dip204_read_byte(), DIP204_READ_DATA, dip204_select(), dip204_unselect(), dip204_wait_busy(), and dip204_write_byte().

void dip204_set_backlight ( backlight_power  power)
void dip204_set_cursor_position ( unsigned char  column,
unsigned char  line 
)

Set cursor to given position

Parameters
columnInput. Column where to set cursor (from 1 to 20).
lineInput. Line where to set cursor (from 1 to 4).

References dip204_select(), dip204_unselect(), dip204_wait_busy(), dip204_write_byte(), and DIP204_WRITE_COMMAND.

Referenced by dip204_create_char(), dip204_example_Joy_int_handler(), dip204_example_PB_int_handler(), and main().

void dip204_show_cursor ( void  )
void dip204_write_data ( unsigned char  data)

Write a byte at current position

Parameters
dataInput. data to display

References dip204_select(), dip204_unselect(), dip204_wait_busy(), dip204_write_byte(), and DIP204_WRITE_DATA.

Referenced by dip204_example_Joy_int_handler(), and dip204_example_PB_int_handler().

void dip204_write_string ( const char *  string)

Write a string

Parameters
stringInput. null terminated string to display

References dip204_select(), dip204_unselect(), dip204_wait_busy(), dip204_write_byte(), and DIP204_WRITE_DATA.

Referenced by dip204_example_Joy_int_handler(), dip204_example_PB_int_handler(), and main().