Questions tagged [avr]

AVR is the family of microcontrollers used in Arduino boards.

Filter by
Sorted by
Tagged with
0
votes
1answer
2k views

Error uploading to ATtiny

I followed Great Scott's video on YouTube for uploading to an ATtiny85. When I tried I got the following error messages: Arduino: 1.6.7 (Windows Vista), Board: "ATtiny85 (internal 8 MHz clock)&...
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 ...
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 ...
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
2answers
116 views

Help - Atmega328p, converting a PWM servo code from pin9 to pin6

I found a working code that uses pin9 (PB1) on my Arduino for controlling a Servo, but in my project, an ultrasonic sensor is already using that pin/timer. I want to convert the code to use pin6 (PD6),...
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
1answer
387 views

BASCOM-AVR stk500_2_ReceiveMessage(): timeout: -1

Arduino Uno R3 Windows 10 Bascom AVR The ON is alright. The LED flickers now and then. The RX and TX flickers when I press the program button on Bascom but then disappears almost immediately. ...
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 ...
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 ...
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 ...
2
votes
1answer
2k views

Uploading .hex to ATTiny13 using Arduino

I would like to upload a .hex to ATTiny13V (or '13A) using Arduino Uno R3. I think I know everything to do, but ATTiny13 ISP support and Arduino IDE is a bit search-and-find, and I have some grey-...
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** ** //...
3
votes
1answer
8k views

How to convert Arduino example sketch to a complete c++ project?

I'm experimenting something new with my Arduino Leonardo. I removed its original bootloader and flashed it with LUFA mass storage example with added functionalities(now its a firmware). I'm trying to ...
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 ...
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 ...
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
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) ...
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) ...
2
votes
2answers
974 views

programming arduino in pure c

I'm trying to flash pure c-code to arduino Mega2560 board from linux using avr-gcc & avrdude. Compilation is done , now trying to flash using avr-dude, getting error as "avrdude: stk500_recv(): ...
-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 ...
1
vote
0answers
223 views

AVR-Toolchain for Arduino crashes on Mac OSX 10.11.6: Hints or debugging help needed

My Arduino IDE does not compile any project since I updated from Mac OSX 10.6.8 to 10.11.6. I even tried reinstalling and also manually installing the original AVR-toolchain. But the behaviour did ...
0
votes
2answers
567 views

Use Arduino Uno to program the on-board Atmega328 in C

I have an Arduino Uno board. I have seen how it is possible to program external AVR's through the Arduino Uno board, for instance an ATtiny. But I'm starting with c for atmel µc and I just want to ...
2
votes
2answers
5k views

Since double and float represent the same data type (usually), which is preferable?

It looks like on ATMega based boards, float and double are equivalent 32-bit (4-byte) data types. However, on the Arduino Due, doubles are 64-bit (8-byte) where floats are 32-bit (4-byte), same as ...
2
votes
1answer
207 views

AVR-GCC can't call function located on fixed address

I wrote the following code: #include <avr/io.h> __attribute__((noinline, section(".app_start"))) void app_start() //app_start section starts at 0xFA0 { //register_packet_dispatch(...
0
votes
1answer
133 views

avr-gcc -D is ignored

Im trying to use XCode to compile avr program with arduino libs but seems like something wrong with my Makefile because it throws me warnings like # warning "F_CPU not defined for <util/delay.h&...
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
2answers
8k views

Can't burn bootloader through Arduino Nano clone ISP to atmega328p

I'm trying to use a Nano v3 as ISP to program an atmega328p on a board with ISP headers: I followed the instructions under https://www.arduino.cc/en/Tutorial/ArduinoISP which I think have been ...
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 ...
-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 ...
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 ...
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
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
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(){ ...
2
votes
0answers
906 views

Does Proteus simulate external interrupts properly using Arduino? I can't get them to work

I am trying to simulate an interrupt with an Arduino Uno in Proteus. This is the simple test code that I'm using: void introutine() { digitalWrite(13,HIGH); } void setup() { pinMode(13,OUTPUT); ...
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 ...

1
2 3 4 5