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
1
vote
0 answers

Atmega16 USART initialization

I can't for the life of me find why this code is not working to send a byte to my computer terminal window. It receives and works fine when I omit that line though. Receiving and sending also work seperately. Please note that this is over rs485 so…
edagres
  • 11
  • 1
1
vote
1 answer

Pulse width measurment

I want to measure pulse duration, but I need to measure 4 signals so I can't use Timer capture interruption as there is only 1 pin ICP1 providing that option (or can?). So I try to implement something like arduino pulseIn with the difference that I…
Long Smith
  • 1,339
  • 3
  • 21
  • 40
1
vote
2 answers

Digits not displayed properly, Unable to control output at particular pin

I am trying to display my input at microcontroller ATmega16 to 7 segment displays. I have found the following code on http://www.avr-tutorials.com/projects/atmega16-based-digital-clock but when I implimented it, it is not working. I am getting a…
Yash
  • 145
  • 9
1
vote
3 answers

How to use mutex in embedded C and Atmega 16?

I am writting a C code for Atmega Microcontroller and I want to use Mutex in it. What library to include? and how to implement the code? I want this Mutex to prevent a Timer interrupt from changing a variable during a function.
Abuzaid
  • 853
  • 8
  • 28
1
vote
1 answer

Codevision generate `.ASM` output

CodevisionAVR gets a .c file and generates .hex and .o outputs. Is it possible to generate .asm file out of it too?
zahmati
  • 1,261
  • 1
  • 10
  • 18
1
vote
3 answers

lcd initialisation

void lcdinit(void) { command1( 0x03 ); command1( 0x03 ); command1( 0x03 ); delay1(20); command1( 0x02 ); //lcd home delay1(10); Command( 0x28 ); delay1(10); Command( 0x08 ); //display of cursor off delay1(10); Command( 0x0C ); //display…
Komal
  • 85
  • 1
  • 2
  • 7
1
vote
0 answers

how to send sms from gsm sim900d to mobile

I am doing project. I want to send sms form gsm to mobile. I have code the AT commands of gsm modem in atmega16L controller using avr compiler. But have a problem it does not send sms. Please help me. My code is here. #include
Aziz rahman
  • 35
  • 2
  • 5
1
vote
4 answers

I'm new to avr. cant program it

I've written code below for a flasher led! in CodeVision as my first program!! with ATmega16. but I can't program it with extreme burner.CodeVision compiles it with 0 errors and 0 warnings. Extreme burner loads the .hex file successfully. But when I…
1
vote
3 answers

How to execute large code in less ram?

I have a doubt that , in all micro controllers the flash memory much more that ram( Example: atmega16 it is 16k, However the RAM is just 1 Kb). . So , how exactly that code is executed , does the CPU execute directly from the Flash itself , if yes…
Virendra Kumar
  • 947
  • 2
  • 13
  • 31
1
vote
1 answer

Can not compile code when i call this function

I am using Atmel Studio 6.1 and ANDLoad to flash ATMega16 MCU. If I compile code with this function called, ANDLoad gives me "Error in Flash Hex File 359". 359 line is 3rd line from the end of hex file. If I call function with no code inside it…
david.r
  • 39
  • 3
1
vote
0 answers

Stack pointer maximum values stored -SRAM memory

I would like to know if it is possible to know the maximal values stored in the stack pointer with that: (see the code below form my .lss file) And in the worst case, I would like to know what are these informations store in the SP? It is possible…
LevelUP
  • 11
  • 2
1
vote
1 answer

Converting uint16 from ADC flips negative

What I want to do: Turn the resulting 16bit number (after combining the two 8bit #s) into a string to use with my serial send function The problem: When using itoa, the result becomes negative once it passes the half way point (passing from the 15th…
Nick Yang
  • 13
  • 2
1
vote
0 answers

ADXL345 atmega16

i just started the project which requiers to connect ADXL345 to my Atmega16. I want to put device id on screen and read axis. So far i cant communicate with ADXL345. ON LCD only appears 0 I would be gratefull for any help. #include…
Matt
  • 11
  • 6
1
vote
2 answers

read multiple bytes from rs232 to uart (avr atmega16)

i am sending 4 bytes of data from my Pc serially to my atmega16. i use UART. one technique is to use the functoins given in datasheet but they block rest of the code as they use polling. so i am using a while loop. but i am unable to understand the…
M T
  • 161
  • 1
  • 2
  • 13
0
votes
1 answer

Using ATMega16's timer0 for sound generation

I am trying to make use of the ATMega16's timer0 to generate PWM pulses and output sound on a basic buzzer.. But i am facing a problem figuring out how i can be able to change the frequency of the waves im creating (to generate different notes) I…
Dany Khalife
  • 1,850
  • 3
  • 20
  • 47