Questions tagged [assembly]

This is a programming language that is at a low level that corresponds with the instruction set of the machine being programmed.

Filter by
Sorted by
Tagged with
0 votes
0 answers
51 views

Why does a PCB with metallic Faceplate on a BLDC motor assembly creates a unit failure?

I am building a new BLDC stirrer unit which has metallic enclosures and a metallic faceplate for thermal dissipation. The unit fails often and would not run. I opened the unit to see if it was a loose ...
Adithi's user avatar
  • 1
1 vote
2 answers
94 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
1 vote
0 answers
41 views

6502 Extra Cycles on Page Cross

On the 6502 processor, when using the Absolute,X, Absolute,Y or (Indirect),Y addressing ...
Macmade's user avatar
  • 291
3 votes
1 answer
263 views

Are `call` and `return` usually instructions in a modern ISA?

I've been working through the problems in a game based around building a Turing Complete machine. One of the final problems asks you to implement the call and ...
Connor's user avatar
  • 389
-1 votes
1 answer
138 views

What are the steps an 8-bit processor must perform to read/write an integer variable in memory?

What are the steps an 8-bit processor must perform to read/write an integer variable in memory? Consider I have written C code for ATmega128. What exactly are the steps involved for the compiler to ...
Creator's user avatar
  • 147
1 vote
1 answer
40 views

Seeking clarification on equation used in MIPS assembly problem

I'm currently studying MIPS assembly code, and I'm having trouble understanding the solution for question (b) of a particular problem. I was hoping someone could help me clarify a specific part of the ...
Frank's user avatar
  • 11
4 votes
2 answers
632 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
  • 193
1 vote
2 answers
56 views

VL53L0X Assembly Soldering Problem

We have a product(PCB) in mass production as using VL53L0X. There is a problem with some of our products. We tested before sending customer. There is no problem. But, over time we have received ...
FAFİ's user avatar
  • 51
4 votes
2 answers
753 views

Logic value of a single input pin into a microcontroller

I'm trying to get the logic value from a node in a circuit (it is the output of a comparator that can either be 0V or 5V) into an AT89S51 microcontroller. My program just tries to get the value of pin ...
ludicrous's user avatar
  • 965
1 vote
1 answer
89 views

Microcontroller not blinking LED

I want to check if my microcontroller is working. It's the first time I'm working with microcontrollers. I followed this tutorial to blink a LED at the P1.0 pin, but nothing is happening. My ...
ludicrous's user avatar
  • 965
1 vote
1 answer
104 views

Why do we shift by three in RISC-V loops?

In this youtube video, the instructor explained some basic code in RISC-V assembly, but i didn't understand why in the first line, he is shifting i by 3. Why do we have to multiply it by 8?? I feel ...
Shinobi San's user avatar
0 votes
0 answers
47 views

Need help with implementing beq instruction control signals

I'm currently working on an Assignment, and I'm unsure if I did everything right, for example implementing the control signals for the beq instruction. I have added the required signals to the Control ...
mrAnonymous's user avatar
1 vote
1 answer
216 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
  • 343
0 votes
1 answer
41 views

Designing instruction emulating swap on a MIPS ISA with only 2 registers

In a typical MIPS ISA, you have only 2 working registers. But you have a large number of ALU units. How to design an instruction to emulate swap?
Nidhi's user avatar
  • 87
3 votes
5 answers
4k views

How to program the CPU when making a small microcomputer?

I'm trying to make a small microcomputer from individual parts, but I'm having a hard time understanding how to load code onto the processor to be able to run it and do something. Attached is my ...
Jeremys556's user avatar
0 votes
0 answers
125 views

Help needed with solving MIPS jump instruction encoding question

I am currently working on a project that involves understanding the encoding of MIPS assembly instructions and I am struggling with a question that I hope someone here can help me with. The question ...
Bryan C's user avatar
1 vote
3 answers
137 views

How to get output from an ATTINY12L microcontroller

So far I have only worked with ATmega32 chips, programming them in C. Now I have to work with an ATTINY12, which can only be programmed in ASM. As a proof of concept, I wrote a simple program that ...
Demento's user avatar
  • 121
4 votes
6 answers
495 views

What address does it save in EEPROM?

I watched Ben eater's video about a building computer based on 6502 microprocessor and I'm stuck at Part-3 ( Assembly language VS Machine code). He was programing a 32k AT28C256 EEPROM and he ...
Heroz's user avatar
  • 431
0 votes
0 answers
80 views

--fixupoverflow=warn is being ignored by the MPLAB X Linker

I have tried several hours worth of variations and I am at my wit's end on this one. The MPLAB-XC8-PIC-Assembler-User-Guide-50002974 clearly states: The --fixupoverflow option customizes the action ...
Scott Savage's user avatar
3 votes
0 answers
150 views

How to using JAL in RISCV in this example?

Write a "replace" function that replaces every character in the source string between the first occurrence of character "(" and the first following ")" with character &...
黑旗Vlland's user avatar
9 votes
4 answers
2k views

Upload ASM code on Intel 8086 chip

I have been struggling to find a method to actually run any assembly code on my 8086 chip. I have an 8086 chip and I am trying to implement it on hardware to power up a LED or anything simple. On ...
Mora's user avatar
  • 167
-5 votes
1 answer
98 views

How to read HLDA pin DMA Controller 8237 with Assembly Codes [closed]

I trying to read HLDA Pin in 8237. But i can not find a literature(s) about it in Internet. In Assembliy codes. The circuits is use for i/o cards in PCI or ISA BUS. addeds DMA Process with all. I use ...
adhitronic's user avatar
0 votes
0 answers
83 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
-2 votes
2 answers
110 views

Drivers in C++ produces bigger assembly [closed]

I'm trying to figure out whether C++ is a suitable language for use in device drivers, like peripherals on Cortex-M3/M4. I started writing some drivers for GPIO and I noticed that it produces bigger ...
blinkbetter's user avatar
0 votes
0 answers
50 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
  • 127
1 vote
2 answers
709 views

How is sll implemented in MIPS?

I don't understand how MIPS would implement the sll (shift left logical) instruction using the hardware present in its ALU as shown in the diagrams below. Would ...
kene02's user avatar
  • 536
1 vote
2 answers
96 views

How do I exit (Microchip Pic18fxxxx rs232 BTFSS PIR1,RCIF) Loop when no data is present (Assembly Mplab Mpasm)

...
user66377's user avatar
  • 570
1 vote
0 answers
57 views

Is 35g/in^2 a good "rule" to use for upside down reflow surface tension?

I have one assembler that gave me their "rule" of 35g/in^2 for reflow parts falling off upside down or successfully hanging on. Are there any sources that point to this being any more than ...
mint branch conditioner's user avatar
2 votes
1 answer
122 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
-1 votes
1 answer
248 views

12 bit vs 10 bit ADC PIC18f [closed]

Convert 12 bits adc to 10 bit adc. We know that the resolution of the step size for a 12 bit is 1.22, different than the step size of 4.88 of the 10 bit. We need to take into account the extra 2 bits. ...
Citi's user avatar
  • 161
0 votes
2 answers
123 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
-1 votes
3 answers
245 views

8051 seven segment 1-9, and reset to 0

This is a university assignment, last part of 3. I cannot find any useful notes describing looping in the 8051 assembly language in the course resources, and the lecturer isn't replying to questions. ...
EmptyAtoms's user avatar
0 votes
1 answer
183 views

Programming an old school microcontroller (MSM80C49 from OKI semiconductor)

I've read the whole datasheet, there's no typical guidance on programming procedure/setup/circuitry. It just mentions a few steps on how to order pre-programmed chips. (I guess) on page 18. On a ...
Elementronics's user avatar
2 votes
2 answers
138 views

How to draw detailed assembly outline

How do you draw this detailed mechanical/assembly outline? I saw this at this pdf from Altium https://resources.altium.com/sites/default/files/uberflip_docs/file_1195.pdf
maaaaple7's user avatar
  • 103
0 votes
1 answer
172 views

How do we specify the signal frequency while interfacing DAC 0800 with 8086?

I am relatively new to Microprocessors and just started with my uni course on the same. My faculty while discussing the question: gave us the following solution: What I don't understand here is how ...
Sarthak Srivastava's user avatar
4 votes
1 answer
253 views

How to minimize microcode complexity in 8-bit home-brew CPU

tldr; I built and later extended Ben Eaters 8-bit breadboard computer. After the initial build I integrated 16-bit program counter and memory address registers, redesigned the instruction set and ...
Scott vanVoss's user avatar
1 vote
2 answers
172 views

An Assembler for STM32 and compatible with Ubuntu [closed]

I'm new to STM32. I want to learn the architecture of STM32 using assembly language. but Keil microVision MDK-ARM is not Linux compatible. What is the alternative of Keil to write an assembly code for ...
Kiroloes Amir's user avatar
0 votes
2 answers
751 views

ARM asssembler: rotation of bits in immediate value

Consider MVN r3,#0xFFFF807F Is this an invalid instruction from ARM? Since MVN is simply the complement, it equates to ...
Meep's user avatar
  • 375
0 votes
3 answers
530 views

ARM How to invoke branching?

Was looking through a code with regards to loop. ...
Meep's user avatar
  • 375
3 votes
1 answer
319 views

ARM Assembly Code

Here's an assembly program given to me, and I'm not sure how the program goes through. ...
Meep's user avatar
  • 375
1 vote
1 answer
245 views

Frequency counting program - Timers in 8051

...
Sayan's user avatar
  • 719
10 votes
3 answers
2k views

How does an operating system or program detect the CPU model name? [closed]

What kind of binary compatibility is present for 2 processors sharing an Instruction Set?. I had asked a question on Computer Science Stack Exchange, to which I got an answer which said: As a trivial ...
Shashank V M's user avatar
  • 2,271
1 vote
1 answer
3k views

Store byte instruction in RISC-V assembly

I have a short snippet of RISC-V assembly that I'm having trouble understanding. I'm not sure if I'm interpreting the instructions wrong, from my interpretation it seems as if the branch (BNE) will be ...
jhe4x's user avatar
  • 13
-1 votes
1 answer
47 views

Solar tracking using a helicopter blade control [closed]

I've been trying to build a dual-axis solar tracker but the ones I saw needed linear actuators. I'm thinking how about using SG100 servos with the concept of blade control in helicopters to build the ...
user290329's user avatar
0 votes
0 answers
48 views

Battery made of Li-ion cells assembly

Do you see any issue (feasability, safery, ...) about assembling a battery pack with 10 Li-ion 3.7V 2600mAh cells (put in parallel) having their own individual protection circuits (overcharge and over ...
NinjaGreg's user avatar
0 votes
3 answers
366 views

4-bit mode of LCD-1602 using 8052 µc

I try writing "NO" in the LCD using 4-bit mode. So, I programmed the AT89S52 to send the upper nibble first to the last 4 data inputs of the LCD. I used AND operation to eliminate the lower ...
Kiroloes Amir's user avatar
0 votes
0 answers
183 views

Indirect addressing on an assembly program with RAM locations

Here, I have written a indirect addressing assembly program (with PIC18) to copy following to RAM locations 10H to 16H. (It says MERHABA in turkish (means hello) But, I am not sure that the part of my ...
Emilia's user avatar
  • 31
0 votes
2 answers
200 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
1 vote
1 answer
240 views

Is the following 8085-based design I/O mapped or memory mapped?

The above picture is an 8085-based system schematic used for undergrad courses at the laboratory. Now at first sight it seems that the 8085 in the circuit is isolated mapped IO since it uses the IO/M' ...
Amir Soleimani's user avatar
0 votes
1 answer
63 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

1
2 3 4 5
9