Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Atmel ATMEGA 328p Ture (accumulators or working registers?)

Status
Not open for further replies.

pasidu

Member level 3
Joined
Jul 16, 2016
Messages
58
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
494
Dear all I would like to base ATMEGA328P MCU for this discussion

I sow the block diagram of the data sheet is showing in 9 of 660 pages which are 32 registers

My question is

Are those registers accumulators or working registers

Please advice
 

They are general purpose registers . All arithmetic and logic operations operate on those registers;
you can use them as source or destination of instructions without saving to and loading from RAM
different from accumulator , because in accumulator based architecture the output of ALU always saved on a single register
 
  • Like
Reactions: pasidu

    pasidu

    Points: 2
    Helpful Answer Positive Rating
Thanks for the reply

In PIC and 8051 use working register and Accumulator also used as source or destination of instructions without saving to and loading from RAM

Therefore what are the more advantage using 32 registers in MEGA328P
 

I don't know much about 8051, actually me myself prefer PIC

in PIC you have working register W and and file register , file register is actually RAM. for example when you write ADDWF 0x01,f you add W with RAM address 0x01 and save it back to 0x01 address of RAM, so in a single instruction you have read and write to RAM. it makes more complicated to implement this architecture in single cycle because you need read and write RAM in single clock. in PIC we have 4 cycle instruction
but in AVR is single cycle
 
  • Like
Reactions: pasidu

    pasidu

    Points: 2
    Helpful Answer Positive Rating
yes but that is a branch instruction not arithmetic it doesn't use general purpose registers as operand
if you check page 22, you see that the instructions that use two general purpose registers are single cycle
 
  • Like
Reactions: pasidu

    pasidu

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top