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
6
votes
3 answers

How to convert Char into Float

How to convert an unsigned char value into a float or double in coding in AVR studio 4.? Please help I am a beginner, my question may sound stupid too :/ Like I have got a char keyPressed and I have printed it on the screen…
Mohit Goyal
  • 110
  • 1
  • 3
  • 11
4
votes
3 answers

How to use a variable as a parameter in a function that only suports constant expresssion

I'm using this function: __delay_cycles(var); and I get the following error: Argument to _delay_cycles must be a constant expression Fair enough! But how can I bypass this? I have to delay my program with a different value every time. I receive…
3
votes
1 answer

AVR Simulator like Proteus on ubuntu?

I am looking for an IDE not for compiling code, but for simulating a compiled code for AVRs, mainly ATMega16 ... I am familiar with Proteus on windows but as it turns out, it's not available for ubuntu and i would hate to install wine just for…
Dany Khalife
  • 1,850
  • 3
  • 20
  • 47
3
votes
2 answers

Writing and Reading data to EEPROM sequentially

I am working on my college project which needs to store data in EEPROM of AtMega32. I am able to write and read data at any particular location of memory. But when I try to write data sequentially form address 0 to 1023 I am getting wrong…
Ravi Sharma
  • 63
  • 2
  • 12
2
votes
1 answer

ATMEGA16L Pull-up isn't active

i wan't to get Inputs to my Atmega16L from a Button. Ideally i can use the internal Pull-up's, so i don't have to attach them externally. I've boiled down the code to the minimum: void main(void) { // SFIOR &= ~(1<
Felix Kunz
  • 354
  • 2
  • 15
2
votes
2 answers

Unable to Run BLDC motor using L6234 with ATmega16

I want to drive BlDC motor using L6234 Driver IC with help of Atmega 16 Controller. Logics for driving motor are given in the motor driver IC L6234 datasheet on page 9. Here is the link for datasheet. So, according to the datasheet I write a code to…
2
votes
2 answers

255 char. instead of 1023, Unable to set reference voltage

I am using ATmega16 in my project. I want to get the value=1023 when I give 5V as input, and 0 when input = 0. The readADC function reads the particular channel of micro-controller ADC. The frequency of my clock is 4MHz. But on reading the input,…
Yash
  • 145
  • 9
2
votes
2 answers

Implementing a web server on a microcontroller

I am trying to implement a web server on to a micro controller as a self learning project.I am considering Atmega16 and Atmega88 as primary options.Need to know which will be the best choice.
user1811378
  • 21
  • 2
  • 4
1
vote
2 answers

#define PORTX.x in Avr Studio 5 (ATmega16)

I'm writing a new and special library whith new algorithms and abilities for KS0108 GLCD Driver. I'm using ATMega16. My dot matrix GLCD dimension is 128x64. How can I use #define code to define different port pins? for example: #define…
user1163557
  • 43
  • 1
  • 5
1
vote
0 answers

Why doesn't my LED turn on when a certain distance is measured? Atmega328p and ultrasonic HC-SR04 sensor

I am using an Atmega16 to control a LED with an ultrasonic sensor. Basically the LED turns on if the distance is smaller than 100cm and otherwise it turns off. #include #include #include #include…
Khenan
  • 11
  • 1
1
vote
0 answers

Can not decode data from serial port arduino send to mqtt server mosquitto

I'm used ESP8266 receive data from atmega328pb via Serial and send these data to my MQTT broker (mosquitto). From server side I use NodeJS receive buffer but can not convert these data to string. Sample buffer:
mangovn
  • 364
  • 2
  • 12
1
vote
0 answers

Avra .db directive doesn't seem to be working properly

I am trying to write some code for an ATmega16. I have been using the avra (version 1.4.2) under FreeBSD 12.2-RELEASE. I have the following in my code segment: helloStr: .db "Hello World\0" It is my understanding that the bytes of the characters…
SamNt
  • 11
  • 1
1
vote
0 answers

Uno R3 wouldn't enter DFU mode

I recently bought an uno r3 from sintron. The board features an Atmel Mega16u2 serial interface but when I plug it to the usb port of my laptop, it's not listed as an usb device in the device manager. The L-LED is blinking with ~1Hz (maybe the…
1
vote
1 answer

What is the USART digital logic in AVR microcontrollers?

Just reading about USART connection in AVR microcontrollers and i faced this question: What is the digital logic used in USART(RXC, TXC and other internals) of the AVR microcontrollers? I've found the answer to this question in the datasheet of…
hexpheus
  • 741
  • 10
  • 22
1
vote
2 answers

AVR UART - FE, DOR, RXB8 bit buffering

I was reading the datasheet for the Atmel ATmega16 microcontroller and i came to this phrase in the USART section: The two Buffer Registers operate as a circular FIFO buffer. Therefore the UDR must only be read once for each incoming data! More …
hexpheus
  • 741
  • 10
  • 22
1
2 3 4 5 6 7