atmega

Using a rotary encoder with AVR Micro controller

I'm having trouble getting a rotary encoder to work properly with AVR micro controllers. The encoder is a mechanical ALPS encoder, and I'm using Atmega168. Clarification I have tried using an External Interrupt to listen to the pins, but it seems like it is too slow. When Pin A goes high, the interrupt procedure starts and then checks ...

How to send sound to a speaker

Hi, If I were to program a microcontroller (ATMega128) to play a realtone with a speaker, how would I do this? Do I need to use a digital/analog converter to send different amplitude values, or is it enough with frecuency changes? In any case, how would I encode the frecuency/amplitude values that the speaker needs to receive? Do I need ...

Testing Code for Embedded Application

Background: I am developing a largish project using at Atmel AVR atmega2560. This project contains a lot of hardware based functions (7 SPI devices, 2 I2C, 2 RS485 MODBUS ports, lots of Analogue and Digital I/O). I have developed "drivers" for all of these devices which provide the main application loop with an interface to access the...

Arduino: Lightweight Compression Algorithm to store data in EEPROM

I want to store a shitload of data onto my Arduino whith ATmega168/328 Controller, but unfortunately there's only 256KB / 512KB of EEPROM storage. My idea is to make use of an compression algorithm to strip down the size. But well, my knowledge on compression algorithms is quite low and my search for ready-to-use libraries failed. So,...

C++ “was not declared in this scope” compile error and modification tips.

I'm trying to modify this code in an attempt to make it work on an Arduino Mega. I'm pretty much new to C so, I may have made some major mistakes. By the way, this is for a self balancing skateboard. :P This code is taken from an ATmega32 (from : [url=http://sites.google.com/site/onewheeledselfbalancing/Home/twin-wheel-self-balancing-sk...

What are the major differences between coding an AVR ATmega32 and an Arduino Mega?

I'm trying to modify this code in an attempt to make it work on an Arduino Mega. I'm pretty much new to C, so I may have made some major mistakes. By the way, this is for a self balancing skateboard. This code is taken from an ATmega32 (from here) and I'm trying to make it work on a Arduino Mega. This code was written for an ATmega32 ...

Modify A Code From An ATmega32 To An Arduino Mega - error in In function `main' even if there is none!

I'm trying to modify this code in an attempt to make it work on an Arduino Mega. I'm pretty much new to C so, I may have made some major mistakes. By the way, this is for a self balancing skateboard. This code is taken from an ATmega32 (from here and I'm trying to make it work on a Arduino Mega). This code was writen for an ATmega32 d...

Which IDE to use for ATMega32 micro controller coding

Hello everyone, I am involved in a project which requires designing a mini rover (mars rover types). I am using ATMega32 micro controller. I have other hardware like DC motors, IR sensors etc. My query is that is there any IDE that I can use to code the micro controller? It must be user friendly since I am new to the concept of micro co...

advantages of atmega32

what are the advantages of using atmega32 than other microcontrollers ? is it better than pic and arm,8051 ? ...

Error while online manipulation of CM5 in the bioloid kit

I am getting the following error after flashing a program on the controller(CM5) and while on-line manipulation of CM5 in the bioloid kit. 000 0x00 dynamixels found . Error 0800. What gives? ...

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...

Atmega64 pins question. SCL/SDA same as TXD/RDX?

I'm not an Atmega pro by any means whatsoever. In fact, never worked with them. I'm trying to add an external eeprom using i2c interface to a device that uses an Atmega64 controller. From the datasheet, I see that pins 25 and 26 are labeled PD0/PD1 and are the SCL/SDA for i2c. That's fine and dandy. So then I go to the board and star...

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 ...

ATMega328 + SPI Flash Memory

Preface: This question is about a project I am working on with a professor at my university. It is NOT for a grade, but my reputation with this professor does matter. So while my success on this project is important to me, I do not see it as unfair to seek help from SO. That said, here is a high level overview of my project. I have an a...