This is the quick start guide for the SAM4L Liquid Crystal Display (LCDCA) Driver, with step-by-step instructions on how to configure and use the driver for a specific use case.
The use cases contain several code fragments. The code fragments in the steps for setup can be copied into a custom initialization function, while the steps for usage can be copied into, for example, the main application function.
This use case will demonstrate how to configure and use the LCDCA module to address an external LCD segment (C42048A).
This module requires the following services:
Add these code segments to the main loop, or to a setup function in your application's C-file:
#define PORT_MASK 40 #define LCD_DUTY LCDCA_DUTY_1_4 #define LCD_CONTRAST_LEVEL 30 struct lcdca_config lcdca_cfg;
The following functions can be used to set/clear/toggle one pixel/segment:
The function lcdca_write_packet() can be used to display ASCII characters:
The LCD contrast can be changed using:
To use hardware blinking:
To use the hardware's autonomous segment animation:
To use hardware automated character (e.g., scrolling here):