Author Topic: Questions on the AVR ATtiny's  (Read 2461 times)

0 Members and 1 Guest are viewing this topic.

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Questions on the AVR ATtiny's
« on: September 25, 2010, 04:19:05 PM »
Hey guys.

I'm trying to design a data acquisition system into my electric panel, so i can get power consumption data. (yes i know there's a bunch of other setups on the net, but i'm designing my own).

I'm trying to keep what actually get's installed into my panel as minimal as possible. I was thinking of using am ATtiny, since really all i need is 2 ADC pins and a UART TX pin to send the data to something else. An ATmega seems way overkill for this.

But i'm lost on how the mega-multiplexing works on the pins.



Ok, So i assume i'll connect a capacitor to PB0 and VCC for AREF, and use PB3 and PB4 for my two analog input pins.

 I get mixed results when googling how a UART works on this, if it even has one. Which pin would TX be?

Would hard wiring a cap to PB0 and VCC interfere with a hardware programmer since PB0 is also MOSI? my gut says yes, and i'll have to pop the chip in and out of a flasher socket to my circuit's socket every time i want to flash a program.

EDIT:

Code: [Select]
ADMUX |= (0 << REFS0) | (0 << REFS1);      //Sets ref. voltage to VCC +5v
Ok, so it looks like i don't have to use external AREF pin if i don't want to, as i can set AREF internally, right?
« Last Edit: September 25, 2010, 04:27:12 PM by madsci1016 »

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
    • Ro-Bot-X Designs
Re: Questions on the AVR ATtiny's
« Reply #1 on: September 25, 2010, 08:38:14 PM »
This chip does not have hardware serial (UART) interface. But it has a USI (universal serial interface) that you can configure in different ways, one being I2C. I don't remember if serial works or not.

I have some future plans using the tiny85 and 84, but at the time I'm way too busy to dig into it more.
Check out the uBotino robot controller!

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: Questions on the AVR ATtiny's
« Reply #2 on: September 25, 2010, 09:51:24 PM »
Hmm, looks like i would be codding my own software serial then. I guess since it would be TX only, it shouldn't be that hard.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Questions on the AVR ATtiny's
« Reply #3 on: September 26, 2010, 04:38:00 PM »
Hi

If you're hard pressed for space, there's always the PIC10Fxxx in SOT23-6, the same outline as conventional SMD transistors, just with twice the pins  ;D
What you're doing is a prime example of where it excells.

On the positive bump of an AA cell:


On my finger:


Sorry for the crappy quality - they were shot single handed in low light.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: Questions on the AVR ATtiny's
« Reply #4 on: September 26, 2010, 05:48:39 PM »
That is tiny.

Thanks, I'll consider it. It's sad to say my gf knows more about PICs then I do, which still isn't much at all. I've been meaning to teach myself, and this might be the project to do it. I already ordered some ATtinys, so i'll take a further look to see if i want to bite the PIC bullet instead.

 


data_list