Skip to content

This code implements LED blinking using Timer0 interrupt on the STC8G1K17 microcontroller (part of the STC8G series). The LED connected to P1.0 toggles every 500ms using precise timer interrupts rather than inefficient delay loops.

License

Notifications You must be signed in to change notification settings

notpast/STC_LED_Blink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STC8G1K17 LED Blink with Timer Interrupt

🚀 Quick Setup

  1. Open the .cbp file in Code::Blocks
  2. Build the project - SDCC will compile automatically
  3. Upload using STC-ISP:   - Click "Download/Program"   - Immediately power cycle the MCU
  4. LED on P1.0 will blink every 500ms

🔧 Project Info

IDE: Code::Blocks with SDCC integration MCU: STC8G1K17 (24MHz internal clock) Method: Timer0 interrupt (no delay loops) Pin: LED connected to P1.0


⚡ Key Features

  • ✅ Precise hardware timing via Timer0
  • ✅ Non-blocking interrupt approach
  • ✅ Ready for multitasking expansion
  • ✅ Compatible with STC8G series

⚠️ Important Programming Note

Critical Step: After clicking "Download" in STC-ISP, immediately power cycle the MCU (connect/disconnect power) for successful programming.


Build → Power Cycle → Run! 🔄💡

Video link: https://www.youtube.com/watch?v=_zytU3Svc3g

About

This code implements LED blinking using Timer0 interrupt on the STC8G1K17 microcontroller (part of the STC8G series). The LED connected to P1.0 toggles every 500ms using precise timer interrupts rather than inefficient delay loops.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages