Quantcast
Channel: AVR
Viewing all 159 articles
Browse latest View live

attiny85 for analog input digital output - please help.

$
0
0
First of all I would like to note that I am very new to building circuits, the raspberry pi, and attiny85. I have been doing a lot of research on what I'm trying to do but I have a few questions. I want to use the attiny85 to measure voltage of a 1.5V battery as in this schematic and send it to the GPIO on the raspberry pi and read the digital result via python and log it;...

attiny85 for analog input digital output - please help.

ATMega16l and Nokia5110 LCD issue

$
0
0
I made a simple program wich has to turn all the display black and...it doesn't work. The LCD seems dead. Just the backlight is on. Here's the code

Code (text):
#include <avr/io.h>
#define F_CPU 40000UL  //4 MHz
#include <math.h>
#include <avr/interrupt.h>
#include <avr/power.h>
#include <avr/sleep.h>


typedef struct
{
   unsigned int bit0:1;
   unsigned int bit1:1;
   unsigned int bit2:1;
   unsigned int bit3:1;
   unsigned int bit4:1;
   unsigned int bit5:1;
   unsigned int...

ATMega16l and Nokia5110 LCD issue

the pins of AVR

$
0
0
hi friends
a question:
we can the pins of AVR that not used in design,define as input,output or float.which is batter؟

Help to correct the timer code ATtiny 2313

$
0
0
Hello all
I got this circuit from internet.. Its a good timer. Proteus simulation works great.. But the hardware not work well... The timeing is not correct.. When the count down start, the display count as 5 second = 1 second. How to correct these error?

I am fresh in Programming and I dont know even write a line of code.

The necessary file are attached.....

play audio from sd card using avr mcu(atmega-)

$
0
0
I want to play audio from sd card using avr microcontroller.audio file will be called by it's file name.I want to just play by audio file name.

It's crying need to complete my voice clock project.

please help ...

Show Image on TV and Color PAL with AD725

$
0
0
hi ,

I need to show color image on TV. I use AD725 for generate PAL signale.i need best R2R circuit for send RGB signal to IC.;)

i use the UZEBOX R2R circuit but show noise on TV. :banghead:

i thought my oscillator circuit have problem , because when i don't send any color signal , TV show LOW color niose.

i need to you help. now my question is witch oscillator and R2R circuit is better for use ?

MIX C and Assembly in AtmelStudio

$
0
0
Hi my friend...

I declare this variable :

const unsigned char screen_pattern[8*8] PROGMEM = {
10,20,0,11,0,125,255,13,
10,20,0,0,0,125,255,13,
10,20,115,90,0,125,255,13,
10,20,0,0,0,125,255,13,
10,47,0,0,0,125,255,13,
10,120,0,80,0,125,255,13,
10,200,0,0,0,125,255,13,
10,20,0,127,0,125,255,13
};

now ... i want mix C and Assembly code and send screen_pattern to PORTD with assembly code .... please help me...

Difference between Start and Restart condition in I2C

$
0
0
I am using PIC uC(as there was no separate entry for PIC ,I posted in AVR)-18f4520
Language C-using Microchip's C18 Library
In their C18 Library for I2C communications they have defined two functions :
Start
and
Restart.
And their description in manual seems to be same.

The book which I have referred is PIC microcontroller design by John Peatman.
There the procedure to read is jisted as follows:
1)Start
2)Send Device ADD + Write
3)Send Internal ADD
4)Stop
5)Start
6)Send...

Difference between Start and Restart condition in I2C

bad working mcu with _delay_ms()

$
0
0
hi guys

i use timer1 for send NTSC Signal To Composite TV.

but my problem is this :
i want after 1 secound delay change frame buffer inormation but when i call _delay_ms(1000) , i see big noise on tv.

even i replace _delay_ms() with a long while() loop, but i see big noise again;

my code is :


/*
*
* ATmega32a NTSC Video Signal Generator
* CPU Frequency : 20 MHz
*
* ------------------------------------------------------------
* Pin Used : PORTB0 --> Sync Signal
*...

bad working mcu with _delay_ms()

HELP:Convert 24bit from ADC to decimal

$
0
0
Hello

I am using HX710 ADC for reading a load cell.

The HX711 is a serial device which outputs 24 bits in form of bit banging.
The data is in 2's complements form.
Vref = 5v
Full scale differential
input voltage range V(inp)-V(inn) ±0.0039*VREF mV
Internal gain = 128
Output data coding 2’s complement 800000 to 7FFFFF HEX

My problem is understanding this format.
I have always known in my MCU that a 10-bit sends 0-1023 bits and i can easily scale for a 0-5v input.

In this...

HELP:Convert 24bit from ADC to decimal

ATmega16A LED blinking code is not working in Dev. Board.

$
0
0
Hello everyone, I'm new to AVR programming. I'm using a ATmega16A to blinking LED. AVR Studio showing that program is ok but the LED is not blinking in the Development board. I have connected pin no. 10 and 30 to VCC +5V and pin no. 11 & 31 to GND. I'm using a 16Mhz Crystal at pin no. 12 & 13. and also the clock is not happening. what to do???

here is the code:
Code (text):
.include "m16adef.inc"

            .org    $0000
            .DEF    MR  = R16            ;R16 NAMED AS ACC
            .DEF...
ATmega16A LED blinking code is not working in Dev. Board.

Need ASSEMBLY tutorial for AVR...

$
0
0
Hello I'm new to AVR. One year ago I started learning 8051 with assembly language. I don't know any other Programming languages like C or C++ anything else. I have decided to start AVR with assembly but I can't find any helpful about ASM. Most of the internet websites cover in C ( however they starts in asm but quickly move to C while giving complete example a specific project ).

So I'm requesting if any one have good ASM tutorial at least a complete asm code of a specific project like...

Need ASSEMBLY tutorial for AVR...

USART Issues

$
0
0
Hi,

Recently i have been trying to get interrupt driven serial working for a project of mine, however i have been struggling to get it to work. I am using an Atmega328p (16Mhz external xtal), and an FTDI231x to communicate to a PC . I believe all the hardware works fine, as using Arduino IDE i can get the serial to work, but i need to use it in Atmel Studio 6. The transmit sort of works, i can see the Tx LED flashing, however i only see zeros or symbols with Realterm. The data sent by the...

USART Issues

How to print a portion of a string on a lcd using codevision avr?

$
0
0
Hellow,
I am not much of an expert with Codevision Avr compiler and now i am stuck. The problem I am facing is that, suppose there is a string like "wonder". I can print the whole string using lcd_puts() command. but i cant print any single digit of that "wonder" string.It would be a great help for me if someone can please help me to print only "n" of "wonder" on the lcd.

Atmega 32A programming help

$
0
0
hi friends,
i'm a complete newbee to microcontrollers and their interfacing.i wanted to make a cellphone operated robot and i'm stuck with Atmega32A microcontroller programming.Please suggest me some programmer and programming software for Atmega32A microconroller.
waiting for your help...........

Atmel Studio 6.2: Failed to launch program

$
0
0
Hi all,

I am using two REB233SMAD-EK radio extender boards and an AVRISP mkii programmer in Atmel Studio 6.2. Though the two boards seem to be recognizing each other (apparent in terminal), I cannot find a way in which to get them to send/receive a simple message (such as "Hello World!"). I've been told that the AVRISP mkii is simply a programmer, so in other words, it doesn't debug. Because of this, whenever I try to debug the following code, Atmel Studio consistently displays an error...

Atmel Studio 6.2: Failed to launch program

ADC not working | ATMEGA16A | C++ AVRStudio

$
0
0
Here is the code below. the code does not working with my hardware but with the same hardware ASM code is working. The result always same in C++.
Code (text):
/*



#define F_CPU 4000000UL
#include <avr/io.h>
#include <util/delay.h>
#include <string.h>


int main(void)
{   DDRB = 0xFF;            //PORTB AS OUT PUT
    DDRA =0;                //PORTA AS INPUT OF ADC
    ADCSRA = 0x87;        //initiazing ADC  
    ADMUX = 0xC0;
 
       
    _delay_ms(2000);    //delay for 2seconds...
ADC not working | ATMEGA16A | C++ AVRStudio

Help with proteus simulation for solar tracker

$
0
0
hey I want to simulate dual axis solar tracker circuit by using ic lm339 comparator and l293d motor driver help in simulation please

result is not written to adc register because it has been locked.

$
0
0
Hello;


I am fresh here. I am working on atmega8. I want to read analog voltage from its ADC0 pin. I write code for it in mikroc pro for avr. But it gives me error that “result is not written to adc register because it has been locked.” It reads only first simple and then stopped. I don’t know how to solve it??? Anybody have any idea about it? Circuit and code are attached.


Code is:

Code (text):
// LCD module connections

sbit LCD_RS at PORTD0_bit;

sbit LCD_EN at PORTD1_bit;

sbit LCD_D4 at...
result is not written to adc register because it has been locked.

atmega8 (sleep mode) hellp

$
0
0
Hi everyone!

I have a circuit with atmega8 + basic . I want to use "sleep mode" and need your help.
my cricuit have a keyboard 3*4 . my microcontroler wait for recive a nomber from keyboard whole time, I want my microcontroler go to sleep mod when not switched any keyboard figure . how can i use "sleep mode" in progeram (basic) ?

Many thanks in advance
Viewing all 159 articles
Browse latest View live


Latest Images