Questions tagged [atmega16]

ATmega16 is one of Atmel's 8-bit AVR microcontrollers in the ATmega product range featuring 16KB programmable flash memory. Unless your question is specifically targeted towards ATmega16, consider using the more general [atmega] tag.

ATmega16 is one of 's 8-bit microcontrollers in the product range featuring 16KB programmable flash memory. Unless your question is specifically targeted towards ATmega16, consider using the more general tag.

96 questions
0
votes
1 answer

PWM with ATMega164PA

I am trying to increase the brightness of an LED using PWM with Timer0 on the ATMega164PA. After running my code below the LED just stays emitted and doesn't vary its brightness. Please take a look at my code and tell me if there is something I am…
LoneCoder
  • 45
  • 6
0
votes
1 answer

Unable to change code from white to black line in Line Follower Robot

I am using Atmega16A and L293D motor driver in my Line Follower. I am using code for following white lines only but now I want it to follow black line. I first thought they are linked by color I tried changing the color codes, but no result achieved…
0
votes
3 answers

ATmega16 ADC Code not working

#define F_CPU 1000000UL #include volatile uint8_t adcvalue; int main(void) { DDRA =0x00; DDRC = 0xff; // enable adc ADCSRA |= (1<
user247954
  • 79
  • 1
  • 8
0
votes
1 answer

out of program memory in assembly

i write a program for ATmega32 to get 8-bit number and show in 7segment but when i simulate it in Proteus it shows me that it is out of program memory what should i do exactly? .INCLUDE "M32DEF.INC" .ORG $00 //data to save in program memory .DB…
user6200081
0
votes
1 answer

Measuring the period of a square wave using microcontroller

I am new to microcontroller. The following code measures the period of a square wave. I have marked some lines which I haven't understood. The code is as follows: #include #include ISR(TIMER1_CAPT_vect) { int…
user4650623
  • 17
  • 2
  • 11
0
votes
0 answers

Moving cursor in C using atmega16

We're trying to make a project using atmega 16 and C language. The problem is that whenever we want to move a cursor, it goes to random places instead of moving one character right/left. Our first idea was just LCD_command(0x10); for going left.…
lawstud
  • 185
  • 14
0
votes
2 answers

How does division by constant work in avr-gcc?

In avr assembly, I wanted to divide a number by a constant. I checked how to see how avr-gcc does it. So in a c file I have : #include uint8_t divide_by_6(uint8_t x) { return x / 6; } and when I run avr-gcc -O3 -mmcu=atmega16…
orestisf
  • 1,396
  • 1
  • 15
  • 30
0
votes
0 answers

How to connect atmega 32 to webserver wirelessly?

I am doing a project where in i am using Atmega 32. Atmega32 will be receiving the content from the sensors using RF communication. Now i want to store this data directly on my webserver. I have searched on the net. I got a particular IC that TI…
0
votes
1 answer

arduino as isp and to burn atmega16 using avrdude compiler

I am trying to burn my atmega16 with arduino as ISP. So far the codes have been uploaded to my arduino flawlessly. I have uploaded arduino as ISP codes to my arduino, I have burnt bootloader of atmega16 using arduino IDE. As I sent the core working…
user5229412
0
votes
1 answer

LUFA USB Connection Timeout

Someone pro in LUFA framework and AVR microcontrollers? I have a function that builds a table (stored on heap memory) with 256 elementes received on my Usb connection and the program takes to long to generates this table that my USB connection…
JNeto06
  • 25
  • 5
0
votes
1 answer

ATmega16 programing-registers mismatchs

I am programming ATmega16 and I chose that controller in device manager(atmel studio 6.2) but the registers don't match with the registers in the datasheet for ATmega16. I am using ICE 3 and I tried with the simulator but it is the same result.…
Milos
  • 13
  • 1
  • 6
0
votes
2 answers

Issue with AVR Keypad code

I have written code for reading keypad matrix in Atmega 328. But I am not getting the result for the key connected to Row0 and Column0. Rest all 3 keys are detected correctly. Below is the code. I am not able to makeout what the issue is. There must…
Mahesha Padyana
  • 431
  • 6
  • 22
0
votes
1 answer

Why I am always getting Zero PWM output?

I want to output two different analog values with 10 bit resolution i.e. dac_value ranging from 0-1023. I am using ATmega16 with external crystal 4MHz. I have also tried connecting RC filter at output but nothing changed. I am constantly getting…
Yash
  • 145
  • 9
0
votes
2 answers

Implicit declaration of function and conflicting type - AVR

This is my first program for AVR. While building, the code is showing error: conflicting types for 'Encode' implicit declaration of 'Encode' I have written the following code: #include #include #include #define…
Yash
  • 145
  • 9
0
votes
1 answer

How handle directions with interrupt in Proteus

I want to implement Snake game with Atmega16 I following this tutorial. My problem is I couldnt handle the KeyPad ! I found another tutorial (here) about one Button with interrupt But in Snake we need 4 button for our directions And I dont know how…
Amir
  • 16,067
  • 10
  • 80
  • 119