Address

Author Topic: ATTINY project - looking for input  (Read 2003 times)

digitalman2112

  • Lab Dad (ex-treasurer)
  • FamiLAB Member
  • Hero Member
  • *
  • Posts: 1096
  • Work Hard, Play Hard!
    • View Profile
    • Raising Geeks
ATTINY project - looking for input
« on: July 15, 2013, 08:24:46 AM »
In the Fireball pinball machine, I'm using a full Arduino for something simple, and I'd like your input on the best way to simplify it...


The device is an i2c slave, with 5 digital outputs. You send it a specific message, and it pulses the digital output for a specific amount of time (the amount of time is fixed, and can be in the firmware).


So, I need


+5v
GND
SCL
SDA


D0
D1
D2
D3
D4


Which means I can't use some of the smaller ATTINY - as I need at least 9 pins. (Yes, I could output BCD and have a 4028, etc convert it, but why not just use an ATTINY with more pins?)


I have some ATTINY4313 here, although from our hackathon experience, it sounds like they are trouble. I really don't want to spend a ton of time doing something this simple (and right now, I'd just stick with the arduino...)


I'm looking for a nice, clean way to do this, that would also be a good simple example of taking an Arduino-based project down to ATTINY for demonstration purposes.


Thoughts / input?







P47

  • FamiLAB Member
  • Full Member
  • *
  • Posts: 241
    • View Profile
Re: ATTINY project - looking for input
« Reply #1 on: July 15, 2013, 09:07:43 AM »
Doing something similar here... and this was the best fit I could find.


http://arduino.cc/en/Main/ArduinoBoardNano


Got one from pocky for only $9.99.  :)

digitalman2112

  • Lab Dad (ex-treasurer)
  • FamiLAB Member
  • Hero Member
  • *
  • Posts: 1096
  • Work Hard, Play Hard!
    • View Profile
    • Raising Geeks
Re: ATTINY project - looking for input
« Reply #2 on: July 15, 2013, 09:23:09 AM »
True, I could just use an ATMEGA board - I've got a few small ones laying around...I guess I want to check the "ATTINY" Project box one of these days...

willasaywhat

  • Administrator
  • Hero Member
  • *****
  • Posts: 987
    • View Profile

ki4swy

  • FamiLAB Member
  • Full Member
  • *
  • Posts: 213
  • skill mad scientist
    • View Profile
Re: ATTINY project - looking for input
« Reply #4 on: July 15, 2013, 09:32:31 PM »
let me rumage my parts bin, a tiny would work. , i would rather go with something with more I/O for future expansions.
"Good engineers keep thick authoritative books on their shelf. Not for their own reference, but to throw at people who ask stupid questions. Hoping a small fragment of knowledge will osmotically transfer with each cranial impact." - eeguru

If it runs on electricity, i have it :)

ki4swy

  • FamiLAB Member
  • Full Member
  • *
  • Posts: 213
  • skill mad scientist
    • View Profile
Re: ATTINY project - looking for input
« Reply #5 on: July 15, 2013, 10:39:42 PM »
i have:
Qty 16 Atmega8-16pi
Qty 25 AtTiny26-16pc

I don't have an immediate use for these at all, and they do appear to have I2C ( or have SDL/SDA Pins )


"Good engineers keep thick authoritative books on their shelf. Not for their own reference, but to throw at people who ask stupid questions. Hoping a small fragment of knowledge will osmotically transfer with each cranial impact." - eeguru

If it runs on electricity, i have it :)

digitalman2112

  • Lab Dad (ex-treasurer)
  • FamiLAB Member
  • Hero Member
  • *
  • Posts: 1096
  • Work Hard, Play Hard!
    • View Profile
    • Raising Geeks
Re: ATTINY project - looking for input
« Reply #6 on: July 16, 2013, 08:02:48 AM »
Ok, thanks all. I need to dedicate some time to finding a working toolchain for this stuff.

Maybe that will be my "take a small project to the beach with me for rainy afternoons" since it isn't that much stuff to carry. I also should probably learn how to do this without trying to use the Arduino libs, that seems to be what really complicates it.

Bill, if you are heading up on Tuesday night and want to bring one of two of each of those, I can add them to my experimentation pile - but no special trips, this is a "when I have time" thing - it works today, this is just a minimalization / show whats possible exploration. Thx!

willasaywhat

  • Administrator
  • Hero Member
  • *****
  • Posts: 987
    • View Profile
Re: ATTINY project - looking for input
« Reply #7 on: July 16, 2013, 09:43:52 AM »
I've done some work with CrossPack and XCode for AVR-C. If you want to take a peek, I can show you Tuesday. Its not that bad, just a matter of bit flipping and learning conventions. I2C/TWI may be another thing all together, but there should be docs on it. :)

ki4swy

  • FamiLAB Member
  • Full Member
  • *
  • Posts: 213
  • skill mad scientist
    • View Profile
Re: ATTINY project - looking for input
« Reply #8 on: July 16, 2013, 04:07:38 PM »
i just use goo ole avr gcc :)


"Good engineers keep thick authoritative books on their shelf. Not for their own reference, but to throw at people who ask stupid questions. Hoping a small fragment of knowledge will osmotically transfer with each cranial impact." - eeguru

If it runs on electricity, i have it :)