I have the first prototype of the Airsoft Rounds Counter up and running on a breadboard.
Here is the schematic. A couple of notes:

  • A 10 µF capacitor or so near the power supply certainly wouldn't hurt. Neither would a diode on the input side of the 7805.
  • The "program and reset" switch doesn't do anything with the current code and can be omitted for this version.
  • On the breadboard I also have a tact switch from the ATTiny's RESET pin to ground so I can reset the counter.
  • I'm using a 9V battery for power.

Schematic – click to view large version

3 comments on "Prototype"

[...] Here is version 1 of the firmware for the Airsoft Rounds Counter project. The code uses avr-gcc but should be real easy to port if you use a different compiler. This firmware is by no means the final version. Rather, it is the firmware for the breadboarded version (the schematic is here). [...]

Nathan says:

Sorry for resurrecting a seemingly-dead thread. Your schematic shows attiny2313's pin 18 (MISO--Master In/Slave Out) connected to the MAX7219's pin 1 (DIN--Data In). Shouldn't it instead by attiny2313's pin 17 (MOSI--Master Out/Slave In) that is connected to the MAX7219's pin 1? Thanks for sharing this!

Jens Willy Johannsen says:

Actually, I am using the "Universal Serial Interface – USI" in the firmware. And the full name of the pin is "PB6 (MISO/DO/PCINT6)" and USI uses the "DO" (Data Out) functionality of the pin.

So it is the correct pin. But well spotted – I got confused myself for a moment :)

Leave a Reply