Firstly, I thought that the rewrite_mod might not be installed on the server. But it's not the case. Finally, I have found that \xef\xbb\xbfRewriteEngine was the source of problem. It means .htaccess has wrong encoding. I opened .htaccess in Notepad and saved it with 'UTF-8' encoding. The problem is solved!. Now the site is up and running.
Thursday, December 4, 2008
.htacess needs UTF-8 encoding
Yesterday, I was setting up a Wordpress Mu site and getting only "500 Internal Error". I checked web server log file and found a lot of errors like below
Firstly, I thought that the rewrite_mod might not be installed on the server. But it's not the case. Finally, I have found that \xef\xbb\xbfRewriteEngine was the source of problem. It means .htaccess has wrong encoding. I opened .htaccess in Notepad and saved it with 'UTF-8' encoding. The problem is solved!. Now the site is up and running.
[Wed Dec 3 19:29:38 2008] [alert] [client xxx.xxx.37.222] /home/punkky/public_html/.htaccess: Invalid command '\xef\xbb\xbfRewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration
Firstly, I thought that the rewrite_mod might not be installed on the server. But it's not the case. Finally, I have found that \xef\xbb\xbfRewriteEngine was the source of problem. It means .htaccess has wrong encoding. I opened .htaccess in Notepad and saved it with 'UTF-8' encoding. The problem is solved!. Now the site is up and running.
Topics:
Wordpress Mu
Tuesday, December 2, 2008
LED 7-Segment Multiplexing
In my first Digital Clock, I use 6 pcs. of CD4543,BCD to 7-Segment decoder, to drive 6 digit LED 7-Segment display for the sake of simplicity of the software. However, the hardware needs many components. As you can see in the post, the PCB of the clock is quite big and containing a lot of solder points. To reduce the number of components, I will integrate the function of CD4543 into the firmware. One digit requires 7 connections (wires) for all segments and 1 connection for common cathode (or anode). If I connect 6 digits to the MCU without any modification, I will need 7-segment x 6 digit = 42 connections . That means I need to use MCU with atleast 42 I/O pins. As you know, it is a waste for using a lot of MCU pins just for display. The required pins can be reduced dramatically by using a technique called Multiplexing.
Multiplexing
Multiplexing technique is based on the idea of Persistence of vision of the human eyes. The sample schematic of 3 digits multiplexing is shown below. Segment a-g of each digit are connected together. Each digit is switched on-off by controlling signal at Digit 1, Digit 2 and Digit 3. For example, if Digit 1 is '1' , Digit 1 will be on. If Digit 1 is '0', Digit 1 will be off. People will see all 3 digits display in the same time if each digit switch on and off fast enough.
Multiplexing
Multiplexing technique is based on the idea of Persistence of vision of the human eyes. The sample schematic of 3 digits multiplexing is shown below. Segment a-g of each digit are connected together. Each digit is switched on-off by controlling signal at Digit 1, Digit 2 and Digit 3. For example, if Digit 1 is '1' , Digit 1 will be on. If Digit 1 is '0', Digit 1 will be off. People will see all 3 digits display in the same time if each digit switch on and off fast enough.

By using multiplexing technique the number of required connections for 6 digits display is reduced from 42 pins to 7-Segment+6 digits = 13 pins Wow!! I can drive 6 digits 7-segment display by using just a PIC16F627A.
Next time, I will post the program for LED 7-Segment Multiplexing
--- Updated 21 Dec 2008 --
The program for LED 7-Segment Multiplexing is now posted at 6 Digits LED 7-Segment Multiplexing
Topics:
7-Segment,
Multiplexing,
PIC16F627a,
PIC16F628
Saturday, November 22, 2008
Small Nixie Tube
I have a plan to build a Nixie Clock so I search for its information and blog it here for further reference.

IN-16 may be not the smallest nixie tube but it's small enough to make a nice desk top nixie clock. The character height is about 13mm. I will use IN-16 for my upcoming nixie clock. There are some nixie clock kits that use IN-16 nixie tube so I am thinking about buying a kit or building it from scratch.

IN-16 may be not the smallest nixie tube but it's small enough to make a nice desk top nixie clock. The character height is about 13mm. I will use IN-16 for my upcoming nixie clock. There are some nixie clock kits that use IN-16 nixie tube so I am thinking about buying a kit or building it from scratch.
The cheapest PIC with Internal Osc and I2C

I just got the above FM receiver module from SparkFun. It requires I2C interface. Actually, I2C can be implemented in software but I need I2C hardware so I can do something else in software. So, I went to microchip.com and searched for the cheapest PIC Microcontroller that comes with internal oscillator and I2C. Based on my search, PIC16F722 is the cheapest PIC with 16MHz internal osc. and I2C interface. Its price is $0.91 for 1000 pcs. I also found that PIC16F505 is the cheapest PIC that comes with internal oscillator (4MHz, $0.56/1000pcs.).
Anyway, I will develop my FM radio with PIC16F887 as I have it in hand.
Anyway, I will develop my FM radio with PIC16F887 as I have it in hand.
Topics:
FM Tuner,
Microcontroller
Wednesday, November 19, 2008
PCB for 7-Segment PIC Digital Clock
I have designed a single-sided PCB for the PIC Digital Clock. Because the autorouter is not good for routing single-sided PCB so I have to route by hand. It was my first hand routed PCB design and it was a time consuming task. I haven't tested the PCB yet. Use it by your own risk. I will produce this PCB and test it later.
As I don't have server to upload the Eagle file, please contact me if you want the file or PDF version of the image below.

Components side of the PCB. The red lines are jumpers.
As I don't have server to upload the Eagle file, please contact me if you want the file or PDF version of the image below.

Components side of the PCB. The red lines are jumpers.
Topics:
7-Segment,
Clock,
PCB,
PIC16F627a,
PIC16F628
Subscribe to:
Posts (Atom)