Archive for April 11th, 2006

Brad

Linux Kernel

Having been a Linux user for many years I’ve come to know a great deal about my preferred operating system. I truly believe the most enjoyable way to learn to use Linux is to tinker with every little thing until you figure out how it works. A good deal of my knowledge comes from endlessly playing with new programs and poking around in configuration files until I master whatever project that occupies my mind this week. I am driven by my determination to one day use Linux as my primary operating system, finally casting Windows off of my hard drives and banishing it to the nether-dimensions from whence it came. In the quest to gain total mastery over Linux I have kept clear of the one task that haunts my dreams and mocks my very existence…compiling the kernel.

For lots of Linux users the kernel is a dark and mysterious thing that should be worshipped as a god, lest it become angry and smite you. So when I was forced recently to recompile my kernel in an attempt to gain ACPI functionality on my new laptop, I was prepared to endure ritual and torment to appease the kernel god for a successful compile. Miraculously, after my fourth day of Googling in preparation for building my kernel, I stumbled across a wholly wonderful post on how to recompile the 2.6 kernel without the need for a blood sacrifice.

I have to tip my hat to the author as this is one of the easiest to read articles on how to compile a kernel ever brought my way by the wide and wonderful internet. After following the instructions, I made short work of my valiant task and was running my custom-compiled kernel in no time. One thing I must note however, is after building the kernel modules I simply needed to do a make install before the kernel would boot properly. I haven’t yet investigated whether this is a step exclusive to Mandriva 2006, or simply an oversight. If anyone out there would like to share their experience with this matter, please add a comment below.

Ok, so if you made it past the title, you’re doin’ good. The 16F877A is a microcontroller made by microchip, and I just happen to be using it at work.

Pulse-width modulation is a way of controlling the brightness of an LED, not through resistance, but rather through its duration of being lit. For instance, an LED at half brightness would be on for exactly 1/2 of the time. Basically, it would switch back and forth between on and off at an even pace.

Last night, I had to find a way to control the brightness of a strand of LEDs based only on a 0-7 value off of an analog potentiometer. By design, the maximum brightness for the LEDs will be 1/8 of their maximum ability. This was to reduce heat and fire hazard.

With PWM, since the LED’s on-time is inversely preportional to its off-time, the calculation was rather simple. At the maximum setting (7), the LEDs are on 1/8th of the time. So I made the total duty cycle 56 clock cycles. I then assigned ON_TIME = Knob_Setting and OFF_TIME = 56 – Knob_Setting. This created a whole duty cycle where the LED was on and off evenly with the knob setting.

Administrator

Windows Registry Edit List

I was doing my nightly round of surfing the entire interweb when I ran across this list of 300+ registry edits (regedits) for Windows XP. These are some neat hacks and tweaks you can do to WinXP. You may want to do a Registry Backup before you perform any of these regedits. I’m not responsible if you fubar your system by trying any of these registry edits.

WinXP Registry Backup
WinXP Registry Edits