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

Questions tagged [avr]

AVR is an 8- and 32-bit microcontroller family developed by Atmel Corporation.

Filter by
Sorted by
Tagged with
1
vote
2answers
37 views

Picking up a cheap timer

I am currently working on ATmega328 timers. But it has maximum timer of only 16 bit. Even with a prescalar of 1024 and 16MHz clock, I can only produce a time interval of about 4 seconds. Although I ...
1
vote
1answer
150 views

control DC motor by Atmega and L298 code in Atmel Studio

I'm new to Atmel Studio. I used BASCOM-AVR until now. I know my question is very basic but I couldn't solve my problem by searching internet. I wrote a code in BASCOM (Basic laguage) to control two DC ...
0
votes
2answers
2k views

How to convert this arduino code snippet to AVR GCC?

I recently engaged with a university robotics project (based on ROS) and my main processing controller is Raspberry Pi and the system stability controller is Atmega 32 microcontroller (It is ...
1
vote
1answer
943 views

CC3D PWM control signal characteristic (to be simulated by Raspberry PI)

My goal is to control drone by Raspberry PI. The Raspberry PI uses camera and OpenCV, sends control commands to AVR microcontroller which will generate the PWM control signal. Meaning that it will ...
1
vote
1answer
2k views

Typical Problem in Simple Line Follower Using 3 sensors

I am working on building a line follower robot using ATmega2560 and I want its movement to be more precise. I am facing a very typical problem. It consists of three(3) IR sensors. The thickness of the ...
3
votes
2answers
2k views

Tuning PD for line follower

I am trying to make line following robot. I am using atmega328p mcu, pololu 10:1 motors, pololu qtr6-rc sensor, 2s li-po. Here is my code: ...
4
votes
2answers
379 views

Dealing with position inaccuracy and latency in PID Loop

Background: I am new to PID, for my first PID project I am using a simple P-Loop and 300 degree linear potentiometers for position feedback. I am using the roboclaw 2x60A motor controller. The motor ...
2
votes
1answer
529 views

how to make Mac detect AVR board using USBasp and burn program to it?

I am new to Embedded, starting with AVR programming using C. I am working on Mac OS 10.9.4, so far I am using avrdude and xCode as IDE. It works very well, for now I am testing my code using Proteus. ...
2
votes
1answer
867 views

Torque control and monitoring of servo

I am trying to control the servo motor operation by torque control by interfacing the sensor to an avr , which will continuously monitor the torque value from the sensor and control the torque ...
1
vote
1answer
74 views

How to programatically calibrate Turningy esc?

I have a Turnigy ESC and I am controlling it from AVR. Now I need to calibrate it to set the range of the input. With a servo tester I managed to calibrate it without any problems, more or less by ...
0
votes
3answers
812 views

H-Bridge using atmega8 microcontroller

I want to use my atmega8 uC as a h-bridge. Can anybody give me the source code using C, so that the microcontroller acts as an H-Bridge.
8
votes
2answers
503 views

Motors response different with high-frequency PWM

We are making a junior soccer robot and we just got our brilliant motors from Maxon. Setting the PWM timer to low-frequencies (around 39kHz or 156 kHz ) the robot acts as expected. But this produces ...
1
vote
1answer
913 views

problem in serial communication between PC and ATMEGA 8535(AVR)

I have written code to send data from controller to pc through serialport using interrupt but it echos garbage value exactly 3 times back. ...
5
votes
3answers
3k views

How to manage interrupts on an AVR?

I have a number of interrupt service routines on an AVR. These include interrupts for USART serial communication, timers, and SPI communication. For all of these, I use circular queues (using a start ...