Interface LCD with SAM L22 MCU Tutorial: Step 2

Step 2.1: Add SLCD, RTC and DMA drivers

1

Under Advanced Software Framework (ASF) Wizard, select 'saml22_slcd_lab' from the 'Project' drop-down menu. This shows the available and the default selected ASF modules.

asf_wizard.PNG
Click image to enlarge.

2

Select 'Drivers' from the 'Show' drop-down list. select and add 'SLCD - Segment Liquid Crystal Display controller(driver)'.

Asf_slcd.png

The SLCD Module enables to access the drivers for segment LCD.

3

Similarly select and add 'RTC - Real Time Counter Driver (driver)' and 'DMAC - Direct Memory Access Controller(driver)'.
Configure RTC in 'count_callback' mode and SLCD in 'polling' mode.

asf_RTC_DMAC.png
  • RTC module is enabled to maintain the time instance between sleep and wakeup mode.
  • DMAC enables data transfer from source memory to the LCD peripheral and used in this training for scrolling feature.

Step 2.2: Add Delay routines services

Select 'Services' from the 'Show' drop-down list.

Select and add 'Delay routines (service)'.

asf_dr.png

The delay system service is used for performing delay operations.

Step 2.3: Verify that the board specific modules are added automatically

The PORT, Generic board support and System drivers will be automatically added to the project based on the selected board (in this case SAML22 Xplained Pro Evaluation Kit).

1

Verify whether the board specific modules are added or not.

asf_bsp.png

Board support package, Clocks and GPIO's are configured based on the selected Evaluation board.

2

Click Apply to add the selected ASF modules to the project.

asf_apply.png

While the added modules are being applied to the project, if an information dialog box prompts, indicating the modules added, click on the OK button.

asf_ok.png

Instead of selecting the ASF modules from the drop down list, you may also find and add the required module by typing the name in the search text box.

asf_search.png

Step 2.4: Verify the added modules

On the right pane, click on the 'Solution Explorer' and observe that the source files for the selected modules are added to the project.

sol_explorer.png



Next Step >

© 2019 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.