Thread: Need AVR Help
View Single Post
Old 05-20-2009   #2
Kingroudy
Super Moderator
 
Kingroudy's Avatar
 
Last Online: 02-16-2022
Join Date: May 2006
Posts: 5,580
Thanks: 1,888
Thanked 2,653 Times in 1,593 Posts
Groans: 55
Groaned at 35 Times in 32 Posts
Default

1- i didn't study AVR, but i can answer the first question since i have experience in PIC processors, the status register has the size of any other register, and where every bit represent an ALU status (or memory bank if it exists in AVR)
some of the bits are
C: carry bit, set to one when the ALU operation generates a carry
DC: digit carry.. same concept
Z: the Zero bit, if the result of an ALU operation is zero, this bit will be set.
(the Z bit is nothing but a NAND Gate)
OV bit: set to 1 when there is an overflow
N bit: set to 1 when a negative value is generated.

i was talking about the PIC, but the concept is the same. i suggest you download the datasheet of the AVR you are working on, and i will try to help you if you have a question.
__________________
click on 'Groan' to switch to my left testicle.
Kingroudy is offline   Reply With Quote
The Following User Says Thank You to Kingroudy For This Useful Post:
Adam (05-21-2009)