avr

What's the difference/relationship between avr and Arduino?

I've been interested in hardware programming recently but not started yet. I did some searching working,and have a vague idea: Arduino is a combination of both chip and breadboard. avr is a single chip,and need to buy a breadboard to get started. Can someone ensure or deny this? ...

Am I overflowing my AVR's flash memory with a program that's too big?

I have a project where an ATtiny2313V is controlling a 7x5 LED matrix to display scrolling text. To display the text, I built a font which is stored in the flash with the rest of the program. The whole program, including the entire font, takes up 1106 bytes. But when I load it into the chip, it doesn't seem to run; instead it just ligh...

8 bit enum, in C

I have to store instuctions, commands that I will be receiving via serial. The commands will be 8 bits long. I'd like to use Enumerations to deal with them in my code. Only a enumeration corresponds to a ... on this platform I think a 16 bit integer. I need to preserve transparancy between command name, and its value. So as to avoid ha...

how bad is it to use dynamic datastuctures on an embedded system?

So IN an embedded systems unit, that i'm taking at uni next year, we will learn that dynamic data structures are a bad thing to have in an embedded system program. but the lecture notes don't go into why. Now i'm working on a moderate scale, embedded systems\ 'LURC' controller, mostly just takes advantages of the peripheral of the "Butt...

Go port to the AVR architecture?

Ever since I heard about google's new language Go I wanted to use it for microcontroller programming. In particular Atmel AVR micro-controllers like the Atmega series. Is there a Go port for this architecture? ...

How can I jump relative to the PC using the gnu assembler for AVR?

I have a binary file that I've disassembled using avr-objcopy. The interrupt vector table looks like: 00000000 : ; VECTOR TABLE 0: 13 c0 rjmp .+38 ; 0x28, RESET 2: b8 c1 rjmp .+880 ; 0x374, INT0 4: fd cf rjmp .-6 ; 0x0 6: fc cf rjmp .-8 ; 0x0 8: fb cf ...

Turn on PC with USB-device

I want to be able to turn my PC on and off using an IR-remote sensor that is connected via USB to the PC. The sensor is a custom PCB implemented with an AVR microprocessor and V-USB software USB-implementation. Now, turning off the PC is no problem with software, but is there any way to turn ON the PC using USB? (Please note, I'm not t...

I'd like to move on to µC programming, but I have absolutely no idea where to start from.

Hello, I've been thinking quite some time about 'moving on' to MCU programming, but the problem is I've never worked with any microcontrollers or similar. As I've been told, AVR and PIC are the most common microcontrollers among hobbyists, and apparently most people suggest AVR for newcomers like me, due to its 'C-friendly architecture'...

Wireless communication: AVR based embedded system and iPhone

What is the best way to realize wireless communication between an embedded system (based on an AVR controller) and the iPhone? I think there are only two options: either WiFi or BlueTooth. The range is not really a problem, since both devices should stay in the same room. I have no idea, if there are any useful WiFi boards that can be c...

Function pointer location not getting passed

I've got some C code I'm targeting for an AVR. The code is being compiled with avr-gcc, basically the gnu compiler with the right backend. What I'm trying to do is create a callback mechanism in one of my event/interrupt driven libraries, but I seem to be having some trouble keeping the value of the function pointer. To start, I have ...

WiFi communication to embedded display

Hi, I'm trying to create an embedded outdoor display of bus arrival times at my university. I'd like the device to utilize my school's secured WiFi network to show arrival time updates determined from a server script I have running. I was hoping to get some advice on the high-level operation of this thing -- would it be better for the d...

Using array of chars as an array of long ints

On my AVR I have an array of chars that hold color intensity information in the form of {R,G,B,x,R,G,B,x,...} (x being an unused byte). Is there any simple way to write a long int (32-bits) to char myArray[4*LIGHTS] so I can write a 0x00BBGGRR number easily? My typecasting is rough, and I'm not sure how to write it. I'm guessing jus...

how to get the size of a C global array into an assembly program written for the avr architecture compiled with gcc

I have a .c file with the following uint8_t buffer[32] I have a .S file where I want to do the following cpi r29, buffer+sizeof(buffer) The second argument for cpi muste be an immediate value, not a location. But unfortunately sizeof() is a C operator. Both files are compiled to separate object files and linked together afterward...

How do I program an AVR Raven with Linux or a Mac?

This tutorial for programming these starts with programming the Ravens and Jackdaw with a Windows box. Can I do those initial steps with avrdude on a Linux or OS X machine instead? If so, how? Is there any risk of bricking the hardware if I just try? I have a USB JTAG ICE MKii clone, which is supposed to work for this. I'm totally...

Driver for USB AVR JTAG-ISP device

I've got a programming device called USB AVR JTAG-ISP v. 1.2. Where can I find drivers and a good IDE for it? ...

Strange Serial MisComunication

Ok, so I have 3 devices. an AVR Butterfly microcontroller, set up with USART A Bifferboard, running Debian, using a custom made program for serial. A Desktop machine running Br@y's. So I'm trying to make the Bifferboard send serial to the AVR, But the AVR never recieves the signal, (We've checked the wires) But if i connect the AVR to ...

Unit tests for interrupt-heavy code

I am writing C code for an AVR chip. The code is heavy on interrupt serivce routines which wait on serial ports, ADCs and timers. The ISRs write to buffers which the main loop examines when it gets to them. I design the buffers so that ISRs can update them while the main loop is reading them. I want to verify that this works. I have uni...

Eclipse, the AVR Plugin, and Arduino

I'm attempting to compile Arduino code in the Eclipse IDE using WinAVR and the AVR IDE plugin, and I'm running into one major stumbling block - when I try to compile the code I get the following error: /usr/bin/sh: g++: command not found make: *** [main.o] Error 127 Yeah, I bet not...I'm using Windows Vista. I have the paths to WinAVR...

AVR Analog Comparator + Internal Pullup?

I have what I hope is a simple question pertaining to the Atmel AVR microcontrollers. So I want to use the ATTiny85's Analog Comparator to determine if a signal is above or below a threshold. This signal is normally "floating" and pulled toward ground when "active" (i.e. it's an active low - open collector signal). If I enable the pullup...

AVR sbi command - Error: number must be positive and less than 32

I've spent a good while getting my AVR development system set up with the full GCC tool chain (everything is the most recent current stable version) and I have solved most issues with it but one. This following code gives me an error which I just don't get. The AVR assembly manual states that the sbi instruction can accept 0-7 as a cons...