Skip to main content

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
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
2 answers
92 views

1-bit computing with true one-instruction set architecture

Even though MC14500B is considered as 1-bit computing where it accepts 1-bit data to perform operation, the instruction set itself consisted with 4-bit instruction which leads having 16 total ...
Muhammad Ikhwan Perwira's user avatar
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
0 votes
0 answers
79 views

Trying to get PIC code to work

Relevant info can be found in this Google drive folder, breadboard is 1:1 with the schematic. So, I've been scratching my head for the past few days to get this design to work, I tried to get some ...
JamesTDG's user avatar
0 votes
2 answers
44 views

Use multiple ARM assembly files in a project

I am an electronics student and I am learning how to use assembly language on an ARM Cortex-M4, specifically for the STM32F401CCUx microcontroller and, even more specifically, on the BlackPill board (...
Pinula1's user avatar
2 votes
1 answer
59 views

How to run a pure assembler program from the flash of an STM32?

I am trying to write a pure assembler program (LED blink) for the Nucleo-F103RB. I create a new project in the STM32CodeIDE and remove all files except STM32F103RBTX_FLASH.ld and startup_stm32f103rbtx....
Arseniy's user avatar
  • 2,247
1 vote
1 answer
72 views

Why is this 8051 ASM code not working?

I’m trying to implement an automated parking lot using an 8051. I’m using stepper motors to function as gates at the entrance and the exit of the parking lot that open whenever the IR sensors placed ...
Captdeadpool's user avatar
0 votes
2 answers
301 views

LCD 16x2 not taking commands from MSP430FR2355

I have been facing this issue for about a week, and after hours of trying to debug it, I was hoping I could find some help here. I have been trying to use an LCD 16x2 screen (unaware of the exact ...
Pixeled's user avatar
  • 53
0 votes
0 answers
61 views

Turning on and off LEDs based on button input in ARM assembly

I am using an MSP432P401R. Attempting to turn on an LED when the button is pressed, and turn on a different one when the button is not pressed. It compiles but doesn’t do anything or light up either ...
ethanm's user avatar
  • 1
2 votes
1 answer
70 views

PIC assembler to perform arithmetic on 10-bit number spanning 2 registers

I wondered if there was any 'clever' way of decrementing a 10-bit value which is stored across 2 registers. In this case, its the PWM duty cycle value which has its 8 MSB in PWM1DCH and its 2 LSB in ...
NomadAU's user avatar
  • 183
0 votes
0 answers
32 views

Confusion about the Link Register content during exceptions in ARM

I can't understand how the link register of the exception mode is updated during the exception. Why for the SVC, Prefetch Abort and Undefined Instruction, the LR is having PC + 4 but for the Data ...
Emad Kheyroddin's user avatar
3 votes
3 answers
351 views

Is assembly microarchitecture dependent?

Many microarchitectures can implement a given digital system architecture. For example, and as Weste and Harris explain in their CMOS VLSI Design, Digital VLSI design is often partitioned into five ...
EE18's user avatar
  • 1,161
1 vote
0 answers
174 views

Understanding the 20-Bit Addressing in 8086 Memory Architecture: Why Not 18 Bits for Base and 16 Bits for Offset?

I'm curious about the memory addressing in the 8086 microprocessor. Given that there are four segments and 16 bits for the offset address, the total address space is 20 bits. I'm wondering why there's ...
Emad Kheyroddin's user avatar
2 votes
2 answers
67 views

I2C BME688 Read Request Sent, but no data received

As the title suggests, im interfacing with the BME688 using I2C. The signal I captured using my logic analyzer is shown below. The slave address is 0x76 and register address im trying to read is 0xD0. ...
lrdewaal's user avatar
1 vote
3 answers
602 views

Why use bytes instead of words for offsets in 'lw' and 'sw' instructions?

In assembly language, there are instructions like 'lw' (load word) and 'lb' (load byte). Both of these instructions involve adding an offset to a base address. It seems counterintuitive, however, that ...
Emad Kheyroddin's user avatar
0 votes
1 answer
50 views

Is it possible to force an input port during debugging in MPLAB IDE v8?

I am using MPLAB IDE v8 (not IDE X) to write some PIC programs (PIC18F4321) in assembly. I am using the debugging tool MPLAB SIM to debug the programs, however I am not able to force port bits from ...
bardulia's user avatar
  • 407
1 vote
2 answers
479 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
87 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
293 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
  • 399
-1 votes
1 answer
163 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
83 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
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
2 answers
67 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
817 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
  • 1,163
1 vote
1 answer
117 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
  • 1,163
1 vote
1 answer
158 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 ...
Denis's user avatar
  • 111
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
1 answer
55 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
425 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
  • 17
1 vote
3 answers
180 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
694 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
134 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
313 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
  • 179
-5 votes
1 answer
130 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
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
-2 votes
2 answers
111 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
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
1 vote
2 answers
1k 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
  • 538
1 vote
2 answers
105 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
64 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
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
-1 votes
1 answer
393 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
  • 185
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
-1 votes
3 answers
397 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
267 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
180 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
215 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
321 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
2 3 4 5
10