We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [avr]

AVR is a 8- and 32-bit microcontroller core developed by Atmel. AVR was chosen as microcontroller for the popular Arduino SBCs.

Filter by
Sorted by
Tagged with
-7
votes
1answer
97 views

Recovering a program from a locked AVR [closed]

How can a program from an AVR be recovered when its lock fuse bits are set?
2
votes
1answer
132 views

RS-232 interface chip problem - why is the voltage level so wrong?

1. What I want to do: I have a PCB with an AVR microcontroller (ATmega16U4) on it. I want the microcontroller to communicate with my computer through an RS-232 cable. 2. What I did: I added an ...
4
votes
1answer
386 views

AREF above operating voltage of the microcontroller

I’m operating an ATMega32 at 3v3 through USB and a LDO. Is it possible to connect the AREF pin directly to the USB voltage of 5V so that I can read voltages between 0 and 5V when reading from the ...
0
votes
2answers
66 views

Atmega328 doesn't respond after power loss while uploading program

While uploading program to atmega328 I accidentally disconnected it from power. After that I get "target doesn't answer" message while trying to upload. I am using USBasp programmer, connections are ...
2
votes
1answer
68 views

Multi-tasking on an 8bit AVR -

I'm using an ATTINY816 (the new series AVRs) to manage a system that includes the following tasks: Simple audio "effect processing" (delay, pitch up, pitch down...) using internal ADC + DAC Storage ...
0
votes
0answers
81 views

Attiny 841 dev board schematic review

I am about to send a custom Attiny841 dev board (aimed at Optiboot) to production and I thought, since I never used netiher this microcontroller nor the USB-UART converter before, I'd come here and ...
0
votes
1answer
60 views

Translate from AVR pgm_read_byte to normal C array manipulation in STM8

I am trying to translate a couple of lines of code from AVR space data to STM8 normal C data manipulation. As you should know, AVR has a program space which can storage data for read only operation, ...
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 ...
6
votes
2answers
703 views

LED- Resistor, does the position matter? [duplicate]

I was reading the MAKE AVR programming. One of the chapters suggests to solder resistor to the cathode side of an LED. But in our uni labs it's said to connect the resistor "before" the LED; that is ...
-1
votes
0answers
93 views

Receiving data from SIM808

I am trying to use SIM808 module but I have no response even after sending only "AT". I am using 5V/2.5A AC/DC adapter. The board (ecb-v3.2) is rather connected well because two diodes are on all the ...
2
votes
1answer
156 views

MAX7221 not always powering on

I have a MAX7221 SPI 7-seg. LED driver linked to an AVR168P microcontroller. Sometimes when powering on, everything works as expected. Other times the display blanks and remains blank. Other times ...
1
vote
1answer
180 views

AVR SPI slave first byte problem

I have written a simple SPI slave on an ATMEGA328PB. It mostly works, however, I can't seem to get the first byte to be what I want. The difference between the first, second, and all other attempts ...
31
votes
5answers
12k views

How do devices like the Game Boy Advance achieve their frame rate?

I've been designing my own handheld gaming device based around an AVR microcontroller and a small OLED display. I started off with a monochrome display 128x64 pixels and can comfortably draw to it at ...
0
votes
3answers
101 views

Burning hex files into multiple micro-controllers at a time. [closed]

I am using attiny88 and the usbasp programmer. Right now I am burning 1 micro at a time. But it is a time-consuming process during the production. Is there any way to burn multiple microcontrollers ...
2
votes
2answers
343 views

Can't trigger AVR ADC Interrupt

I am using an Atmel's XPlained mini board with Atmega328PB. I am trying to use ADC interrupt, however I can't get it to fire. Here's the code that I have a problem with: ...
0
votes
1answer
66 views

Arduino and DAC

I have programmed an Arduino to control a DAC, generated signal control the current of an LED via a LT1206. Whenever I plug in the power, before Arduino starts, the LED starts to blink because it ...
0
votes
1answer
90 views

Power issue on connecting controller to FTDI programmer

Hi, I have connected my controller (ATMEGA2560) input to 5V power supply. At the VCC terminal 5V is shown. The VCC, TX,RX, RESET and GND pins are connected to a FTDI programmer port as shown in figure....
0
votes
0answers
37 views

CC2530: adapting AVR/pgmspace.h for Zigbee

Goal: Adapt ENC28J60 codes written for ATMega328p (http://tuxgraphics.org/electronics/201204/embedded-ethernet-client.shtml) for CC2530. Problem: No equivalent library for AVR/pgmspace.h available ...
2
votes
1answer
307 views

SAMD21 DAC example

beginner here in need for starting directions. I have SAMD21 Xplained Pro Board. I would like to produce DC DAC output, based on 8 bits on the input. Range of my DC output values should be around ...
0
votes
1answer
96 views

.dw directive in AVR assembler

the piece of code below is mentioned in 8-bit AVR's instruction set as an example to explain the LPM instruction. ...
0
votes
1answer
300 views

AVR Can Write I2C, but Fails to Read (Fails to Write Register Address)

I'm using an ATMega328 DIP Package with a TLE493D(A0) (and manual) 3-axis hall effect sensor. I've done successful reads/writes to other I2C devices (AT42QT2120), but I'm having issues with the TLE493....
0
votes
2answers
204 views

Long distance (and I think low frequency) serial communication with Arduino [closed]

I need to implement a long distance (up to 15 kilometers) communication between some electronic devices. The devices is some boards on AVR chips with Arduino library and a Raspberry pi as the ...
-1
votes
2answers
155 views

Can somebody explain to me thoroughly about DDRx, PORTx, PINx in AVR?

Okay this might be a really dumb question, but I don't really get these 3, my main confusion is, why we need three of them? Why can't we r/w on port like normal register? (please don't downvote). And ...
1
vote
0answers
82 views

Can't manipulate array with atmega8

I am quite new to AVR programming and I am currently having some troubles with arrays. I am trying to write an Arduino code that will be run on a Atmega32u4. The goal is to communicate with a AX12-A ...
0
votes
1answer
107 views

Confusion on Servo and PWM (AVR) [duplicate]

For reference im using an AVR Atmega 328p, and the servo specs i'll be using says this: Pulse Cycle: 20 ms (I assume this means the "period") Pulse Width: 600-2400 µs So from my understanding, ...
1
vote
2answers
372 views

How can I isolate voltage dividers so they aren't interfered with by other parts of the circuit?

I have a small and very basic circuit that PWMs an RGB LED. It has a potentiometer to allow me to set brightness level for night time and a LDR that allows me to detect night time. I took some ...
1
vote
1answer
54 views

EEPROM Interface confusion with Address?

So im researching how to interface with a EEPROM Chip via I2C with an AVR (Still learning a lot of the interfacing). Anyways, the AT24C16 for instance (or that family of EEPROM) seem pretty popular. ...
0
votes
1answer
245 views

On AVR-GCC, how can I find out what statically initialized variable is using up my RAM?

The variable does not show up on the MAP file so it is hard to track it down. I'd rather not have to manually search though all the source code looking for static initializers.
1
vote
1answer
479 views

AVR: Pullup vs Pulldown on button input?

So I know the Atmega328p (What im using now) has Pull-up resistors available to be activated. And I know when reading input we could either make a button cause a PIN to go high or low....but is there ...
0
votes
1answer
146 views

Protect Code inside Microcontroller [closed]

As a preface, what I am asking is highly related to this question. That said, the question linked was asked in 2011 (7 years ago), and I imagine the microcontroller world has changed (at least to ...
1
vote
1answer
91 views

Minimal external components for AVR CPU

If I want to program a new AT90USB1286 series chip via the standard 6 pin ISP header, do I need any additional components wired up at all? I'm wondering specifically about the need for a quartz ...
0
votes
1answer
156 views

AVR Pin change interrupt: Capacitive Touch Sensor

I'm reading the book: AVR Programming: Learning to Write Software for Hardware by Elliot Williams. In the Interrupt section of the book, there's a small project to make a Capacitive touch sensor. ...
0
votes
1answer
64 views

Newbie question: C programing for AVR

The following lines which works exactly opposite to what i'm expecting, would appreciate correcting my understaing: Button connected with Pin D2 & Led B2: ...
0
votes
1answer
63 views

FPGA CAN Bus Test Bed

I don't have familiarity with FPGAs and I haven't used VHDL for 21 years, so starting from scratch. I am wondering if the following is possible/sensible. FPGA running n "small" independent ...
1
vote
1answer
161 views

SPI: Receiving bytes from slave

For a couple of days I have been learning about SPI and decided to give it a go with 2 small devices. DEVICE 1: Atmega328p (MASTER) DEVICE 2: MFRC522 (SLAVE) As far as I understand: master sets SS ...
0
votes
1answer
120 views

Where MOSI is triggered low or high

Sending and Receiving Data //Function to send and receive data for both master and slave ...
2
votes
0answers
70 views

Deployoing compiled program from Atmel Studio or Avr dude to Atmel “XMEGA-A3BU Xplained”

Im attempting for the last 3-4 days to connect the Atmel dev board to the computer in order to either load the .elf or hex file to the bootloader in order to turn on a LED. Im following instructions ...
5
votes
2answers
680 views

Communicating between 2 different microcontrollers

My Arduino runs at 16MHz clock speed; another microcontroller runs at clock speed of 13MHz. If I send digital output directly from an output pin of the former to input pin of the latter, there will be ...
0
votes
1answer
86 views

Have I bricked my ATMEGA3328p by setting

I was playing around with setting the "system clock prescalar" (CLKPR). I'm now in a situation where I can see that the clock is 244.9KHz, using my logic analyser and the "Clock output on PORTB0" ...
4
votes
3answers
690 views

Is the ATMEGA328P's serial baud rate quantised?

I'm using an ATMEGA328p, running from its internal oscillator (divided by 8 = 1MHz). I've (roughly) measured the oscillator output, using my Salae logic analyser, as ranging from 960KHz to 1000KHz, ...
1
vote
1answer
57 views

Doing logical operations on Port PINS in Assembly

I'm trying to do those following the operations on PINS, but not sure how to do the not operation on a port, do xor ..etc? would someone show me an excrept psesuod code ?
0
votes
1answer
88 views

AVR programmer necessary? [closed]

I have an atmega168pb and I've noticed that there is a difference in how the board can be programmed between Windows and Linux. On Windows using Atmel Studio you can select an ISP interface and it ...
0
votes
1answer
133 views

Using UDRIE0 interrupt in ATmega168

I only have some limited knowledge in interrupts. This is what I understand about following ISR functions ISR(USART_RX_vect) will get called when a new data ...
1
vote
1answer
596 views

AVR ATMEGA328p Blinking Example

I wanted to test a simple blinking script on my ATMEGA328p. The breadboard setup (tested and works fine). But the LED does not blink. I probed the voltages across the board and they are showing up ...
3
votes
2answers
307 views

SPI Flash Memory with ATMega1284

I have connected a SST26VF064B 8Mb flash memory IC to an ATMeag1284 as shown in the following diagram. My plan is to talk to it using SPI. Note that all capacitors in the schema are 100nF. When ...
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 ...
1
vote
1answer
100 views

AVR - strange communication between ATmega8A and bluetooth module

I'm using ATmega8A-PU AVR microcontroller, and HC-05 bluetooth module on a breadboard. What I'm doing here, is to connect to BT module from my mobile phone and toggle the LED state by sending ...
0
votes
1answer
69 views

LCD module not initializing

I've got a project where I need to use an LCD module, so I started pondering around with one (1602A). So far I've wired it up with my microcontroller which is an Atmega168PA and written an ...
-3
votes
1answer
268 views

which IDEs are available for Freertos with Stm32 IDE for Linux? [closed]

Is there any IDE available for Freertos or Stm32 for specifically only for Linux other than Keil uvision. because I found out that Keil uvision is the most stable IDEs available out there for embedded ...
1
vote
1answer
413 views

Generating 1 second with avr and timer 0 for Atmega32A

dears: we have to Generate 1 second with atmega32A and mikrobasic software. so I have configured timer 0 and avr with this way: ...