Questions tagged [attiny]

ATtiny is a family of small, low-power 8-bit RISC microcontrollers from Atmel. Commonly found in smaller Arduino prototyping platform boards and projects.

Filter by
Sorted by
Tagged with
0
votes
2answers
26 views

Switch AtTiny1614 on and off

I have built the following circuit to reset an AtTiny1614 (the mega tiny 1 series). They don't have a reset switch and I thought with this circuit I could (hard-)reset the chip by doing a power cycle. ...
2
votes
3answers
142 views

Gosh darn PORT structs on AVR

To my shock, Atmel has restructured the way they do port addressing in the ATtiny-avr-one series (1616 for example.). I am writing a function that takes in a pin and a port and sets the corresponding ...
2
votes
3answers
2k views

How to make a PCB based on ATtiny easily updatable by end users?

I've made a prototype PCB containing an ATTINY 4313: Each time I want to change the program, I upload it with an Arduino used with the "Arduino as ISP" sketch. If one day I sell such a module to ...
1
vote
3answers
125 views

GND arriving to the wrong pin of this chip on my PCB

I had originally done a PCB for another chip. All pins I'm using (1, 2, 3, 17, 18, 19, 20) are fortunately correct for the ATtiny4313 I'm now using, except GND that arrives on pin #4 of my PCB ... ...
1
vote
2answers
223 views

Low-power solar cell source using capacitors

I am designing a circuit using AtTiny10 to supply a downstream microcontroller with power using only capacitors and a small solar cell. Would the following design work ? The basic idea is that the ...
2
votes
1answer
472 views

Cannot program ATTiny85 fused for 32 kHz

Now, I know what you're thinking. I've been thinking it all night too. Yes, I know that with the tiny fused for a 32 kHz crystal that I'll need the SPI clock to be 8 kHz or less. Even that, however, ...
6
votes
1answer
4k views

Why does my ATtiny13 report wrong device ID?

I am using an Arduino (with ATmega168) as an ISP programmer to program ATtiny13. When I try to do this, avrdude reports: ...
0
votes
2answers
145 views

Read 8 serial ports at the same time with an Attiny

I'm building a MIDI merger, based on a Attiny (either 84 or 85). How to read multiple serial ports at the same time (for example 8 RX inputs)? I can't find the blog article anymore, but I think I ...
4
votes
1answer
638 views

I2C Slave on ATtiny841

I am using an ATtiny841 microcontroller as an I2C slave, but I have difficulty finding information on it. So for, all I have are application notes and reference code for TWI and USI module. It seems ...
0
votes
1answer
60 views

Arduino to Attiny841 with ATTinyCore — pins not working

I have code that works using Arduino. Because I wanted to size down the project, I replaced it with an Attiny841. Process: I soldered the 841 on an adapter and checked all pins using a multimeter ...
0
votes
1answer
71 views

Can I generate frequencies faster than 32 MHz with ATTINY85?

I believe I can use the 64 MHz PLL clock with PWM to toggle every cycle and thereby generate a 32 MHz square wave output on an IO pin, right? Is there a trick to generate an even higher frequency (...
4
votes
1answer
80 views

Amtel ATtiny EEPROM partially erased on power cycle

I have a Digistump with an Amtel ATtiny85 MCU. I can flash the MCU's EEPROM with an ISP programmer no problem. The chip works fine, the bootloader runs and the user program executes correctly. ...
1
vote
2answers
64 views

Simulate Shift Register on AVR (Configurable Logic/Timers?)

Recently I set up two MCUs (ATtiny1616) to perform basic serial communication using shift registers I made myself. simulate this circuit – Schematic created using CircuitLab Here is the logic ...
0
votes
1answer
87 views

Receive serial data on multiple pins ATTINY85 [closed]

I am working on a project in which multiple ATTINY's need to send numerical data between each other. In most cases the ATTINY will have to receive multiple streams of data on different pins. See the ...
1
vote
2answers
89 views

Generating PWM from 24 VDC Power Input [closed]

I have a Piezo buzzer that has an internal transducer so is able to take 24VDC and work. This one has a continuous sound. Just a beeeeeeeeeeeeeeeeeeeeeeeee... I have a 24V output that needs to power ...
0
votes
1answer
65 views

Toggle power between modules/devices

I'm absolutely new to this subject and I have no idea how to start, save for the fact that I need an microcontroller for this. I want to toggle the power between modules/devices I want to hook up to ...
0
votes
1answer
57 views

reading a high negative voltage with attinys running on batteries

I need to read a negative input voltage from a camera flash capacitor that can charge up to -330V. I am using an attiny85V that is running on batteries and want to set the internal reference voltage ...
0
votes
1answer
55 views

DC Boost Converter stepping up voltage very slowly, if any

I've come across DC boost converter and told myself - why not to try it as well? So I started building a simple circuit which includes BD243C NPN Transistor, ATTiny13A programmed to give some pulse to ...
1
vote
0answers
114 views

TRIAC broke (literally) – why?

I have built a circuit according to Dimming 230V AC with Arduino, with two output channels. The basic principle is: An ATtiny does zero detection via an optocoupler; when AC crosses 0 V, it triggers ...
0
votes
1answer
55 views
0
votes
1answer
32 views

IR range problem after coding burst/gap rate and ratio for TSOP1236

I programmed an ATTINY13 to drive an IR led on 36kHz with this code: ...
0
votes
1answer
2k views

usbasp with avrdude: error: program enable: target doesn't answer. 1

I purchased a "usbasp" programmer from AliExpress for use with my ATtiny84A AVR devices. This has the text "USBASP V2.0 LC Technology" screenprinted on the top of the PCB, and it looks very much like ...
0
votes
2answers
120 views

Extremely low data rate transmission over long distance for attinys

For a lighting project I need to be able to trigger 20 units every couple of seconds independently which are daisy chained with 1-2 m space between each of them like so: Control station ====== Unit 1 ...
3
votes
2answers
109 views

Not enough current draw through MOSFET

I am trying to control the current to a Raspberry Pi using a MOSFET and an ATtiny10. I am using a logic level MOSFET and it seems that the Pi needs about 250mA to turn on but it is only able to pull ...
1
vote
2answers
715 views

Build remote wireless Wake-Up with Attiny85

I'm building a ultra-low-power system (mainly composed by an attiny85) that's in sleep state most of the time in order to extend battery life. I was wondering if there was any hack to wake up the ...
-1
votes
1answer
45 views

MOSFET switch, ATtiny10, Raspberry Pi

I had posted a question earlier but I was using a BJT at the time and the solution provided led me to use a MOSFET for my application instead. I switched to the FET but still unable to provide stable ...
0
votes
1answer
53 views

ATTiny167 USB Programming

On Aliexpress I am finding many cheap development boards with ATtiny167 and a USB connector. From what I can gather these boards permit USB programming through USB emulation. Can anybody point me to ...
0
votes
1answer
98 views

Transistor as a switch for 3A collector current

I am using: ATtiny10 w/ 10Ohm Resistor in series to drive Base of transistor Transistor is ZTX688B Vcc is 5V and 3A source Load is a Raspberry Pi connected to Collector simulate this circuit –...
1
vote
1answer
92 views

How can I isolate an ATTiny from an I2C slave so ICSP will work?

I'm building a small circuit to blink some LEDs with an ATTiny. I'm planning to use a 16-channel LED driver and talking to it with an ATTiny over I2C. I'd like to use a SMD ATTiny and add some test ...
1
vote
1answer
72 views

progmem data array optimized out [closed]

I try to use a ATTiny10 to drive some APA102 LEDs. The LEDs are arranged in a 5x5 array. To draw something I stored some 'images' in PROGMEM. Program looks like this: ...
0
votes
1answer
42 views

ATtiny icsp pins dual purpose

I am using an ATtiny88 in a pcb design. It is directly driving a LED matrix. I am only driving half bytes at a time, so the max current limit will be followed. It is my understanding that I can dual ...
1
vote
1answer
62 views

LED-strip PWM works with Raspberry Pi, doesn't work with Attiny45

I'm trying to control an RGBW analog LED-strip by PWM modulation. When using an Attiny45 the LED-strip just blinks at a low frequency (approx. 2-3 hz). However, using a Raspberry Pi 3 to control PWM ...
4
votes
3answers
2k views

Does ATtiny RESET pin need a resistor?

I need to make sure that my ATtiny does not reset unexpectedly. To do that, I am planning on connecting the RESET pin directly to VCC. However, I have heard some places that you need a 10k resistor ...
-1
votes
1answer
56 views

ATtiny45 program/reset issue

I'm pulling my hair out trying to get this ATtiny45 to work, hopefully someone out there can help. The ultimate goal is to drive an RGB LED strip using PWM, but I'm getting some unreliable behavior ...
0
votes
1answer
64 views

How do you add an onboard ISP for an ATTiny85?

I've taken a liking to building circuits around the ATTiny. Typically I add 6 headers and use an AVR programmer or an Arduino to program the ATTiny in circuit. I'm trying to figure out how move that ...
0
votes
1answer
134 views

Easiest (or cheapest) way to get both 5V and 3.3V on one circuit

I'm working on a circuit based on an ATTiny85 and I need accelerometer input. I was looking at using an analog accelerometer (KXTC9-2050 that runs around 240 uA) because I have the extra pin and I'm ...
0
votes
0answers
262 views

Watchdog on Attiny13 every 2 minute

I am trying to use a watchdog on Attiny13. With this code I get 70-100sec (it is not constant) sleeping time and 8sec wake up (pull X pin high) time: ...
17
votes
3answers
19k views

Use AVR Watchdog like normal ISR

I'm trying to wrap my head around the watchdog timer on the ATTinyX5 series. So things I've read made it seem like you could use it for making the program do something specific ever N seconds but ...
2
votes
2answers
2k views

ATtiny25 PWM LED driver with brightness control

I'll be building a piece of RGB LED jewelry for a gift. It's basically a pair of earphones with one or two RGB LEDs on each, with a small ATtiny25-based PWM driver in a small enclosure. I'll probably ...
0
votes
2answers
121 views

Use ADC as Analog Comparator (AttinyAVR)?

I have recently been trying to transition from Atmel's Atmega 328p avr to the newer (and much smaller) attiny416. The trouble is, the 416 only allows you to choose between two positive inputs and two ...
0
votes
0answers
73 views

Drive 433Mhz emitter and Attiny with two coin cells

I would like to detect when the postman put mail in my box, so I was thinking about a simple attiny with tilt sensor (which would wake up the attiny) and a 433 MHz emitter: The problem is that one ...
2
votes
1answer
118 views

Sound sensor not working when connected to DC motor

I made a small circuit to control a DC motor with a sound sensor, using an ATtiny 85 and an L293D. It worked on breadboard, but now that I have a prototype PCB it ceases to work. Whenever I connect ...
0
votes
1answer
60 views

How do I maintain ICSP functionality?

I'm a novice hobbyist building a trivial circuit where an ATTiny 85 controls an RGB LED. In addition to the three PWM outputs, I have 2 inputs. The first input is a potentiometer I'm using to set ...
0
votes
3answers
297 views

How to switch PIR sensor on/off based on photocell result

I've built the following circuit based on an ATtiny85 for a night lamp. The circuit is powered by a 3.7v LiPo battery. I'd like to turn off the PIR sensors when the photocell detects light in order to ...
2
votes
4answers
798 views

AVR GCC: How do I improve code optimization

I tried to compile the following C code: period = TCNT0L; period |= ((unsigned int)TCNT0H<<8); The assembler code I'm getting is the following: ...
0
votes
2answers
137 views

Attiny45 12V LED Driver

I want a fading effect on a 12V led strip when power is turned on/off. I want to keep it simple and efficient, so I choose an Attiny45. The problem is that for the Attiny to work, I would first need ...
26
votes
5answers
5k views

Making a battery last a long time in a microcontroller circuit

I'm hoping to power an ATtiny85V for a nice long time on some small battery, probably a coin cell. I've looked into the software side, and my code is watchdog timer driven, has unused analog and ...
0
votes
1answer
580 views

ATTiny85 Not Working at all

I am using Arduino to program my ATTiny85 like this. I am trying to make a simple blink example, here's the code: ...
0
votes
1answer
106 views

Low voltage LCD glass displays

I have a simple circuit I built using a 7-segment LCD glass display and an ATTiny (just a simple timer for now). I was hoping to use the setup in a low power, single coin cell device (3.3V - 2.7V), ...
1
vote
1answer
149 views

ATtiny20 ISP, low voltage on MISO

I have been trying for quite some time to program a factory-new ATtiny20. After unsuccesfully trying with a USBASP and with ArduinoISP, I decided to take a look with my scope. Turns out the device is ...