AVR ATtiny25 USB hit counter

[Bob] has a USB page hit counter that uses an ATtiny25 to run a MAX7219 which drives eight 7-segment displays. It is easy to implement USB on an AVR using just firmware, eliminating the need for any USB to RS232 conversion. The host software is written in Delphi and sits in the Windows tray. The code examples seem simple enough to expand upon into your own display programs.

Comments

  1. ... says:

    I wonder what that display looks like now that he is on HAD…

    In any case, that is a nice project. Simple, clean. Although I would have rather seen it done with a 24 pin part and the displays multiplexed in software to reduce the pin count and eliminate the external power supply. You would just need a current limiting resistor for each display and maybe transistor for each segment if you want a really bright display.

    Even short of that a 4 of 5 digit one that fit in a 3.5″ floppy disk bay to display a few temperatures or disk utilization or something would be pretty sweet–and very cheep, sub $10 range.

  2. thomascpp says:

    I think the MAX7219 is needed to reduce memory space required and to reduce flicker caused by multiplexing that might be a problem if the AVR has to handle both USB interfacing and driving the display (power might be a problem too).

  3. macegr says:

    thomascpp is correct, if the AVR was doing the multiplexing it might not be able to handle the software USB implementation. The most I’ve been able to tack on top of AVR-USB is I2C comms.

  4. atomriot says:

    it seems to me that this would only be a good situation for very slow sites. busy sites seem like they would get read/write crossover and possibly not work. Why not make a web service interface to this instead of it writing to a file? that way you could queue up messages and not have to worry as much about cross talk.

    this is something that would still be fun to implement though

  5. doctor says:

    @atomriot: with reading just a number its really hard to run into problems with crossover, but from reading the site it sounds like any method of hit counting can be easily interfaced with the hit counter, just make a url available that returns a number of hits, whats behind it doesn’t really matter…

  6. etherfeed says:

    I have just finished a similar project, but I can also display data from Google Analytics (Pageviews unique visitors)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,576 other followers