484 questions
0
votes
0
answers
57
views
What happens when two TRAP interrupts occur simultaneously in an 8085 microprocessor?
Say an 8085 microporcessor unit is in the process of servicing a TRAP interrupt and in this process recieves another TRAP interrupt what then? Since the IE is still on high for TRAP as it is non ...
3
votes
2
answers
167
views
MCU startup code and C++ - static initialisation fiasco
i'm C++ developer for embedded systems, meaning microcontrollers, not embedded Linux.
For example, currently i'm working with an STM32F7 and an STM32F4.
On several occasions I stumbled over ...
-1
votes
0
answers
25
views
How to display integer array on console in assembly 8086 in my given problem? [duplicate]
I am solving this question:
Push the first 10 even numbers onto a stack. Then, pop each number, check if it is divisible by 4, and if so, push it into a new stack. Finally, display the contents of the ...
0
votes
0
answers
60
views
MCP4131 Digital Potentiometer control with MSP430 microcontroller
I have been trying to control a simple digital potentiometer, MCP4131-502, through an MSP430G2553. I found a very useful source online that has already done a similar project, here linked, and I've ...
0
votes
1
answer
124
views
Not getting performance improvement with AVX in comparison with SSE
I am trying to utilise SIMD capabilities of processor. However, in case of vectorisation I observed that there is no improvement while compiling binary for AVX(cmake flag -mavx2) when compared with ...
0
votes
1
answer
118
views
How OS code gets executed by microprocessor when microprocessor have limited set if instructions / opcodes
I've been trying to understand and did lot of online research but still have doubt:
If processor understands only opcodes (which are limited) then why is it possible to execute operating system code? ...
1
vote
2
answers
682
views
How exactly x86 processor fetches the first instruction from SPI flash memory
On a x86 processor upon power ON of the system , the first instruction the processor usually execute is at 0xFFFFFFF0 which is called reset vector. Typically this address is in the BIOS or flash ...
1
vote
2
answers
193
views
How does a computer/microprocessor understand the mnemonics(assembly language) written by a programmer?
I was reading the book "Microprocessor architecture, programming and applications with the 8085" written by Ramesh Goankar. In that I came across the section which deals with how assembly ...
0
votes
1
answer
121
views
I need to process 200 CAN messages in 2 sec and send it to UART how do I know my CPU is capable of doing this task
Currently I need to do the feasibility of microcontroller, that is I need to receive 200 CAN messages within 2 sec and copy the content to UART buffer within 2 sec, which means all processing should ...
0
votes
0
answers
122
views
Having problems with timer timings in 8051 assembly
I'm currently working on a school task that requires me to utilize timers to create 50% and 25% duty cycle waves from 8051s p2 ports. The 8051 is connected to a switch which is connected to P2.0. When ...
0
votes
2
answers
1k
views
How to create 2 square waveforms of 50% duty cycle in 8051 with Assembly
I'm trying to create two square waveforms of 230 and 460Hz through p2.6 and p2.7 ports of 8051 in Proteus Simulation environment. It will also change its behavior with a switch input from p2.0. When ...
0
votes
1
answer
277
views
Can I execute an Assembly code in Motorola 68HC11 and other processors like ARM or x86?
My engineering teacher is a very stubborn man that wants to use a chip that has been gone for ages now. My question is: can I learn Assembly language for my computer and use it in Motorola or do I ...
-2
votes
2
answers
915
views
How to make a proper delay in a microcontroller?
How to a make a proper delay inside a microcontroller?
I see a lot of people using a basic for-loop
for(int i = 0; i < 100000; i++){}
As a delay, but how can I create a proper delay inside of a ...
0
votes
1
answer
275
views
How does RESW in SIC machine works
This is instructions set give in the standard text of System program
( Leland L Beck )for transferring data 5 from accumulator to memory
As you all know SIC is a hypothetical machine
LDA FIVE Load ...
-1
votes
2
answers
263
views
Unknown Label - DELAY occurring in edsim51,8051 microprocessor
i can't figure out the problem. it shows "Unknown Label - DELAY" in edsim51
Org 00h
Main:
Mov A, #0FEh
Mov P1, A
Acall Delay
Mov A, #0FFh
Mov P1, A
Acall Delay
...
1
vote
1
answer
88
views
Why is my function not producing a different number every time in my rock, paper, scissors game in assembly 8086 language?
I have a problem in assembly 8086 language. I'm trying to make rock, paper, scissors game. When user gives an input, program asks the question again. The problem is computer choice never changes. ...
1
vote
0
answers
1k
views
fw_printenv and fw_setenv not working as expected
I am working with YOCTO dunfell and i have to use libubootenv for fw_printenv and fw_setenv. But iam unable to set variables using fw_setenv. Also the fw_printenv output is also not correct.
But i can ...
0
votes
2
answers
2k
views
While running wlan.status() command on esp32 it is giving value of 1010 instead of 1-5
While running this code on my esp32 device:
import utime
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect("Dream Net R-632", "07132711")
max_wait =...
0
votes
1
answer
75
views
Program implementation with using specific CPU instructions
I want to realize following steps:
unsigned c = 5
c=c*5
I must do this by using this architecture and using 3 instructions at MOST:
CPU Architecture
Sample instructions for the cpu are like:
...
1
vote
1
answer
96
views
Algorithm for testing correct operation of the UNPKBU4 instruction on TMS320C66x
algorithm on testing the correct operation of the UNPKBU4 instruction in the TMS320C66x microprocessor.
I hope someone here point me to the right direction cause I am kinda stuck and I need some ...
0
votes
0
answers
285
views
How to send files from NAND Flash(connected to a microcontroller) to PC?
I have data stored of sensors in NAND flash using SPI Protocol with STM32H743 IC in file format(.txt)(multiple files are created in NAND flash).
I want to take out that data from NAND flash and send ...
3
votes
1
answer
320
views
How does the 6502 handle effective address overflow in indexed addressing modes?
What happens if the result of the addition performed in indexed addressing modes is greater than 0xFFFF? To be clear, I am referring not to the carry from the lower to the higher byte, but rather to ...
2
votes
0
answers
376
views
I'm a bit confused how memory mapped I/O works on a Raspberry pi
In memory mapped io for the raspberry pi, does the cpu write to ram and doe the io device then read that section of ram the cpu wrote to using dma?
I'm getting this impression by looking at the ...
0
votes
1
answer
175
views
Is it possible to verify the received slave data in i2C protocol
I recently came across one question related to the I2C protocol,
usually we read the data from the I2C slave devices and use it for the further calculations on the master side,
but can I be sure if ...
0
votes
0
answers
34
views
Why lots of things works 2^n in processors archectures?
I am an freshgraduated engineer, so that ı want to learn some basics in these area.
I want to learn why everything is referred with 2 and its overs in microprocessors?
Why our storages are 256kb, ...
1
vote
1
answer
87
views
Why is R8 being modified when using ADDS instruction?
I am using ARMSIM to test out my Arm Assembly code.
I see R8 being updated for no reason.
This doesn't happen when I use the regular ADD instruction.
I understand ADDS updates the flags but why R8?
0
votes
1
answer
282
views
Why is 8086 control bus 4 bits?
I was wondering why 8086 control bus consists of 4 lines I/O read/write and Mem read/write.
These are clearly 4 different functions that can be determined using only 2 lines. In this geeksforgeeks ...
0
votes
0
answers
115
views
How assembler programs are executed in a microprocessor trainer kit? [duplicate]
I understand, in microcontrollers assembly language is converted to binary by the assembler. To my understanding, it is a program run on a separate machine. Then the produced machine code is stored on ...
1
vote
1
answer
107
views
How do I need to change assembly code that it is going to work correctly?
I wrote a code in assembly language for the 8085 microprocessor. The code should change uppercase letters to lowercase. Maybe can you help me of finding the mistakes which I made in the code. All the ...
0
votes
0
answers
112
views
How should I change the code using the 8085 microprocessor to execute and read what is in quotes?
I am trying to write a code in an assembly programming language using 8085 microprocessor. The code should change all uppercase characters into lowercase taking into account that the text is written ...
0
votes
1
answer
2k
views
How to put label with 8085 microprocessor in assembly language?
I have a code that should convert uppercase letters to lowercase using 8085 microprocessor (the GNUSim8085 simulator). However, the code is not readable, and immediately throws an error in row "...
0
votes
1
answer
248
views
How to calculate the address of a final byte within a memory block?
Assuming that there is a processor that has a 4294967296-byte data memory and a single data cache that contains 131072 lines. The cache is a 1-way set associative cache with a 256-byte line size. When ...
0
votes
1
answer
65
views
I am trying to send light sensor data to a microprocessor and getting "call of overloaded 'print(const char[19],unsigned int&)' is ambiguous" error
I have stored light sensor values in comb1, as an array in an unsigned int. I am trying to send these values to a microprocessor. The values are taken from a sensor stored in an array. Then I am ...
-1
votes
1
answer
228
views
Creating a Processor
It is my last semester but one in university, the sublect is called Architecture and Programming of Microprocessors, the professor wrote this code and i just cannot understand what he is doing. ...
-1
votes
1
answer
2k
views
Microprocessor data bus and address bus width on a modern x86 CPU?
Hello I am having trouble with the work of finding the width of data bus and address bus as I have seen no tutorials show how to find out that information. I hope that someone can help me as my chip ...
0
votes
2
answers
475
views
How to access a 40-bit address bus with two 16-bit registers only?
This was a question that was asked in one of my exams which means it's possible.
The question was if I have a 40-bit address bus, how can I access all of its memory locations using two 16-bit ...
-1
votes
1
answer
728
views
How does the Program read 32 bit from the memory in a single clock cycle?
So, I have this assignment where I need to design a RISC-32-bit 5 stage pipeline. I must support at least 32 (32-bit) instructions and 32 (32-bit) data values. The memory should be read in 1 clock ...
0
votes
0
answers
77
views
Find content of C register after execution in microprocessor
Find content of 'C' register after execution of following assembly program
MVI A, 17H
LOOP: RLC
JNC LOOP
MOV C,A
HLT
Here my doubt is when at the end we did mov c,a then ...
1
vote
1
answer
2k
views
Attiny85 "analogRead()" with ADC problems
So I'm messing around with the Attiny85, my project requires what in Arduino would have been analogRead, I have learned a bit about ADC in this great instructable. I'm having problem though with what ...
3
votes
3
answers
7k
views
ESP32-CAM - A fatal error occurred: Packet content transfer stopped (received 8 bytes)
I was trying to program my ESP32_CAM module, but every time I got this error:
Serial port COM4
Connecting.................................
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual ...
1
vote
1
answer
701
views
why stack pointer is initialized to the maximum value?
why stack pointer is initialized to the maximum value?
I only knows that It is the tiny register which stores the last program request’s address in a stack. It is the particular kind of buffer that ...
0
votes
0
answers
42
views
How does STA works with input ports? Assembly i8080
I have such a task: check the numbers in ports from 00 to 07 on negative, positive and zero. Output the number of negative numbers in port 00, zeroes in port 01 and positive numbers in port 02
Here is ...
0
votes
1
answer
87
views
What is a good strategy for understanding an embedded processor? How to use its GPIOs for example
I have an STM32F407G discovery board and I am trying to turn on an LED without using any example code.
I happen to know that the GPIOs require the RCC AHB1 clock to be enabled because I read about it ...
0
votes
0
answers
458
views
16 bit to 12 bit conversion between microcontroller and dac
#include "mbed.h"
DigitalOut gpo(PTD7);
AnalogOut Aout(PTE30);
float x;
unsigned int i,j;
int main() {
x=0;
i=0;
while(1) {
gpo=i & 1;
x=16*2047.0*(1+sin(2*3.142*i/...
0
votes
1
answer
159
views
HOW does a 8 bit processor interpret the 2 bytes of a 16 bit number to be a single piece of info?
Assume the 16 bit no. to be 256.
So,
byte 1 = Some binary no.
byte 2 = Some binary no.
But byte 1 also represents a 8 bit no.(Which could be an independent decimal number) and so does byte 2..
So how ...
0
votes
1
answer
152
views
How do I increase the speed of my microprocessor?
This is my PC's specification:
Processor Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz 2.00 GHz
Installed RAM 4.00 GB
System type 64-bit operating system, x64-based processor
How do I increase ...
3
votes
1
answer
504
views
How can I write a code that loops 256 times using only 3 instructions and one 8-bit register (8086 instruction set)?
This was a question that was previously posed by a prof of mine and I'm assuming the 8-bit register is either CL or CH. I got it working by simply moving 01H to the CH register, but I was wondering if ...
-1
votes
3
answers
1k
views
Why is LOOP faster than DEC,JNZ on 8086?
My professor claimed that LOOP is faster on 8086 because only one instruction is fetched instead of two, like in dec cx, jnz. So I think we are saving time by avoiding the extra fetch and decode per ...
2
votes
1
answer
116
views
Can C++ return different memory address for same variable with & operator?
If two or more processor cores copy a variable into their local cache, how C++ handles that? Does &var return a different memory address depending on which core executed that instruction?
0
votes
0
answers
23
views
Write a Move command that will copy the last 32 bytes of the Code segment to location 1000 in the Data segment
Write a Move command that will copy the last 32 bytes of the Code segment to
location 1000 in the Data segment.
What is the minimum and maximum number of bytes that can be moved using the
Move ...