AVR is a 8- and 32-bit microcontroller core developed by Atmel. AVR was chosen as microcontroller for the popular Arduino SBCs.
0
votes
2answers
26 views
clock frequency confusion
I am using an atmega16 micro controller with a 12MHz external crystal oscillator. But I came to know that the internal clock frequency is 1MHz
I need to calculate UBRR value for serial communication. ...
0
votes
1answer
36 views
AVR Frequency measurement accuracy
I need to measure the switching frequency of an open collector output.
The waveform will be square shaped and the frequency range is specified as 0 to 5kHz.
First of all I don't want to count pulses ...
1
vote
1answer
33 views
ATtiny26l won't work without programmer
I'm running a simple program on an ATtiny26l but if i disconnect my AVRISP MK2 programmer it stops working completely. I'm supplying 5.4v to both VCC and AVCC pins (chcecked voltage).If i reconnect ...
-2
votes
0answers
31 views
meauring distance using ultrasonic sensor with atmega32 code bug
what is the wrong in this code ? when i run it on atmega32 the uart send 000 one time and the code does't repeat !
the code should measure the distance using ultra sonic and display it using uart ...
0
votes
0answers
9 views
Does Proteus simulate external interrupts properly using Arduino? I can't get them to work [migrated]
I am trying to simulate an interrupt with an Arduino Uno in Proteus. This is the simple test code that I'm using:
...
1
vote
0answers
67 views
What is STM8 hardware and software interrupt latency?
Just have a first look over the STM8 lineup to compare its performance to AVR which is well know for me now.
One of my the big complain to AVR was the slow reaction to interrupts especially in C ...
1
vote
1answer
54 views
ATmega48PA: can not run PWM on OC0A and OC2A pins
I have some troubles trying to run Fast PWM on OC0A and OC2A pins.
The code is the following:
...
0
votes
0answers
31 views
supply adc pin of AVR with higher than recommended max voltage ac
The set up is a differential signal passed into an opamp with +/- 5V supply, then biased to +2.5V, so it's possible that max voltage could dip below 0V and above 5V for super short intervals.
I've ...
0
votes
0answers
40 views
Making my Atmega128 board AVR headers
I have been working on this project for days. Finally got the framework, ie, the header for this 64 pins MCU up. I have few questions, or rather doubts before finishing it up.
Being new to this IC, ...
-2
votes
4answers
91 views
Button debouncing not working [closed]
I want to toggle a led with a push button and an ATMega16a but for some reason the toggle behavior seems a bit randomly.
...
5
votes
4answers
1k views
Why do people use (1 << PA0) when setting port?
In AVR Tutorials I often see:
DDRA |= (1 << PA0);
PORTA |= (1 << PA0);
used instead of:
...
0
votes
1answer
38 views
Simple Question: Connecting Mac with 3.3V FTDI USB Cable to 5V Breadboard
I'd like to connect my iMac to a breadboard with a 3.3V TTL FTDI USB cable. The breadboard has an Atmega328 AVR microcontroller powered by a 5V regulated power supply. Sorry, if this is a naive ...
0
votes
1answer
59 views
Will 3.3v to 5v level converter work with USB data lines?
I'm trying to design a low-speed USB device based on ATmega16a. That chip doesn't have any USB interface, but it is possible to use bit-banging and there are even ready-made libraries to do so, like ...
0
votes
1answer
48 views
Atmega8 cbi/sbi Timing Issue
I seem to be having a weird issue regarding cbi/sbi instructions on Atmega8-16AU.
I have it connected to an external 16Mhz crystal.
I am able to verify that it is running at 16Mhz by using ...
1
vote
3answers
45 views
Updating Multiple Ports on 8bit AVR in Single Cycle
On the 8bit Atmel AVR MCUS (specifically mega and xmega series), is it possible to simultaneously modify multiple ports in a single instruction cycle?
For example, I have a 512kB RAM chip which ...
0
votes
1answer
64 views
avr-gdb doesn't stop at breakpoint
I'm trying to debug code on an 8 bit AVR microcontroller (Atmega328P) via debugWIRE using AVaRICE, avr-gdb and the JTAGICEmkII debugger.
I'm doing the following steps:
Compile the code with ...
0
votes
3answers
38 views
AVR studio 6.2 flash atxmega32e5 signature issue
I am trying to flash my AVR ATXMega32E5 with Atmel-ICE thanks to SPI.
The problem is that from AVR Studio Device Programming it can read the Target Voltage but not the Device Signature.
What it ...
2
votes
1answer
57 views
AVR PWM output delay before start
I'm using an ATtiny85 to generate a PWM output (using Timer0 in OCR mode), and this PWM output is being switched on and off at regular intervals. I am finding that when switching on the PWM output, ...
0
votes
0answers
27 views
Bluetooth communication issue avr-pc
In the last few days I was messing around with avr <-> pc communication.
Thanks to the help that I received here I managed to establish a good connection using pl2303 ttl-to-usb converter.
Now, ...
1
vote
2answers
72 views
UART communication issue
I am trying to send something from an atmega to my pc.
The setup is: Ubuntu 14.04, atmega644P-20PU, USBASP v2, TTL-to-USB pl2303
Firstly I tried to write the code in C and used this code and then ...
1
vote
0answers
25 views
How to increase the boot timeout to send commands to flash hex in a AVR Atmega2560 controller?
I am working with the Peter Fleury boot loader STK500v2. My idea to implement is boot loading via a bluetooth module at UART1. Now I have modified the existing code to make boot loading possible via a ...
0
votes
2answers
88 views
Difference and compatibility between AVR xxxA and xxx/xxxV series [duplicate]
This is kind of two questions(difference & compatibility), but since an extensive answer to the latter will probably include an answer to the former, I think it's okay.
Anyway, on to the ...
0
votes
1answer
89 views
Sensor not working
I have the following code that is supposed to turn on a led (Port D, pin 5) whenever a digital distance sensor is triggered. Double checked the pinout and the sensor is working.
Is there a problem in ...
3
votes
1answer
46 views
Atmel Studio assembler: how do I define a port pin?
Let's say I need to test a port pin like this:
sbic PIND,2
This should work, but in C I would definitely made a ...
3
votes
1answer
46 views
AVR external interrupt triggering by the falling edge: for how long should I keep signal low to guarantee triggering?
The question header appeared to bee too long. I'm sorry for that.
So I have a schematic generating a short LOW on INT0 pin of ATmega48PA. From the simulation I figured out that the LOW level will be ...
0
votes
1answer
113 views
What is needed to store readable/writable data to flash/eeprom [closed]
I am wanting to add some readable/writeable memory to my ATmega8/attiny project where I can store data, recall the stored data, then overwrite the stored data. The stored data must be able to be ...
0
votes
2answers
40 views
AVR debugging on Linux with Eclipse and AVaRICE
I'd really like to be able to debug on i.e. an Atmega328p on Linux with Eclipse as described on avr-eclipse.sourceforge.net
After quite some research, it seems an JTAGICE mkII should work fine with ...
1
vote
3answers
109 views
How to make a zeros and ones counter?
I'm trying to write a zeros and ones counter in assembly with the AVR ATmega328P.
To choose between the ones and zeros, I have a switch in PC5.
For the input there are 8 switches connected to PORTB ...
0
votes
1answer
35 views
Convert low voltage accelerometer to Wake ATTiny Open Source Binary Watch, activate on wrist motion
I'm working on building a binary watch similar to njeer's binary watch featured on hackaday
I am planning on using a cr2032 3.0V 190mAh battery. So in order for this to run for any length of time ...
0
votes
1answer
91 views
ATmega1284 behaving erratically
My ATmega1284 MCU appears to behave strangely in a number of ways. I know, I'm nuts, but here it goes... I'm using a usbtiny AVR pocket programmer with avrdude on Ubuntu Linux 15.10. I am wondering if ...
9
votes
6answers
1k views
Designing circuits with a longer lifetime
I have learned about the pic microcontroler for a period of time and have a reasonable amount of knowledge about handling digital electronics. I have worked on basic electronic projects and now I need ...
-2
votes
1answer
63 views
Control speed of motor with an AVR through a ESC
I have a XRotor 40A ESC and I started working on controlling it with an AVR micro. I have connected everything: motor, battery and ESC, and connected the ESC input wire to the micro.
The code on the ...
0
votes
1answer
73 views
I can't get out from interrupt driven serial communication
program works correctly but after receiving '#' it has to come out from while loop and print "Exit" on lcd but it doesn't.program still in while loop.
...
0
votes
0answers
21 views
nRF24L01 TX_DS/MAX_RT never
I have strange problem with my nRF24L01+. I'm trying to add nRF24L01+ support to my library for AVR mcus. I'm able to communicate with the device via SPI. I can read, write... But I'm not able to ...
2
votes
3answers
214 views
Regarding CPU speed required for USB applications
I am working on a project for developing a USB keyboard, and I am new to USB protocol and I did initial study regarding basics of data transmissions through USB.
I am now checking for USB supported ...
3
votes
1answer
182 views
How does the BRGE instruction work in assembly? Why is this code not functioning properly?
.cseg
ldi r16, 0x01
ldi r17, 0x01
add r16,r17
cpi r16,0xFF
brge greater
jmp less
greater:inc r1
jmp done
less: jmp done
done: jmp done
I'm writing ...
1
vote
1answer
50 views
0
votes
1answer
66 views
0
votes
1answer
81 views
Analog pinouts of the ATTiny85?
I'm looking to buy a ATTiny85 for a school project. We require 4 analog inputs for our LEDs which we're using as makeshift light sensors (this part of the project is sorted). I've read the the pin ...
-1
votes
1answer
81 views
ATMEGA32 LED BLINKER Assembly code problem
I tried the following code for a simple led blinking problem on ATMega32.
...
-4
votes
2answers
83 views
How do I get a value of a RAM by given address? [closed]
I think I know how RAM works, but I have an exercise where I have to read at the address 0x????.
Furthermore, I am only interested what value get returned after the reading command. For example:
...
2
votes
2answers
72 views
Open collector with Atmega48
After looking at this, I think I already know the answer, but I just wanted some clarification.
Open collector microcontroller output
I have a part that is going to drive my mosfet at 15V. I have ...
2
votes
1answer
45 views
Detecting when AVR ICSP header has a cable connected
I have a bunch of Atmega16A MCUs laying around so I want to use them with an ESP8266 to relay temperature and such in each room of my home to a server. The thing is, if I need to update the firmware ...
0
votes
0answers
70 views
AVR Power on failed
I have recently purchased a USBasp and AVR microncontroller with the development board. I have tried out some program(blinking led and led with switch) it was working fine. The board that I have was ...
0
votes
0answers
44 views
Proteus and AVR watchdog timer problem in turning off
I created a small avr (ATMega32) controlled circuit that needs to be reset every 1 hour.
i used the procedures by atmel that also explained here on SO.
The procedure works easily on avr micro, but ...
1
vote
2answers
22 views
TLC5940 16 PWM Output Iref Resistor
I have just picked up the TLC5940 chip from TI that provides 16 PWM outputs.
The data sheet is here.
As mentioned in the data sheet, the max current at each output can be set by connecting a ...
0
votes
0answers
94 views
Unable to implement TWI with Atmega8
My goal is to interface an IC AT24C16 with Atmega8 through TWI. I tried every solution possible from online forums but I see no meaningful signal in the oscilloscope.
This is my code. Can some one ...
1
vote
0answers
47 views
Would you use Wiznet W5x00 in a commercial product? [closed]
I am working on a project where the product needs to be connected to the local network. For the products we use Atmel controllers (AVRs and ARMs).
I choose Wiznet W5100 to be used in the prototype, ...
0
votes
4answers
57 views
ATmega48 maximum AREF voltage
The application that I want to use it for is 5V. However it could potentially have a future iteration where the reference voltage could be as high as 15V.
The plan is to run the ATmega48 at 3.3V.
I ...
0
votes
1answer
79 views
Attiny85 PWM Not Working
A am new to AVR programming. I have an Attiny85 and an LED hooked up to pin 5 on the chip (PB0). My goal is to get the LED to fade on, then turn off and repeat. When I give power to the chip the LED ...