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.

6 thoughts on “AVR ATtiny25 USB Hit Counter

  1. 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. 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. 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. 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. @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…

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.