I have a few atmega8 laying around, bought over ten years ago. Powered by, pretty much, the same 8bit MCU like what’s in Arduino UNO, except, it has only 8k of flash and 1k of ram. It is, kinda, on a par with attiny85. There is only one catch, it doesn’t support PCINT like atmega328 does. An attiny85 would do this job perfectly, of course I would have to use i2c adapter for LCD0802 but, meh.
[Read more…]
Monday, May 27, 2019
UV Light box timer for PCB photo-resisting using atmega8
Tuesday, April 9, 2019
Understanding LED matrix scanning method
This entry is for someone that having basic electronics knowledge and want to understand how to control led matrix using Arduino UNO.
How do you control a led matrix?
Lets start with the basic: controlling 1 row of single-color LEDs
[Read more…]
Thursday, March 14, 2019
Turn off monitor - C++
My brother asked me how can he turn off the monitor. He showed me a PowerShell script
start powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2); exit
My reaction was “what the heck, seriously you can do that with PowerShel, like, invoke a function in a DLL file just like that?!”.
[Read more…]
Sunday, March 3, 2019
Programmatically upload code - atmega32u4 - VC++
I had a small project that need to deliver firmware for atmega32u4 for my customers. And of course, they aren’t tech-savvy like me. It was impossible to guide them to use arduino to flash directly using source code. More importantly, I don’t want to share my source code. There is only one option for me that build an avrdude wrapper that detect atmega32u4 and run avrdude automatically. This tutorial is about uploading firmware to atmega32u4 programmatically using AVR109 app note in Visual Studio.
[Read more…]