Author Topic: ATtiny102  (Read 2317 times)

0 Members and 1 Guest are viewing this topic.

Offline lordvader88Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 935
  • Country: ca
ATtiny102
« on: June 20, 2019, 07:36:32 am »
I pulled some from a printer or something, so what exactly can they do ? Are they like a mini- computer, like a mini-ardinuo ? I'm busy doing 3 other things, so I can't read the data sheet, and most of it is too detailed. What do u need to talk to them and have them do something cool ? I learning analog, don't know much digital or programming yet.
http://ww1.microchip.com/downloads/en/devicedoc/atmel-42505-8-bit-avr-microcontrollers-attiny102-attiny104_datasheet.pdf

I see it has an ADC input, so I do have an ADC chip and its programmable.
« Last Edit: June 20, 2019, 07:40:09 am by lordvader88 »
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5170
  • Country: ro
  • .
Re: ATtiny102
« Reply #1 on: June 20, 2019, 07:57:01 am »
It's a microcontroller.
You use a programmer to program it.  Look at something simple like AVRDude or USBASP ... here's an example: https://www.ebay.com/itm/USBASP-USBISP-AVR-Programmer-Adapter-10-Pin-Cable-USB-ATMEGA8-ATMEGA128-Arduino/310506909410
Listing doesn't include ATtiny102 but it would probably work.
These are more "legit" but you'll have to check the notes to see if that particular chip is supported: list of AVR programmers
You can download programming software from Microchip's website (because they bought the Atmel company so they now make the AVR microcontrollers). 
I'm not sure the chip can be programmed using the Arduino software, it's too "light", too little memory and features... but I may be wrong.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4705
  • Country: au
  • Question Everything... Except This Statement
Re: ATtiny102
« Reply #2 on: June 20, 2019, 07:58:33 am »
An attiny is a family of atmel microcontrollers. This particular chip can be programmed as an arduino with an isp or another arduino acting as an isp.

It has multiple adc inputs. Multiple pwm outputs and other peripherals like timers and counters.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3382
  • Country: gb
Re: ATtiny102
« Reply #3 on: June 20, 2019, 10:08:43 am »
Note that this device has only 1k of flash memory and just 32 bytes of SRAM, compared to 32k flash and 2k SRAM for the typical ATMega328 in an Arduino.
« Last Edit: June 20, 2019, 04:23:44 pm by mikerj »
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: ATtiny102
« Reply #4 on: June 20, 2019, 12:04:17 pm »
worth to mention also that Attinys do not have 8x8 hardware multiplication like the Atmega do; depending on the needs, you maybe choose one or the other platform
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3490
  • Country: us
Re: ATtiny102
« Reply #5 on: June 20, 2019, 06:42:31 pm »
Excellent for doing small job like controlling an LED flashlight.  The Nanjg 105c flashlight driver for example uses an ATTINY13 with pretty much the same spec but with 64byte SRAM.

Way too small to run Arduino by itself, but programmable using Arduino as a programmer.  I use AVRDUDE/gcc to program the darn thing and that works like a charm.

The 32 byte ram and 1K flash is limiting but enough to do some very simple stuff: like doing a low battery voltage detection and some simple brightness control.  Even with the ATTINY13 64 byte ram 1k flash, with most of my flashlights, I had to removed the TINY13 and shoehorn in a ATTINY85 (512 byte ram 8K flash) to do more features. 
 

Offline lordvader88Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 935
  • Country: ca
Re: ATtiny102
« Reply #6 on: June 21, 2019, 06:57:30 am »
Ok aside from using part of the PCB it was on, i can put it on a breakout board. I'd say I have plenty of little chips that can talk to and work with this chip. I also have ardino, so I need to learn the basics of that again, and buy some breakout boards,  etc.

Should be fun.
 

Offline Rick Law

  • Super Contributor
  • ***
  • Posts: 3490
  • Country: us
Re: ATtiny102
« Reply #7 on: June 21, 2019, 07:18:44 pm »
Ok aside from using part of the PCB it was on, i can put it on a breakout board. I'd say I have plenty of little chips that can talk to and work with this chip. I also have ardino, so I need to learn the basics of that again, and buy some breakout boards,  etc.

Should be fun.

Yeah, it should be fun - just something to keep in mind to avoid frustration - if you are going to program it using C, remember that you have only 32 byte ram.  So, every function call would be: "it is not a just call, it is an adventure".

(Every function call would involve at least a PUSH, so stack space is required - not to mention the local variables the call may need and it may make deeper calls into other functions.  So, check space requirement every time before you code in a function call.)
« Last Edit: June 21, 2019, 07:21:37 pm by Rick Law »
 
The following users thanked this post: cpt.armadillo


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf