Questions tagged [register]

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

Filter by
Sorted by
Tagged with
2
votes
2answers
78 views

Generating 40 kHz square wave using ATtiny13

I'm using an ATtiny13 running at 1.2 MHz and would like to generate a 40 kHz square wave on PB3 and PB4. The signal on PB4 should be 180 degrees offset (inverted) from PB3. I know that I need to set ...
0
votes
1answer
23 views

How to enable the DMP of the MPU9250?

The datasheet mentions some Advanced Hardware Features which gets executed by the Digital Motion Processor. I'd like to use the ...
9
votes
4answers
4k views

Where are registers and what do they look like?

I racked my brain through my comp-arch class and reread wiki’s article on hardware registers (they’re flip-flops, I get that), but one year later and I still don’t understand what a register ...
0
votes
2answers
154 views

Why would this cause a latch?

I'm reading ZipCPU's tutorial and got confused. Specifically, I'm referring to this page. To transcribe the Verilog code: ...
0
votes
1answer
38 views

The error “requires SystemVerilog extensions” while declaring an error

What's wrong with the following code? The array "FIFO" is declared correctly, but an error appears. Can you please help how to fix this? ...
0
votes
1answer
65 views

Question about 74LS164 8-bit serial in parallel out shift register

With the 74LS164 8 bit parallel out serial shift registers, I'm confused about a few things. In the datasheet (page3) on the logic diagram why do they suggest using an active low inverter before the ...
0
votes
1answer
49 views

How does a number is saved in a register

I've tried looking online, but I still haven't quite figured it out - does a number, for example 0x100 saved in a register by some convention like little/big endian like thigs are saved in memory or ...
2
votes
2answers
74 views

SN74HC595N Shift register output bizare

simulate this circuit – Schematic created using CircuitLab I'm using an 8-bit shift register on a very basic application for learning purposes, I have three buttons connected to SER, RCLK & ...
1
vote
0answers
39 views

Do these two memory register diagrams look correct?

So to start this off I have used J-K flip flops instead of D flip flops due to the equipment that I'll be using (Logic Tutor LT345 Mk2). The first diagram I am confident is correct but the 2nd diagram ...
0
votes
0answers
70 views

Why did they make the 74x170 (670) register file asychronous, no CLK input?

I am designing a retro computer as a project to learn digital electronics hands-on (not FPGA programming). I currently have an accumulator machine similar to the PDP-8 where the ALU has the ...
0
votes
1answer
66 views

Are Tri-state buffers even necessary?

I'm trying to make a 1-bit computer, and I'm stuck on the registers. I think I am going to have 2 of them, and I want a way to separate their outputs. Let me explain. Let's say Register A has a 0, and ...
0
votes
1answer
35 views

how to copy the value of a register into another (Logisim)

how to design the circuit that copy the value of register into the other? I only know the register can be written or loaded, but how is it possible that after loaded the value of 1 register and still ...
0
votes
1answer
115 views

Register File for MIPS Processor

I am writing code for Register file (32 registers, each of 32 bit) for MIPS Single Cycle processor. I want writing to happen at the negative edge of the clock. As usual, reading can happen any time (...
0
votes
1answer
40 views

Initial value for 32 bit register made using D F/F in verilog

I am trying to make a 32-bit register using 32 negative edge trigerred D F/F. Here is the verilog code for D F/F: ...
0
votes
1answer
48 views
0
votes
1answer
52 views

Verilog: Register File assignment not updating on clock pulse

I wrote some fairly simple code in Verilog to implement a 32-bit deep, 8-bit wide register file. However, when I actually run a behavioral simulation of the thing the two data-read lines (rd0_data and ...
0
votes
1answer
131 views

Do I really need to learn how to use registers - Programming a microcontroller? [closed]

I have a curious question. Do I really need to learn how to use registers when I program a microcontroller? I have been using Arduino for a long time. I quit using Arduino and starting to use STM32 ...
1
vote
0answers
60 views

How to set registers of accelerometer BMA220?

I first wrote my problem in Arduino Stack exchange (https://arduino.stackexchange.com/questions/68438/how-to-manage-interrupt-from-accelerometer-bma220) but I was told that I might get a better help ...
2
votes
2answers
80 views

“Increase” of a register in VHDL and hardware synthesis

Suppose you have already defined a register (for instance called "reg") in VHDL, for instance as a vectors of 4 bit. Now consider the operation: reg <= reg + 0001; it is like reg ++ in C. My ...
0
votes
2answers
60 views

How to use two Demux to index a matrix layout of registers

Consider the following. Let's say for simplicity sake I have an arrangement of 8 bit registers in a 4x4 matrix layout. I could easily use a Demux that has a 4 bit input select line for the addresses ...
0
votes
0answers
15 views

Has anyone configured/initialized a BCM89501 to use BroadRReach mode on all 4 channels?

I have a board where my configuration seems to get the individual channels in a good state about 80% of the time, but that means that I frequently have one or more bad channels on a board. Which ...
2
votes
1answer
61 views

NVIC memory map ARM cortex M3 STM32f103

I do not understand the following memory map regarding the NVIC registers in Programming Manual for STM32f103 page 129. It says that the offset address for NVIC_IPR0 is 0x300 and that of NVIC_IPR20 is ...
0
votes
2answers
171 views

How can I transform the code for a read-write register to a read only register in Verilog?

I have the code for read write register here ...
0
votes
1answer
82 views

How to specify a value for each bit of the reg in Verilog?

I want to declare a reg of 8 bits and set the value for each one of the bits separately (based on another "counter" reg) inside ...
0
votes
1answer
38 views

Verilog Reg File: Cant mix blocking and non-blocking assigment

I want to implement a blocking read to read the data as soon as it is written. I am trying to implement a MIPS 1 pipeline and i need the data to be available in the same clock it is written. The flips ...
0
votes
2answers
76 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
80 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
75 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
549 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
101 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
187 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
67 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
48 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
289 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
39 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
65 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
61 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 "...
18
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
90 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
57 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
110 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
20 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
44 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
38 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
199 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
84 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
80 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 ...
-1
votes
0answers
346 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
192 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?

1 2 3 4 5