Circuit Lake

Electronic Project and Circuit Collection

USB Website Hit Counter

05/07/2011 Category: AVR, Display, Interfacing, Microcontroller, Miscellaneous, Project, USB

The project purpose is to build an AVR-based website total page hits counter and display it on 7-segments display instead of using only general scripts such as PHP, Java, CGI etc. The counter project consists of three main parts. First, PHP hit counter script run on website. This script will count the number of times a page is called and store this number into a simple text file (e.g. hits.txt).

AVR based website hit counter


Second part is PC software which fetch text file web server every 10 seconds and send data to counter driver circuit. The host software written in Delphi 6 and it need Indy 10 component and “LibUSB-Win32” library to work. And The last part, The AVR ATtiny25 based hardware which has function to display the counter on 7 segment LED display and communicate with PC software through USB interface. The MCU firmware is written in C language and compiled using AVR-GCC. It was modified from EasyLogger example which developed by Christian Starkjohann.

Web Hit Counter
Project Firmware, Schematic and Documentation
bobhobby.com