SEN , BRMI , LAC instruction of Arduino AVR microcontroller

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Would anyone give me use of these instruction using examples ? Each Instruction has to be used in three separate program . Program code should be purely in assembly language.

Raj

Last Edited: Sat. Oct 28, 2017 - 02:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

School work?

 

Have you studied the AVR Instruction Set manual. It's here: http://www.atmel.com/Images/Atme... .

 

Are we talking about a specific AVR model? (The LAC instruction is supported by XMEGA AVRs only.)

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sir, I am not able to write example which has a use of BRMI, SER, LAC instruction in separate

program

Raj

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think that statement needs to be addressed to your teacher?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have no teacher to teach AVR microcontroller AVR.
 

Raj

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tell us what you have done to research these instructions and what you do not understand about using them...

David (aka frog_jr)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So who set you this assignment?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You just give me the question where I can use them in the program. For each instruction there should be different question. I will write my own code. Just you provide me the question . please

Raj

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry for telling a lie Sir. Actually this is the assignment given to implement in any program. I am really sorry.

Raj

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, if you are having trouble understanding the instruction manual, I can explain what the instructions do:

 

SEN: sets the negative flag. Normally, the negative flag is set or cleared automatically according to the result of a previous ALU operation, the high bit of the result (sign bit) is copied to this flag.

 

BRMI: jump to a label if the negative flag is set.

 

LAC: All the bits that are set in the register provided as argument are cleared in the memory position indicated by the Z register pair; at the same time, the data originally present in memory is saved to the argument register.

 

So now you have to figure out a use for these instructions. In particular SEN doesn't seem very useful.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Raj666 wrote:
Arduino AVR microcontroller

Note that there is nothing[1] different about the AVR in an Arduino from any other AVR in the world.

 

There is no such thing as an "Arduino AVR" - it is just an AVR.

 

 

[1] Apart from the code that's loaded into it. But the AVR itself is entirely standard.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The fact that "Arduino" was given ass part of the question totally passed me by without notice.

 

So, the LAC instruction is on XMegas only. Is there ant Arduino equipped with an XMega? Not to my knowledge..

"He used to carry his guitar in a gunny sack, or sit beneath the tree by the railroad track. Oh the engineers would see him sitting in the shade, Strumming with the rhythm that the drivers made. People passing by, they would stop and say, "Oh, my, what that little country boy could play!" [Chuck Berry]

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, unfortunately the instruction manual from Atmel doesn't specify which cores have which instructions available. But there is this list from Wikipedia:

https://en.wikipedia.org/wiki/At...