Microchip ATtiny1617 Configurable Custom Logic Night Light Application Note

This application note shows how to use the ATtiny1617's Configurable Custom Logic to create a night‑light that operates independently of the CPU.


Microchip ATtiny1617 Configurable Custom Logic Night Light Application Note - cover page
Brand
MICROCHIP
Category
Other Electronics
Document type
Application Note
Language
Chinese
Pages
19
File format
PDF
File size
607 KB
Published
29 September, 2026
Updated
29 September, 2026
MD5 checksum
1C6F073059A86A24FC51C6C19DF93E0C

About this manual

The note describes a night‑light implementation that uses the ATtiny1617's Configurable Custom Logic (CCL) to process inputs from a passive infrared (PIR) sensor and an ambient light sensor. The CCL operates without CPU intervention, turning the LEDs on only when the environment is dark and motion is detected.

Hardware includes a STK600 development board, a HC‑SR505 mini PIR sensor, a TEMT6000 ambient light sensor, and a WS2812B‑16 addressable RGB LED strip. Connections and CCL configuration details are provided, along with example code and guidance for modifying the number of LEDs. This manual is written in Chinese.

What's inside

  • Introduction
  • Related Devices
  • Components
  • Implementation
  • System Overview
  • Connections
  • CCL Configuration
  • LUT0 Configuration
  • LUT1 Configuration
  • Program Flow

Specifications

Timer/Counter Type A (TCA0)16‑bit
SPI interfaceSPI0
Analog comparatorAC0
Digital‑to‑Analog ConverterDAC
EEPROM data memorypresent
Number of addressable RGB LEDs16 (default)

Frequently asked questions

How does the night light decide when to turn on?

It uses the Configurable Custom Logic to monitor the PIR sensor and ambient light sensor, lighting the LEDs only when the environment is dark and motion is detected.

Can the number of LEDs be changed?

Yes, the default is 16 LEDs, but the count can be changed by modifying the Number_of_LEDS variable in the source code.

Download PDF (607 KB)

More MICROCHIP Manuals


View all MICROCHIP manuals →