ATMEGA8 DATA STORAGE, please help me

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

Hi All,
I'm new here and im Atmega in general. I have a Project in which i traduce measures of pressure (with sensor mpx5050) in voltage signals. I will use ADC of Atmega8 for convertion, But my question is: after their convertion How can i put my data into the SRAM? someone can give me an example in ASM?
It could be a stupid question i know, But i'm new in this items.
Thank you

Last Edited: Wed. Jan 10, 2018 - 11:46 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This does not make sense. You want an example  in assembler, but you post in the ASF / Atmel Start forum (which by itself implies C as the programming language)?

 

So, what is it? ASF? Or  assembler?

 

 

EDIT: I see your response below. I have reported the post  so that a moderator can move it to an appropriate forum. PLEASE DO NOT POST ANYTHING HERE UNTIL IT HAS BEEN MOVED!!

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"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]

Last Edited: Wed. Jan 10, 2018 - 10:26 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Assembler. Excuse me, Wrong posting

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

So, now that the post is in a (somewhat) more fitting forum, here's a short, simple reply:

 

  1. Read the ADC value into a general purpose register (i.e. in the range R0 .. R31) using the IN instruction.
  2. Store the value that is in this general purpose register into a RAM location using the STS instruction.

 

Details on both instructions are in the "AVR Instruction Set" document which you can find here.

 

[EDIT: "ST" -> "STS"]

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"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]

Last Edited: Thu. Jan 11, 2018 - 11:02 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you so much!

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

And with that, let me also give this comment:

 

Since you use the expression "data storage" in the subject line, I hope you don't think RAM is "persistent storage"? I.e. are you aware that RAM loses its content if the system is restarted, e.g. at a power cycle or a reset?

 

If you want to have the data persisted over restarts then RAM is not the option. You're now entering the area of EEPROM, internal flash memory, external memories like external flash, memory cards, USB memory sticks etc.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"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 i know it, thank you!