Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [register]

A special, high-speed storage area within the CPU.

0
votes
2answers
64 views

Writing to registers on I2C device

I'm currently working on a side project which uses an SSD1306 128x64 OLED display. I'm then using I2C to communicate to this. However, I'd like to better understand what exactly is going on when I'm ...
1
vote
1answer
77 views

Assembly language, accessing bytes of memory

I have some memory address 0x00000100 that I want to read from. The lower 4 bits read from this address indicates the states of 4 buttons - So bit 0 shows the state of button 0, bit 1 shows the state ...
3
votes
1answer
63 views

Why do we need 'R_out' in 2-BUS arch?

Given some abstract architecture of CPU: Note that this CPU has 2-BUS. Why do we need the R_out and R_in? If I use Gra/Grb/Grc then obviousely I will need R_out. The Same for R_in when I use Sra/Srb/...
5
votes
5answers
478 views

Processing ADC conversion result: DMA vs Processor Registers

I have a periodic ADC conversion (every 50 micro-seconds) and I use the result to do some further calculations and update the PWM load registers. The ADC is triggered by the up-down counter of ...
3
votes
1answer
84 views

Can I use a photodiode as a switch for a shift register?

Let's say I have a photodiode, a shift register (74HC595) and a 5V source, and I connect these as: 5V source -- photodiode -- shift register data input. (And other voltages to feed the register ...
0
votes
0answers
78 views

STM32f103 interfacing with adxl345 via i2c

I am working on interfacing ADXL345 accelerometer with STM32F103 blue pill board through I2C communication. I have written the code in Keil software by surfing the internet which works fine sometimes, ...
0
votes
0answers
59 views

Home brew CPU register trouble shooting

update Apparently I’m an idiot. It took me this long (hours) to check the supply voltage of the flip flops, which was at .25 volts from a bad connection. Rookie mistake. Hard lesson learnt. In the ...
0
votes
0answers
31 views

How to produce a register bank comprising four such registers in Logisim, sharing common data lines D0 … D7 and outputs <Q0 … Q7>?

I made a D-Latch circuit that looks like this: and I converted it into a subcircuit and made an 8 bit register like this: But how do I make a register bank using four such registers? Any help is ...
1
vote
1answer
43 views

How to modify BRR and BRSS registers to stm32f4 from stm32f103

I'm trying to modify stm32f103 2x16 lcd library to stm32f4. There are BRR and BSRR register on stm32f103 but there aren't similar register in GPIO_TypeDef structure on stm32f4 so i don't know how to ...
1
vote
0answers
37 views

Renaming a special register

I noticed that RISC-V, like some other RISC architectures, by convention treats register 1 specially, using it as the link register, holding the return address for function calls. If most code ...
0
votes
1answer
58 views

[Updated]How to select the values to move in assembler?

I'm trying to make the led blinks on the tm4c1294ncpdt, so the basic idea its to make 2 routines , one to select the GPIO port (in this case the F) and other to keep up on and off. the setup routine ...
0
votes
0answers
47 views

Register readback for ADC WM8253

I am trying to read the contents of register written in serial mode of WM8253 using SPI in Basys 3 FPGA. Link to Datasheet. I'm reading from register '011100' but the result that is read is always "...
17
votes
4answers
3k views

What stops an assembly program from crashing the operating system? [closed]

First of all, I am a beginner, so if this question sounds silly, please point out the incorrect assumptions. From what I understand, the job of an operating system is to manage hardware and the ...
1
vote
1answer
68 views

74hc595 sinking, not sourcing

I'm trying to get a sn74hc595n working with an arduino Due, eventually I will be hooking up each output to an NPN to drive Nixie tubes (I am switching my design from a due to using a esp8266 so I need ...
0
votes
1answer
36 views

When to monitor UxSTAbits.TRMT and UxSTAbits.UTXBF

According to the reference manual on UART for PIC here(page 7), the UxSTA register have two read-only bits; TRMT and UTXBF. While writing a simple transmission program over UART, I didn't notice any ...
0
votes
1answer
48 views

MAX17205 DevName reading wrong, but other default value is correct. Why?

I am using the battery fuel guage MAX17205 through I2C bus. The Device Name register that I read from it seems have a different value than what the datasheet states: I am reading a 0x2a7c, but it'...
0
votes
0answers
19 views

Clk pulses needed to retrieve data in registers

I know that to store n bits of data in a SISO register , n clk pulses are needed . And to retrieve the data only n-1 clk pulses are needed because 1 bit is already available at the output . In a SIPO ...
6
votes
8answers
3k views

What prevents the construction of a CPU with all necessary memory represented in registers? [duplicate]

Modern CPUs employ a hierarchy of memory technologies. Registers, built into the chip have the lowest access times, but are expensive and volatile. Cache is a middle-man between RAM and registers to ...
0
votes
1answer
41 views

Where the appropriate word size is selected for the operand?

This question is about a 32 bit Intel Chip using x86 assembly. My question specifically is what happens when you do the mov reg, mem instruction where the memory operand is a word (16 bits) from DRAM. ...
0
votes
1answer
36 views

Initial register value in synthesized design is always 0

I'm using Altera Cyclone IV EP4CE6 as my FPGA. Compiling the design in Quartus Prime 18.0.0 Lite Edition. The State register in the below module appears to be 0 ...
0
votes
1answer
121 views

Multiplexer handling 16 bits

Design the VHDL components (Register, Decoder, and two Multiplexer 16 bit) and interconnect them to build a register file. The schematic shows only four registers. Your solution should implement ...
0
votes
0answers
51 views

STM32F4xx, How to use RTC correctly?

I'm trying to run RTC, but there are two problems. 1) It is impossible to write the security key in the WPR register. 2) It is impossible to set the time and date in the TR and DR registers. I tried ...
1
vote
1answer
54 views

PISO shift register with first input

I have on my board two PISO shift registers in series, giving an output train of 16 bits. The problem is that the order of the bits is reversed compared to what I need. That means, the last input of ...
0
votes
0answers
157 views

SPI problem with STM32F103

I am trying to connect blue pill board(master) to arduino nano(slave) over SPI and read what I have sent on serial monitor. However I haven't been able to get SPI working. I run a timer to generate an ...
0
votes
2answers
71 views

What's the difference between a hardware register and a shift register?

There are two different wikipedia articles but they don't articulate the difference very clearly. Is the main difference that the shift registry uses a clock?
0
votes
3answers
98 views

HDL code convention for register resets

When it comes to (synchronously) resetting registers in HDL (I'll use Verilog), is it considered bad practice to code the reset combinatorially? As far as I can tell, the following two snippets are ...
0
votes
3answers
79 views

Phase register in phase accumulator

In the following flow diagram: Is the "phase register" a one-bit register? What does it basically do with that summation mark? What type of register is it? I basically do not know what the phase ...
0
votes
1answer
42 views

what does “ports can be registered” mean? For circuit design

I have a homework. I must design a circuit that makes addition with signed and unsigned numbers. I will use registers. I need two output ports. It says "8-bit output ports (2 ports: one for unsigned ...
2
votes
3answers
69 views

Clock domain cross and metastablilty problem

I understand the problem of metastability and understand that we can't get a stable value in a bounded time so we need unbonded time but it is not practical, so we put another flip flop with no ...
2
votes
2answers
1k views

Finite State Machine FSM

I understand how to make state diagram and make combinational logic (gates) to get a boolean equation for the next state bits and the output bit, but what is the function of ROM here ?
0
votes
1answer
97 views

When does a register need to get a load control-signal in order to be updated at the next clock? [closed]

I know this is a pretty basic question, but I didn't succeed to find an unambiguous answer. Does a register need to get load signal in the cycle in which the new value computation is made? or at the ...
0
votes
0answers
23 views

What is the tradeoff between number of register files and logical register specified in the ISA?

As the limited number of logical registers are opened to the user and compiler, it incurs the false dependency problems such as WAW and WAR. Therefore, to solve this problem, lots of ...
0
votes
1answer
372 views

Error (suppressible): (vsim-3601) Iteration limit Quartus

I have created a Simulation of a 4 bit register in quartus. Each of the four D flip flops test fine by themselves, but when I test 4 of them connected together into a register, I get the "Error (...
2
votes
2answers
839 views

What is this array-like notation of registers in datasheets?

I am reading BMP280 datasheet (pressure&temperature sensor). On different pages they use the following notation: $$register\text{_}name[a:b]$$ where a, b are integers. For example, on page 13 "...
0
votes
2answers
91 views

Are memory-mapped registers actually implemented as real registers?

I am currently trying to better understand microcontroller-architectures and I am particularly studying the ARM cortex-m3 right now. What I have always wondered is, if memory mapped registers are ...
1
vote
1answer
99 views

Pull up/down a pin on a PCA9536 does not register?

Quite a obscure question here, concerning a very specific I2C expander IC, however I believe that this example can be replicated with most expander bus ICs. I am using a PCA9536 to switch the 4 pins ...
1
vote
1answer
1k views

variable should not be used in output port connection

I searched random verilog heirarchy to understand how to properly instantiate modules. I found one on https://www.altera.com/support/support-resources/design-examples/design-software/verilog/ver_hier....
0
votes
1answer
113 views

Q: Digital potentiometer MCP4162

I am having a hard time understanding the MCP4162 Datasheet. The application for the digi pot is have an Ardunio to control the wiper resistance so I can have a constant desired output voltage ...
1
vote
1answer
337 views

What will happen if a dependent voltage source in parallel with a dependent current source?

What will happen if a dependent voltage source in parallel with a dependent current source. like dependent voltage source: 4Vx and current source 3Ix in parallel.
0
votes
1answer
32 views

BQ76PL536A: Stopping measuring voltages and temperatures

I am testing a BMS design with multiple slave boards each containing one bq76PL536A connected to a common CAN bus through a ATmega32M1 MCU and a ISO1050DW isolated transceiver. The problem I am facing ...
1
vote
3answers
184 views

How to find current in this circuit passing through 4ohm resistor

Below I have added my solution after the question so please let me know how I can solve it after the last step: These steps to follow to solve the question from where i left in my post , FYI :As ...
0
votes
1answer
88 views

Special Function Registers value expressed as Hexadecimal & Bit shift

I was wondering if someone could help me solve one problem, because I am very new to this and I was given the code of a former programmer to work with. I'm trying to figure out the value of 0x8008 &...
0
votes
2answers
798 views

how to initialize a vector of registers in verilog?

I want to initialize the following 16-bit registers in my module. reg [15:0] coefficient[4:0]; I used concatenation operator to do this: ...
2
votes
2answers
385 views

VHDL 4-bit Shift-and-Add Multiplier Buffer and Out port error

I am working on a creating a 4-bit Shift-and-Add Multiplier. I am getting this warning message - "WARNING:HDLParsers:3555 - "//filer1.egr.msu.edu/samarar1/ece230/Project05/Project05.vhd" Line 220. ...
-1
votes
1answer
2k views

What is increment/decrement address latch in 8085

Can you please explain about increment/decrement latch in 8085. I am currently studying registers and encountered this in the array of register section. Here are the things i found when i googled and ...
0
votes
1answer
37 views

verilog register with clock

Now, I've been learning Verilog but I got stuck with some easy problems. always@(posedge clock) if(reset == 1’b1) leds_r <=0; else leds_r <= leds_r + 1; I ...
0
votes
2answers
137 views

Will my decimal to binary converter work

I got into electronics recently and I hope to make a 8 bit ripple carry adder with a decimal input and output. This input is the first schematic I designed from scratch without a tutorial to go off ...
1
vote
2answers
363 views

CPU register count and access time [closed]

It has been suggested that one of the reasons typical RISC CPUs stop at 32 architectural integer registers, despite a 32-bit instruction having enough spare bits to specify 64, is that a larger ...
0
votes
1answer
35 views

I-type register format maximum size of a constant

The above picture is an I-type format register. I am confused as to why the largest constant possible is $$2^{15}$$ Should the largest possible constant be $$2^{16} -1$$
0
votes
1answer
574 views

Clarification on R, I, and J type Instruction formats in MIPS

I would like some clarification on some concepts of register types, to know if I understand it correctly. If I had a 32-bit CPU. Would that mean that the max number of operations that can be ...