ATtiny102 - Page 1
Forum section: electronics / beginners

author: lordvader88
author_rank: Frequent Contributor
timestamp: June 20, 2019, 07:36:32 am
content: 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.pdfI see it has an ADC input, so I do have an ADC chip and its programmable.

author: mariush
author_rank: Super Contributor
timestamp: June 20, 2019, 07:57:01 am
content: 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/310506909410Listing 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 programmersYou 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.

author: Rerouter
author_rank: Super Contributor
timestamp: June 20, 2019, 07:58:33 am
content: 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.

author: mikerj
author_rank: Super Contributor
timestamp: June 20, 2019, 10:08:43 am
content: 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.

author: HB9EVI
author_rank: Frequent Contributor
timestamp: June 20, 2019, 12:04:17 pm
content: 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

author: Rick Law
author_rank: Super Contributor
timestamp: June 20, 2019, 06:42:31 pm
content: Excellent for doing small job like controlling an LED flashlight. TheNanjg 105c flashlight driverfor 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.

author: lordvader88
author_rank: Frequent Contributor
timestamp: June 21, 2019, 06:57:30 am
content: 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.

author: Rick Law
author_rank: Super Contributor
timestamp: June 21, 2019, 07:18:44 pm
content: Quote from: lordvader88 on June 21, 2019, 06:57:30 amYeah, 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 needandit may make deeper calls into other functions. So, check space requirement every time before you code in a function call.)