Questions tagged [atmel]

DO NOT USE THIS TAG. Instead use the relevant product tag, such as AVR, SAM etc tags. Besides, Atmel merged into Microchip in 2016, so still referring to your parts as "Atmel" is not very meaningful. Atmel Corporation (Nasdaq: ATML) was a leader in the design and manufacture of microcontrollers, capacitive touch solutions, advanced logic, mixed-signal, nonvolatile memory and radio frequency (RF) components.

DO NOT USE THIS TAG. Instead use the relevant product tag, such as AVR, SAM etc tags. Besides, Atmel merged into Microchip in 2016, so still referring to your parts as "Atmel" is not very meaningful.

Atmel Corporation (Nasdaq: ATML) was a leader in the design and manufacture of microcontrollers, capacitive touch solutions, advanced logic, mixed-signal, nonvolatile memory and radio frequency (RF) components. Atmel was acquired by Microchip Technology Inc. (Nasdaq: MCHP) in 2016.

621 questions
0
votes
1 answer

Passing defines to function

I'm programming with an AVR and I'm trying to create a function to set a pin as an output. I made a struct to hold the Register and Pin number like this: typedef struct Pin{ uint8_t pinNo; volatile uint8_t* pinReg; }; I then have this…
Nick
  • 9,285
  • 33
  • 104
  • 147
0
votes
1 answer

Why does giving a C variable the type "volatile" increase cycle counter?

I have the following C code. #include int main(void) { DDRA = 0xFF; PORTA = 0x00; while(1) { /*volatile*/ unsigned long int counter; for (counter=0; counter<14285L; counter++) { PORTA = ~PINA; // run to cursor here …
codedude
  • 6,244
  • 14
  • 63
  • 99
0
votes
1 answer

atmega8a fuses external crystal 16MHz

I´am working in a project with the atmel atmega8a MCU. I´ve designed a code that works with an external 16MHz crystal. For that reason i burn the atmega8a´s fuses with the AVRISPmkII programer (HIGH FUSE:C9 LOW FUSE:FF) for a external 16MHz crystal.…
0
votes
2 answers

Atmega8 necessary circuit for standalone working

I am developing a project to monitor solar voltage and battery voltage by displaying them on an LCD. I programmed an Atmega8 with an arduino. When I attached the LCD with the board it worked pretty well. So I detached it from board and made a…
Saqib Ahmed
  • 1,056
  • 14
  • 33
0
votes
3 answers

First Atmel Project

looking for a little help. I'm familiar with PIC Microcontrollers but have never used Atmel. I'm required to use an ATMEGA128 for a project at work so I've been playing around in Atmel Studio 6 the last few days. I'm having an issue however, I can't…
Killerb81
  • 53
  • 6
0
votes
1 answer

AVR-GCC support for ATXMega16a4u

I have a ATXMega16a4u mcu of Atmel and try to compile code with avr-gcc 4.7.2 (Fedora 4.7.2-1.fc17). I got this error: Unrecognized argument in option '-mmcu=atxmega16a4u' So I tried to compile code with -mmcu=atxmega16a4 (without 'u' in the end).…
Long Hoang
  • 567
  • 5
  • 15
0
votes
1 answer

Getting to print a character on the screen in assembly language

I am currently working on learning the AVR assembly language. I am using the last version of AVR Studio and I am working with the ATmega124. Is there anyway to print a character to the screen/terminal? I have been trying to print just one letter,…
tgirgin
  • 17
  • 1
  • 9
0
votes
2 answers

I can't assign value to array

In AVR programming with atmega32, I can't assign a value to an array. I am getting the error: Assignment of read-only str[i] What am I doing wrong? My code is: const char str[1000]; void Serial_tx(unsigned char ch) { for (i = 0; i < 10; i++) …
0
votes
1 answer

AVR's Program memory

I ve written a code in C for ATmega128 and I d like to know how the changes that I do in the code influence the Program Memory. To be more specific, let's consider that the code is similar to that one: d=fun1(a,b); c=fun2(c,d); the change…
Herc11
  • 49
  • 1
  • 3
0
votes
3 answers

C Function Definition and the Extern Keyword

I've been trying to understand the linkage error that I'm getting regarding the _sbrk function and stumbled across this function definition in a library. extern caddr_t _sbrk(int incr); // ... some other definitions ... extern caddr_t _sbrk(int…
nonsensickle
  • 4,438
  • 2
  • 34
  • 61
0
votes
1 answer

Where can i get am335x microcontroller board registers header file?

Hi i was previously using the atmel at91 microcontroller and for all the register values i was refering the foolowing header files Linux/atmel_serial.h and linux/atmel_pdc.h. Now i have shifted to an Texas Instruments devgeloper board which is using…
mayukh
  • 129
  • 1
  • 2
  • 9
0
votes
2 answers

Can I use Valgrind to find static memory errors?

I'm working on an embedded program. I use the avr-gcc tool chain to compile the C source from my MacBook Pro. Until recently things have been going pretty well. In my latest development iteration though, I seem to have introduced some sort of…
Travis Griggs
  • 21,522
  • 19
  • 91
  • 167
0
votes
1 answer

How can I insert a single byte to be sent prior to an I2C data package?

I am developing an application in Atmel Studio 6 using the xMega32a4u. I'm using the TWI libraries provided by Atmel. Everything is going well for the most part. Here is my issue: In order to update an OLED display I am using (SSD1306 controller,…
SVFeingold
  • 67
  • 1
  • 1
  • 7
0
votes
1 answer

new ATMEGA1281 and avrdude

I'm experiencing sometimes problems when programming my new ATMEGA1281. It is suposed to be the same as my old one, the only difference I guess is the serial number: ATMEGA1281 16AU 1104 vs ATMEGA1281 16AU 1304 I'm used to program the ATMEGA1281…
JokiRuiz
  • 311
  • 3
  • 12
0
votes
1 answer

1 MHz timer on a 16 MHz ATmega8535

I can't seem to get my head around this, although it looks quite easy to me. I've made many timers in my Atmel ATmega8535, but this one just hits me. Also, I've seen many calculations and such, but it was not quite what I was looking for. It's quite…