Questions tagged [winavr]

Open source software development tools for the Atmel AVR series.

WinAVR is a suite of executable, open source software development tools for the Atmel AVR series of RISC microprocessors hosted on the Windows platform. It includes the GNU GCC compiler for C and C++.

68 questions
2
votes
1 answer

Big hex file from small AVR program

I am now teaching my friend how to program AVR microcontrollers. We've written this small program, which sends simple morse-like code. The problem is that, after compilling it both with AVR-GCC and WinAVR the a.out file is almost 30KB and the hex…
jblew
  • 506
  • 3
  • 9
2
votes
1 answer

AES function in AVR Crypto Lib not compiling

I'm trying to use the AES function in AVR Crypto Lib (http://avrcryptolib.das-labor.org/trac/wiki/AES) in my AVR project however when I copy all the required files it gives me the errors below. I'm using WinAVR on Windows and have also tried this on…
2tails
  • 31
  • 4
2
votes
1 answer

WINAVR not finding file in include path with whitespace

When I supply an path for EXTRAINCDIRS (in the Makefile, following the sample provided by WINAVR) without whitespace, the compiler is able to find my header file, but when I use a path containing whitespace (enclosed in quotation marks, as the…
JellicleCat
  • 28,480
  • 24
  • 109
  • 162
1
vote
1 answer

Linking .h & .c Files to Main.c with WinAVR

I am using WINAVR to progam an Amtel ATMEGA328 Chip. I am trying to Link a library to my file but I am not sure exactly how to do it, and what I need to edit in the make file. I have a lcd_lib.h and lcd_lib.c file that I want to include in my …
Michael
  • 8,229
  • 20
  • 61
  • 113
1
vote
1 answer

Using LUFA as CDC for String Transmission

I'm trying to use my AT90USB162 (Minimus USB board) as a CDC for sending a constant string to an hyperterminal connected to a comport. So I got the demo code Demos/Device/ClassDriver/VirtualSerial and made some changes: In makefile: MCU =…
Rego
  • 1,118
  • 1
  • 18
  • 40
1
vote
1 answer

why adc always reads 1023 irrespective of input

I am trying to read a analogue voltage using the ADC in attiny85. But the ADC register always read 1023 irrespective of what input is given. Moreover when the ADC pin is measured with a multimeter it shows nearly 3.1V. I aasumed that it is pulled…
It'sDK
  • 23
  • 7
1
vote
2 answers

How to find the address of a variable when using AVR?

I am trying to write a program that detects pixel level collision of bitmaps on a Teensy micro controller compiling with AVR-GCC. I am trying to work out how to calculate the position of a single byte of the bitmap on the screen and have been told I…
david_10001
  • 492
  • 1
  • 6
  • 22
1
vote
1 answer

How to take value from DALLAS 18B20 using Atmega 32

I have atmega 32 and DALLLAS 18b20. the out put of the temp sensor is digital in one wire. can any one suggest me how to read the value using ADC channel. thanks in advance.
Md . Sojib Ahmed
  • 431
  • 4
  • 14
1
vote
2 answers

How to combine two received inputs and read it as one whole number in WINAVR?

I want users to enter 2 digits using c=ReceiveByte() command. For example, I want the user to do the following : Enter 5 Enter 3 Output number 53 in ascii value on screen ( using hyperterminal ) Store number in a single array Use that number for…
NLed
  • 1,845
  • 14
  • 39
  • 68
1
vote
3 answers

Set a one bit in an 8-bit PIN without changing the other bits

Using winAVR for the following code. I got an 8-bit PIN here that I need to OR it with 00000010 or 0x02 to set the 7th bit. Now what I have to do is the following : Set Port B bit 7 Wait for 1ms Clear port B bit 7 wait 19ms BUT, I shouldn't…
NLed
  • 1,845
  • 14
  • 39
  • 68
1
vote
1 answer

Array in Proteus using WinAVR C size issue

I have a lab assignment which needs me to use an Atmega328P to do an ADC, and with USART, transmit the digital value to a MILFORD-4X20-BKP LCD display. The LCD needs to display the value in a 2 byte format (decimal, 0-255) on the first line, and a…
Tomi Fodor
  • 15
  • 6
1
vote
0 answers

AVR-GCC Compiler not in toolchain list eclipse

I'm trying to program in C for arduino and I'm trying my very best to avoid having to use Atmel Studio I've installed the AVR plugin for eclipse on the MARS release. I've downloaded and extracted WinAVR (and added it to PATH) In Eclipse preferences…
Gelunox
  • 772
  • 1
  • 5
  • 23
1
vote
1 answer

AT32UC3/WinAVR const variable at fixed address

I'm using a AT32UC3B0256 microcontroller in combination with AVR32Studio 2.6 and I wouuld like to please a constant variable at a fixed address ( e.g. at position 0x80799999) at the end of the flash. const int variable __attribute__((section(????)))…
1
vote
1 answer

How to convince avr-gcc, that the memory position of a global byte array is a constant

I writing a fast "8 bit reverse"-routine for an avr-project with an ATmega2560 processor. I'm using GNU C (WinAVR 20100110) version 4.3.3 (avr) / compiled by GNU C version 3.4.5 (mingw-vista special r3), GMP version 4.2.3, MPFR version…
Thomas
  • 595
  • 6
  • 15
1
vote
1 answer

avarice from winavr not working with usb jtagice3

I am using win-avr with eclipse to build and debug my project with ATxmega256a3bu devie. when I tried to debug the code using avarice using following command: avarice --part atxmega256a3bu -mkII --jtag usb --read-fuses it shows the following…
shreyas_patel21
  • 317
  • 1
  • 4
  • 14