From 7411fd2a137ef91f2718c1247eb3ef42b41a717f Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Tue, 27 Jan 2026 20:31:00 +0100 Subject: [PATCH] ili9341: added backlight handling via PWM (doesn't work with my displays). my displays don't accept PWM... --- avr/modules/lcd2/ili9341/backlight.asm | 57 ++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 avr/modules/lcd2/ili9341/backlight.asm diff --git a/avr/modules/lcd2/ili9341/backlight.asm b/avr/modules/lcd2/ili9341/backlight.asm new file mode 100644 index 0000000..d89c78f --- /dev/null +++ b/avr/modules/lcd2/ili9341/backlight.asm @@ -0,0 +1,57 @@ +; *************************************************************************** +; copyright : (C) 2026 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + +#ifndef AQH_AVR_ILI9341_BACKLIGHT_ASM +#define AQH_AVR_ILI9341_BACKLIGHT_ASM + +; doesn't work with my displays (seems to be binary: either on or off) + +; +; Uses timer 1, set to Fast PWM mode, prescaler 8 +; + +Display_BacklightInit: + sbi ILI9341_BACKLIGHT_DDR, ILI9341_BACKLIGHT_PIN + + ldi r16, (1<