Questions tagged [attiny]

ATtiny is a range of programmable 8-bit AVR microcontrollers by Atmel.

160 questions
1
vote
1 answer

Wrong value using the ADC with Attiny84

I am using an Attiny84 with an LM335z temperature sensor to create a temperature sensor. Using the ADC, I obtain the voltage value and perform the necessary conversions to obtain the temperature value. Then, I display this temperature on a 7-segment…
MrNando
  • 11
  • 2
1
vote
1 answer

ATTINY416 SYNC Signal Generation

I am trying to code a ATTINY416 to perform the following function with the following inputs; Purpose: Transmit a Byte message of '0x01' every X amount of clock cycles, from the input of an external clock source, and to synchronise the output of…
CS010101
  • 11
  • 2
1
vote
1 answer

How do I specify my target chip as a feature

I would like to program a bare attiny85 with rust. No existing development board, just my own layout. I figured that attiny-hal would be what I need, but I'm stuck at this error: $ cargo check Checking attiny-hal v0.1.0…
Markus Grunwald
  • 133
  • 1
  • 10
1
vote
0 answers

ATTiny 1626 pullup input does not trigger falling edge ISR, is there something wrong with my setup?

I have an ATTiny 1626 on a PCB which I program by using SerialUPDI. I want to increase the value of a variable in an interrupt service routine, triggered by a button press. The problem is, that the ISR does not get called at all. My Setup My Code…
Felix Mark
  • 11
  • 3
1
vote
0 answers

How to communicate with ATTiny85/Digispark via USB on PC?

Recently I'm trying to make a simple LED controller with ATTiny85/Digispark. I tried to use DigiCDC lib to perform data IO but it does not work on my PC (win10 x64). test code: #include void setup() { pinMode(0, OUTPUT); pinMode(1,…
Firok
  • 269
  • 1
  • 6
1
vote
0 answers

ATtiny402 ADC0 result is always 0xFFC0

I am using an ATtiny402 for an experiment in ADC. In my current configuration, I am using the PA6 pin as the output pin and the PA2 pin as the analog input pin. In PA2 a potentiometer is connected. In the current experiment if the analog input value…
1
vote
1 answer

Detect falling edge on pin change interrupt for ATtiny

I'm replacing a busted fan remote with a new one built from scratch and I've got it working but need to improve the interrupts that are being used to detect button presses. The MCU is an ATtiny84A and the switches are SPST momentary switches. The…
Nexmo16
  • 137
  • 1
  • 11
1
vote
1 answer

Attiny85 "analogRead()" with ADC problems

So I'm messing around with the Attiny85, my project requires what in Arduino would have been analogRead, I have learned a bit about ADC in this great instructable. I'm having problem though with what seems like to be the reading aspect. As I can't…
1
vote
0 answers

Attiny25 weird timing/behaviour

The project as follows: an attiny25 powers up a dht22 and an unltrasonic distance sensor with a MOSFET. The output of the MOSFET is also used to power a bus, there's a 3.3K pullup on it. The main program mostly sleeps, and when it's time, it…
1
vote
1 answer

Failing to access AVR ATTiny13A with very slow clock (128kHz/128 or 128kHz/256) (avrdude: error: program enable: target doesn't answer)

I am trying to program an AVR ATTiny13A using a USBasp adapter (guloprog) and avrdude. Uploading the program and running it works fine the first time for a fresh ATTiny13A device, but re-uploading again fails. avrdude cannot see/access the device at…
Johannes Overmann
  • 4,914
  • 22
  • 38
1
vote
1 answer

Progamming inside a Attiny85 with rust

Introduction I created a small project that uploads C++ code to an Attiny85, for this I used arduino. Question But I would have liked to know if it was possible to download and run rust code in Attiny85 or other Attiny. If we can, how do we do…
ThrowsError
  • 1,169
  • 1
  • 11
  • 43
1
vote
2 answers

ATTiny85 Interrupts in Arduino IDE

I have an ATTiny85 which I program using a sparkfun programmer (https://www.sparkfun.com/products/11801) and the ATTiny Board Manager I am using is:…
Black Solis
  • 71
  • 1
  • 11
1
vote
2 answers

Using two ATTiny85 slave master I2C communication with TinyWire Library

I'm trying to use the TinyWire library for I2C communication between a master ATTiny85 and a slave ATTiny85. Either master or slave as the sender is fine, but I have not been able to get a basic transmission working. I am using the Arduino IDE to…
1
vote
1 answer

I'm unable to connect ATtiny85 and EM18(RFID reader)

Here is the code in Arduino online editor #include char tag1[12]={"123456789123"}; char tag2[12]={"123456789456"}; char var[12]={"000000000000"}; int ok; void setup() { // put your setup code here, to run once: …
Ajit
  • 11
  • 2
1
vote
2 answers

Optimising C code for small size - sharing static variables?

I have two functions, both are similar to this: void Bit_Delay() { //this is a tuned tight loop for 8 MHz to generate timings for 9600 baud volatile char z = 12; while(z) { z++; z++; z++; z++; …
Wossname
  • 123
  • 5
1
2
3
10 11