Skip to main content

All Questions

Tagged with
0 votes
1 answer
44 views

LCD Entry Mode Set and AVR MCU

I want to simulate **the Entry set mode ** function of and LCD based on HITACHI 44780 Controller. (Here is the datasheet.) The "Entry set mode" is given the following code of the 8 bits data ...
learn design's user avatar
  • 1,020
0 votes
1 answer
41 views

AVR assembly indirect addressing: "Found no label/variable/constant named …"

I am currently trying to indirectly address the SRAM of the ATMega328P by using the following code: ...
user380637's user avatar
1 vote
2 answers
478 views

Assembly: AVR Studio alternatives for Linux [closed]

I had been using using AVR Studio on Windows to write assembly code for my MCUs (mainly for atmega8515) for a couple years. However, recently I transitioned to Linux and turns out there aren't any ...
Heather7283's user avatar
5 votes
3 answers
1k views

How can I do immediate addition in the Atmel AVR instruction set?

I've been doing some AVR assembly programming for a university course, and I recently happened upon a situation where I would have wanted an "add immediate" instruction. However, no such ...
Newbyte's user avatar
  • 203
1 vote
1 answer
476 views

Understanding assembly code for LED blink with ATmega328P

I wrote the following program to turn an LED on and off at 1-second intervals: ...
kovac's user avatar
  • 475
0 votes
0 answers
93 views

SPI interfacing a sensor doesn't seem to work

I'm trying to get a feeling for how the SPI protocol works. I built this cirucit using Proteus simulator. simulate this circuit – Schematic created using CircuitLab And then according to the ...
Ait-Gacem Nabil's user avatar
0 votes
0 answers
68 views

Using SUB with values higher than 128 in an 8 bit system

how does the SUB instruction work in AVR assembly? does it take the twos compliment and add it or does it function differently? If I subtract two 8- bit numbers, say 1 - 2 and the answer is -1, should ...
Tzanker's user avatar
  • 139
2 votes
1 answer
144 views

Strange ATmega32 behavior with assembly code

I posted a kind of similar question recently, but it was not that organized, so here I am trying again :) I wrote this short assembly code to blink an LED at different intervals depending on the state ...
Seif_1999's user avatar
0 votes
2 answers
170 views

Problem interfacing stepper motor with Atmega 32

I have been trying to interface a bipolar stepper motor with an ATmega32 controller using AVR assembly, but it just keeps clicking without movement or just move back and forth in the same step. Here ...
Seif_1999's user avatar
0 votes
2 answers
314 views

AVR "OUT" function. addressing port without constant

I am currently writing some assembly code that needs to address different I/O ports at certain times in my code. For example, at one point I may want to address PORTD4, and at another point I may want ...
dhout23's user avatar
  • 15
0 votes
1 answer
74 views

ST instruction of avr in microchip stuio (avr studio) nor working as expected

I am trying to understand indirect addressing in avr and tried the following code : ldi r31, 0x28 ldi r26, 0x2c ldi r27, 0x00 st X+, r31 when r26 and r27 are ...
user137273's user avatar
0 votes
1 answer
631 views

Going below the bottom of the stack in ATmega328P

I'm working with an AVR based project and just have one curiosity. The ATmega328P has total 2kB of SRAM. The lowest address of the stack can be 0x8FF. Now suppose the stack pointer is at 0x8FF. What ...
user137273's user avatar
0 votes
0 answers
127 views

AVR Assembly - Operations with two 8-bit registers in 16-bit two complement negative values

I have this code in which I try to multiply the given number by 4. I have two variants and that is that it is negative and positive, but it doesn't work for negative values, you don't know why? ...
Aaron7's user avatar
  • 101
0 votes
2 answers
790 views

AVR Assembly - Operations with two 8-bit registers in 16-bit

...
Aaron7's user avatar
  • 101
0 votes
0 answers
93 views

How to assess worst case runtime and correctness of an assembly implementation?

Set off by a question on CodeReview, I revisited "8-bit AVR unsigned division". Trying much the same as for below 8 bit/8 bit → Q, R implementation, I found assessment of cycle counts of an &...
greybeard's user avatar
  • 1,956

15 30 50 per page
1
2 3 4 5