Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
37 views

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

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 ...
-2
votes
1answer
44 views

Avr+code of a burst pulse

How to generate a burst wave with Atmega328??!! I want to produce like this image that attached below.
-1
votes
2answers
95 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 ...
0
votes
0answers
22 views

Block reading of SDHC returns 0x00

I have a 4 GB sd card attached via SPI to my XMega MCU and I want to read this card with the USART-SPI interface in SPI mode of the MCU. So i have this code SD.c ...
1
vote
0answers
60 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
45 views

Confusion on Servo and PWM (AVR)

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
199 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
37 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
103 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
110 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
110 views

Protect Code inside Microcontroller

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
81 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
28 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
59 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
50 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
47 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
0answers
12 views

Can't set fusebit on Arduino mega2560

The board came default with lfuse:0xFF hfuse:0xD0 efuse:0xFF I've been trying several of the programmers that come with Avrdude, but the only one showing some results is -c wiring, the others timeout....
0
votes
0answers
32 views

ESP8266 misses some data sent by UART (Interfacing with AVR ATmega32)

First of all, I apologize in case I make some mistakes posting this question. I'm writing from Argentina and I'm trying to send data from ATmega32 (via UART) to ESP8266, and ESP8266 re-transmits this ...
0
votes
1answer
40 views

Where MOSI is triggered low or high

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

Increase NPN transistor rise and fall time

I'm trying to emulate an automotive sensor with AVR and transistors. I have three resistors connected in series. Using AVR digital outputs (5V) to drive the transistors base, I "short circuit" to ...
0
votes
0answers
10 views

Deploying 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 the LED based for an assignment. ...
2
votes
0answers
18 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
360 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
47 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
547 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, ...
0
votes
1answer
72 views

Why does my AVR microcontroller not work without AVR DRAGON?

I have the most annoying problem I have ever come across. The company I worked have an embedded device of theirs and the main designer left the company. They told me to reprogramme the device with C ...
1
vote
1answer
45 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
38 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
0answers
23 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 ...
0
votes
1answer
57 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
127 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
63 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
65 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
45 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
88 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
80 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: ...
-5
votes
1answer
46 views

IHave a problem with ADC in AVR

Hello.,I'm working on a project and I didn't get that How I change the range from 0 to 1042(ADC 10bit) To the range from 0 to 5
0
votes
1answer
62 views

Help with Atmega32u4 custom PCB

I have attempted to design my own custom Atmega32u4 board, but when I assembled it it didn't show up in windows device manager. I fixed the problem where I forgot to connect VBUS to VCC with a jumper ...
1
vote
2answers
191 views

Timer0 overflow interrupt does not work on ATtiny10

I am trying to use the Timer0 overflow interrupt to make a little project. I used such a timer in the ATtiny45 and it worked, but with ATtiny10 no result. So I tried an easy LED blinking program and ...
1
vote
2answers
149 views

AVR bitwise operation: making a NOT with a microcontroller

I'm programming an ATtiny10, i have two spare pins, one of which is the external interrupt pin on PB2, and i want to write the inverse of that signal to PB1. I want to spare a component, since i have ...
0
votes
3answers
115 views

GPIO state of MCU (AVR) with no supply voltage

In general: what state do the GPIOs of a MCU (an AVR in my case) have when there is no supply voltage and the MCU is "off". Am I right that the pins are floating as there isn't any "reference" for the ...
0
votes
2answers
50 views

Atmega88p with shift register 74hc595

I need to use a shift register to control multiple leds, but I need to control each one individually. The idea would be to send a buffer with the data, however I need to have several active leds and ...
-1
votes
2answers
99 views

when dividing two integer result truncated to 0 [closed]

when i divide two integer and if the result is below like 0.987, then it become zero ...
0
votes
0answers
24 views

can't figure out why my micronucleus/V-USB setup doesn't work

I built a small attiny85-based board using vusb and essentially the schematic of the discontinued Sparkfun "AVR Stick" (at least on the usb/uC side; see https://www.sparkfun.com/datasheets/Widgets/AVR-...
0
votes
2answers
129 views

How to load immediate negative value in a register?

For example on 8-bit AVR given a register r16 I do something like ldi r16, 44 and this way I can give it positive values from 0 ...
1
vote
1answer
46 views

How to show a long sentence on character LCD by using bascom?

I want to show a long message that going to differ every time and it's 3 lines or less. This message comes from Sim900. I cant show the whole sentence on my 4x20 lcd. how can I print it in several ...
2
votes
1answer
95 views

Atmel Chip not recognized as USB device. How to troubleshoot

I've soldered the AT90USB1286 Chip on a PCB like on this circuit: Imgur If I measure the pins, caps, resistors etc. with a multimeter, everything seems to be powered and fine. Reset button pulls to ...
2
votes
1answer
227 views

Atmega naming scheme (324p vs 328p)

I am looking into AVR chips (big fan) for a personal project. I need capabilities similar to Arduino Uno, so I recently compared Atmega 328p and Atmega 324p. To my surprise the 324p has significantly ...
0
votes
1answer
56 views

AT90USB162 not detected in windows

I have an AT90USB162, have it set up like this: I'm trying to program the chip using Atmel FLIP, but I can't because it's not detected. What could be the problem and how can I fix it?
2
votes
1answer
64 views

Atmega32u - Ground in bus powered configuration

The Datasheet provies an example configuration for when the device is powered from the bus, and shows the bus Vss connected to ...