Questions tagged [avr]

AVR is the family of microcontrollers used in Arduino boards.

Filter by
Sorted by
Tagged with
1
vote
0answers
24 views

About ATmega32 UART receive

The following code is the code for UART receving Char uart_receive { While( ! ( UCSRA & ( 1 << RXC ) ) ); return UDR; } This function will not return the UDR value until the while loop ...
1
vote
0answers
104 views

Attiny85 problem [closed]

I am trying to make attiny84 4ch IR relay … in following code … #include <IRremote.h> int RECV_PIN = 0; int RELAY_PIN = 2; IRrecv irrecv(RECV_PIN); decode_results results; // Dumps out the ...
1
vote
1answer
45 views

Problem with programming digispark ATtiny85 board with Arduino IDE

I have bought a Digispark ATtiny85 board to learn about that microcontroller. So I tried using internal register names in the code rather than using Arduino in built functions. I can get the board to ...
1
vote
1answer
27 views

About maximum length of matrix can be use for matrix invertsion on atmega32

what is the maximum length for matrix can be used for matrix inversion on atmega32,for example,can we implement matrix inversion for 15x15 matrix on atmega32? And if it can be done on atmega32..does ...
0
votes
0answers
66 views

Digispark green led being the only one to turn on

I was doing some tests with an ATtiny85 Digispark module using Arduino IDE on my Windows PC. I was testing some stuff with the DigiKeyboard library from Digistump. Everything was going fine until ...
0
votes
0answers
35 views

Is it possible to implement old AVR library onto arduino (specifically, NodeMCU esp8266)

I am a Computer Engineering Undergrad, currently in a cryptography(computer security) course, and I was assigned to do projects about implementing µNaCl library onto Arduino. I currently own a nodemcu ...
0
votes
1answer
330 views

Attiny85 microcontroller programming without arduino

I have decided to make a simple project so thinked about arduino but that seems very worthy so i decided to use attiny85 ic for my project,but i don't have arduino or avr to program it. Is there any ...
2
votes
1answer
49 views

3-instruction remote machine coding Arduino Atmel chip over a serial line from a tethered (host) PC

I'm trying to write a program for AVR Atmel 328 chip on Arduino Nano board that will allow me to send machine code instructions to the chip over a serial line, run/execute them on the chip, and ...
3
votes
4answers
550 views

How can a function/method determine if a const array passed in is PROGMEM (flash) or not (RAM)?

Is it possible for a function/method to know if a constant array that has been passed in is in flash or RAM? If I have a method or function that receives a constant array that is in RAM, the array is ...
0
votes
0answers
39 views

For loop blocking other program mm

Currently practicing my programming knowledge So,am using atmel studio to program atmega328p I have a "for" statement that flashes an LED(led1) 5 times when button1 is pressed. Then another "if" ...
0
votes
0answers
46 views

AVR Relocated code: calling global constructors

In my setup (UARTBus) i use a host application on an AVR which can accept application code from a custom bus system and the host can call that application program periodically. The application code ...
0
votes
0answers
44 views

how do i convert to assembly code (AVR assembly) from arduino

i have code in the Arduino ide for a temperature sensor that shows the temperature on three 7 segment displays, it shows the temperature to one decimal point. using an arduino uno. I am struggling to ...
0
votes
0answers
49 views

Trying to use Timer0 on Arduino Mega

I've recently been looking at Timers and I'm trying to generate a PWM frequency at 250000Hz using Timer0 on PIN 4. When I set OCR0A = 63 I get nothing from the light however when I set OCR0A = 125 it ...
1
vote
1answer
144 views

AVR & PIC 8-bit Microcontrollers - Can you add: external flash memory, external RAM, video & audio output, more address busses?

so I was planning on creating a mini PC out of basic ICs and 8-bit microcontrollers such as ATTinys and/or PICs and I have several questions regarding those: Can you add external RAM, say with SRAM, ...
-2
votes
1answer
45 views

Reading PROGMEM results in an incorrect hex value [closed]

I'm sure I'm doing something stupid here, but the code below is supposed to write the test hex values to a I2C EEPROM, however when I attempt to read the EEPROM it has the wrong values. Directly ...
0
votes
0answers
82 views

Batch programming AVR chips via ICSP with an esp8266

I had an interesting idea recently, but don't have all the knowledge needed to make it work. I know that several people have made Arduino programmers with an esp8266, allowing them to program the ...
0
votes
1answer
317 views

Use of progmem in ESP8266 vs AVR and also how to handle large dynamic strings

This is a somewhat tricky question dealing with implementation and best-practices of the ESP8266. I'd ideally hope that it's answered by people with in-depth knowledge on the problem. As you are ...
0
votes
0answers
21 views

about receiving float on Atmega32 from matlab

I want to receive a float on Atmega32 from matlab. I display the output on an lcd, but i receive 0.000, can any one help me? Please ... matlab code s=serial('COM1','BaudRate',9600); fopen(s) fwrite(...
0
votes
2answers
48 views

about receiving float on matlab from ATmega32 Avr

****i am using ATmega32 to send float and want to receive it on matlab,i send 4.85 from ATmega32 but on matlab i receive 4.260233679216239e-31...can any one help me..thanks in advance** ** //...
0
votes
0answers
67 views

AVR input pull-up working in simulator, but not working in hardware [Attiny13a]

Given that I accomplished shrinking size of my project and with huge help here and on arduino forums, basically rewrited to atmel studio, my "fire cat" displays all(but 1 led, this was problem before ...
1
vote
0answers
37 views

default in switch doesn't appear to execute

I have a situation where the default case in my switch statement doesn't appear to execute as expected. I wonder if there is some subtlety I'm missing here? Given the following enum: enum ...
0
votes
1answer
367 views

Cannot write to HID USB device (Arduino, V-USB, HidSharp)

I am currently prototyping an HID USB device using Arduino Nano and V-USB library. The problem is that although I can read from the device I cannot write to it. Here is the schema: As for the ...
0
votes
1answer
94 views

Atmega328p Uploads via ISP but not bootloader

I'm trying to upload a bootloader to my atmega328p on a custom pcb containing external oscillator at 16MHz. It is possible to upload program via ICSP pins using Arduino as ISP (Official Arduino Uno) ...
-1
votes
3answers
297 views

Why are embedded C codes are ending with “while(1)”?

I always see while(1); at the end of the C codes such as: #include <stdio.h> int main(void) { //Some code here... while(1); } If I'm not wrong that it always exists, what is the ...
0
votes
1answer
95 views

C++ State Machine / Wpmf-convesion

I'm quite a newbie using C ++. I am trying to implement in C ++, the state machine described in this link for C language: https://barrgroup.com/Embedded-Systems/How-To/Coding-State-Machines. I have ...
0
votes
0answers
30 views

Custom bootloader for battery level indicator

For a project I need to be able to read the battery level of the device regardless of the sketch currently running. For this I plan on adding a custom routine in the Arduino bootloader that reads the ...
0
votes
0answers
43 views

AVR program upload overrides unrelated program area

I develope a new bus system (uartbus) which includes a host application that can handle new program uploads throught the bus. How it's work in short: The host application flashed to the AVR. This ...
2
votes
2answers
593 views

Change the fuses of an Arduino Uno (can an Arduino Uno change its own fuses?)

For now, I'm using an Arduino Uno alone including its 328p (no other external chip to program). I would like to change its fuses to internal 8 Mhz clock (because then I'll move the 328p out of the ...
0
votes
2answers
434 views

Using an Arduino Nano to program (as ISP) a standalone 328p

I uploaded the ArduinoISP sketch to an Arduino Nano to use it as a programmer for other chips. It worked successfully to program an ATtiny45, I did the usual wiring between them, and added a 10uF ...
0
votes
0answers
50 views

about required memory size in ATmega32 to execute a certain program

If I want to add two numbers and print the output on LCD char answer[8]; float a=5.1,b=3.2,c; c=a+b; dtostrf(c,8,3,answer);//convert float to ASCII to print it on LCD for(i=0;i<8;i++) ...
0
votes
1answer
411 views

Uploading Firmware to Atmega1284p using ESP8266 with AVRISP as programmer

I am trying to flash a new Firmware to my Ender 3 Pro. I am using the ESP8266 as an ISP via AVRISP over Wifi. I have a 10mF capacitor between the ground and reset of the ESP8266 I followed this ...
0
votes
1answer
164 views

How to set PC (Program Counter) register to another function (for scheduler)

I am trying to implement a scheduler for Arduino Mega 2560. I think I lack understanding of how to set the PC register to another instruction. Here is my simple approach so far: void dummy(){ ...
1
vote
1answer
84 views

about how to share one External serial EEprom using two microcontrollers?

strong texti have Vector nav100 IMU sensor that sends data serially UART.I want to receive data from it using ATmega32 and then store data in AT24c1024 EEprom using I2C,then using another ATmega32 to ...
1
vote
1answer
107 views

about how to write data in the whole EEprom?

I have interfaced AT24c1024 EEprom with ATmega32.AT24c1024, which has 512 pages each of 256 bytes. There are two mode of writing (byte write and page write). In page write mode, it is capable of ...
-3
votes
1answer
56 views

Rate of serial communication (UART) of a sensor is faster than speed of processing of microcontroller

I have a Vector Nav VN100 IMU sensor that sends data serially UART. I have interfaced it with ATmega32. It receives data (ROLL angel) from the sensor and according to the ROLL angel, it controls a ...
0
votes
2answers
47 views

Atmega collecting and relaying interrupt calls

I like to collect all possible interrupt and relay them to an alternative handler interrupt table what the user can set. In order to do this i have to: 1) collect all/any interrup request 2) ...
1
vote
1answer
73 views

Arduino Timer0 Piggyback

As described here https://learn.adafruit.com/multi-tasking-the-arduino-part-2/timers I use timer 0 to get my own timer with a milliseconds resolution. It is setup like this: void setup (void) { ...
1
vote
0answers
59 views

MEGA2560 only starts program after pressing RESET button multiple times

I am working on a program where I am controlling an MP3 player by using UART between my MEGA2560 and the MP3 player. The MEGA2560 sends serial commands to the MP3 player when external interrupts are ...
0
votes
2answers
168 views

About ATmega32 event system

From my reading on internet i found that the Event system allows peripherals to trigger each other without involving the CPU...does the event system is software or hardware?also does ATmega32 support ...
0
votes
0answers
38 views

freeRTOS tasks never run on Lightblue Bean

Although Punchthrough no longer supports the Bean and Bean+ they still maintain the online compiler and reference materials: Bean Github Bean reference One of the external libraries they've included ...
0
votes
1answer
254 views

Help understanding how avrdude works with ArduinoISP and why its not working for me

I am trying to use avrdude with a Mega2560 running ArduinoISP Note: I have the 10uF cap on the Mega2560 RESET line as described by Ardunio. Also, I am using avrdude/6.3 on Windows 10. The Mega2560(...
1
vote
2answers
192 views

Use ATTiny as a battery-backed RAM?

So, I found an interesting article the other day, and I'm trying to build a project that could benefit from a battery-backed memory (no wear limits, but keeps data over power cycling). The article ...
0
votes
0answers
34 views

Moving timer-related code into a separate file causing timing inconsistencies?

I have written the following code, attempting to re-implement the Arduino micros function: main.c #include <avr/interrupt.h> #include <stdbool.h> #define CLOCK_CYCLES_PER_MICROSECOND (...
1
vote
0answers
462 views

how to fix USBASP Unknown USB Device (device descriptor request failed) - Win 10?

I just recently purchased Usbasp from Ali Express, when i'm connecting it to the windows 10 desktop in device manager its Unknown USB Device (device descriptor request failed). How to fix this error? ...
0
votes
1answer
832 views

Restoring all fuse bits on AtMega328P-PU

I'm worked with Low Fuse bits in AVRDUDEPROG 3.3. Fuses was non-inverted. And by mistake I enabled SUT1 and SUT0, when SUT0 was enabled. And when I programmed avr, it shows me error that avrdude.exe: ...
0
votes
0answers
49 views

What would cause fuses to be writeable but bootloader not to be writeable?

I am trying to burn a bootloader onto an ATmega328P-AN using an Microcenter knock-off Arduino Uno R3 as my ISP for several days with no luck. The farthest I've gotten is writing and reading a few ...
1
vote
0answers
27 views

Custom Arduino Due Random Lock up

I have built my own Arduino Due Circuit board. I am having issues with it randomly locking up. I have researched the libraries and have ruled out any issues with them such as the Wire library. I am ...
5
votes
1answer
470 views

Can I program a factory fresh Atmega328P through UART pins without burning a bootloader?

Can I program a factory fresh ATMega328P using the UART pins without burning a bootloader? These pins are TX, RX, VCC, GND, and DTR pins in the schematic below. They are not the ISP/SPI pins 10-13. ...
-1
votes
1answer
233 views

About UART one transmitter multiple receivers

I have vector nav vn100 IMU that sends data serially rs232...I want to drive 4 servo motors using atmega32 upon roll angel from vector nav vn100..atmega32 can only drive 2 servos using hardware fast ...
1
vote
0answers
41 views

can an ISR change the value passed by pointer while the subroutine is executing?

So I am working on a project where the board plays a song on a buzzer using PWM and I want the song to stop when i press an external button typedef enum stateType_enum{ waitPress, debouncePress, ...

1
2 3 4 5