avr

1k of Program Space, 64 bytes of RAM. Is 1 wire communication possible?

(If your lazy see bottom for TL;DR) Hello, I am planning to build a new (prototype) project dealing with physical computing. Basically, I have wires. These wires all need to have their voltage read at the same time. More than a few hundred microseconds difference between the readings of each wire will completely screw it up. The Arduino...

data breakpoints in avr studio

I want to set data breakpoint for TCNT1 register of ATMega16 in AVR Studio 4.17 Build 666. I add breakpoint by specifing in the Location field of "Add data breakpoint" window the value IO@0x2C. But breakpoint seems not work. Can some one help me how to setup a data breakpoint for an IO reginster? ...

SD card initialization SPI

Hi People I saw a lot of infos about MMC/SD cards and I tried to make a lib to read this.. (modifying the Procyon Avrlib) But I have some problems here. I Don´t change the original code and tried here. My problem is about the init of SD card. I have 2 here, a 256mb and another 1GB. I send the init commands like this order: CMD0, CMD55...

8051 microcontroller kit recommendation?

I'm a first year Computer Science student looking to get started with development for micro-controllers. I'd like to use the 8051, as it's common as dirt, and is used frequently in the real world. During my junior or senior year, I'll be taking a PIC micro-controller based embedded design class, so I'd rather not do PIC now; otherwise,...

AVR JTAGICE mkII

Original Atmel jtag programmer costs $300. http://www.atmel.com/dyn/products/tools_card_v2.asp?tool_id=3353 http://search.digikey.com/scripts/DkSearch/dksus.dll?site=us&lang=en&mpart=ATJTAGICE2 Which clone do you recommend me? Are they 100% clones? (work with avr studio, same fw etc.) thanks. ...

connecting avr atmega32 to shift register using USART??

Hello, I want to connect ATMEGA32 microcontroller to a shift register using USART via TXD pin, the shift register then performs serial to parallel conversion on the received data. but as you know, the shift register needs clocking , this clocking is fed via the microcontroller at baud rate frequency via XCK pin (here the USART acts as...

Why does avr-gcc bother to save the register state when calling main()?

The main() function in an avr-gcc program saves the register state on the stack, but when the runtime calls it I understand on a microcontroller there isn't anything to return to. Is this a waste of RAM? How can this state saving be prevented? ...

C variable variables

in PHP, I have something like function doStuff($in, $value) { $var = "V_" . $in; $$var = $value; } Is there a way to do something similar in C? Basically I'm trying to figure out how to make a sort of library to make working with IO pins on an AVR easier. So for example, there would be a function to set a particular pin ...

avrdude and atmega48pa

hey friends, Can i programm the atmega48pa with avrdude? I have problems with the signature ... % avrdude -pm48 -cavrisp2 -Pusb -V -U flash:w:main.hex avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.01s avrdude: Device signature = 0x1e920a avrdude...

Fast Hypotenuse Algorithm for Embedded Processor?

Is there a clever/efficient algorithm for determining the hypotenuse of an angle (i.e. sqrt(a^2 + b^2)), using fixed point math on an embedded processor without hardware multiply? ...

Arduino Bootloader

Can someone please explain how the Arduino bootloader works? I'm not looking for a high level answer here, I've read the code and I get the gist of it. There's a bunch of protocol interaction that happens between the Arduino IDE and the bootloader code, ultimately resulting in a number of inline assembly instructions that self-program ...

C Read char as binary

This is actually part of a project I'm working on using an avr. I'm interfacing via twi with a DS1307 real-time clock IC. It reports information back as a series of 8 chars. It returns in the format: // Second : ds1307[0] // Minute : ds1307[1] // Hour : ds1307[2] // Day : ds1307[3] // Date : ds1307[4] // Month : ds1307[5] // Yea...

AVR Long running code from within timer interrupt

I've got some code that needs to run every 2 minutes which seems simple enough. The problem seems that triggering a long running process from within a timer causes the timers to go wobbly? any suggestions. My C knowledge is not that great so help me out with some basic ideas. The MCU is an Atmel Mega128L The long running process is an ...

Interested in Device Programming. Where to Start.

Hi! All I've a Good Command over C++, But I've never done anything anything on device programming. I've some basic understanding on Digital Logic Design. But I am complete Noob in Electronics. Currently I am getting huge interest on microcontroller Programming. Where To Start ? I don't think one really needs to have huge amount of know...

AVRdude encrypt/decryption HEX file on the fly in VB

Hey all i am looking to decrypt my HEX code file for an ATTiny chip and programming it using the AVRDude command line interface. Problem being, i do not want the user to be able to see what the HEX file is at any given time. Can the VB.net Cryptography crypt the HEX file before i put it onto the server and then decrypt it after the prog...

Good programming podcasts?

Possible Duplicate: What good technology podcasts are out there? Are there good CS programming and Eletronics podcasts? Itunes U has a many classes turned into podcasts, but most of them are terrible to follow without video. ...

using winAVR and AVR studio 4 how to compile code written in C

I have installed winAVR and AVR studio 4 for compiling code written in C for but i can't simulate it there is error"mega32.h-no such file or directory" ...

Linear interpolation in direct digital synthesis

I'm working on a microcontroller DDS project in C and am having some trouble figuring out how to compute a linear interpolation to smooth the output values. The program as it stands now uses the top 8 bits of a 24 bit accumulator as an index to an array of 8 bit output values. I need to come up with a function that will take the middle...

Binary compatibility between avr-gcc 3.4.0 and avr-gcc 4.3.x

I have inherited an application that links to a library which MAY HAVE been built with gcc3. Or maybe with the imagecraft compiler. That information has now vanished to the heavenly bitfield and I am left with a libXXX.a library against which to link my app. I cannot recompile the libXXX.a because it requires certain unknown headers from...