Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. AVR Assembler article

AVR Assembler article

Scheduled Pinned Locked Moved The Lounge
comquestion
33 Posts 13 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Mike HankeyM Mike Hankey

    Does this subject appeal to the masses here?, and would anyone be interested in it? I have it on my site and it gets a lot of hits but don't know if it would be an interesting addition here.

    VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

    M Offline
    M Offline
    Marco Bertschi
    wrote on last edited by
    #9

    It certainly will be. I am learning AVR Assembler as a part of my Apprenticeship, using the STK 600 Board[^]. We are currently implementing a Real Time Clock, being triggered by the interrupt signal. Maybe I am going to put it up here when it is finished.

    Veni, vidi, caecus | Everything summarizes to Assembly code

    1 Reply Last reply
    0
    • Mike HankeyM Mike Hankey

      Does this subject appeal to the masses here?, and would anyone be interested in it? I have it on my site and it gets a lot of hits but don't know if it would be an interesting addition here.

      VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

      D Offline
      D Offline
      DaveX86
      wrote on last edited by
      #10

      +1

      1 Reply Last reply
      0
      • Mike HankeyM Mike Hankey

        Does this subject appeal to the masses here?, and would anyone be interested in it? I have it on my site and it gets a lot of hits but don't know if it would be an interesting addition here.

        VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

        W Offline
        W Offline
        Wendelius
        wrote on last edited by
        #11

        I'd be very interested and what's to loose if you publish it also here :)

        Mike HankeyM 1 Reply Last reply
        0
        • W Wendelius

          I'd be very interested and what's to loose if you publish it also here :)

          Mike HankeyM Offline
          Mike HankeyM Offline
          Mike Hankey
          wrote on last edited by
          #12

          As you say nothing ventured nothing gained. I'm working on converting it now and should be ready in a couple of hours.

          VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

          W 1 Reply Last reply
          0
          • Mike HankeyM Mike Hankey

            As you say nothing ventured nothing gained. I'm working on converting it now and should be ready in a couple of hours.

            VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

            W Offline
            W Offline
            Wendelius
            wrote on last edited by
            #13

            :thumbsup:

            1 Reply Last reply
            0
            • Mike HankeyM Mike Hankey

              Does this subject appeal to the masses here?, and would anyone be interested in it? I have it on my site and it gets a lot of hits but don't know if it would be an interesting addition here.

              VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

              CPalliniC Offline
              CPalliniC Offline
              CPallini
              wrote on last edited by
              #14

              I don't know AVR (I'm on the Microchip side) but would be interested.

              Veni, vidi, vici.

              In testa che avete, signor di Ceprano?

              Mike HankeyM 1 Reply Last reply
              0
              • CPalliniC CPallini

                I don't know AVR (I'm on the Microchip side) but would be interested.

                Veni, vidi, vici.

                Mike HankeyM Offline
                Mike HankeyM Offline
                Mike Hankey
                wrote on last edited by
                #15

                Should be similar. Published it about 1-2 hours ago! AVR Assembler 101[^]

                VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                B 1 Reply Last reply
                0
                • Mike HankeyM Mike Hankey

                  Does this subject appeal to the masses here?, and would anyone be interested in it? I have it on my site and it gets a lot of hits but don't know if it would be an interesting addition here.

                  VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                  R Offline
                  R Offline
                  R Erasmus
                  wrote on last edited by
                  #16

                  I'm working on AVR so wouldn't mind you posting on it. But whether anyone else would be interested on CP I don't know.

                  "Program testing can be used to show the presence of bugs, but never to show their absence." << please vote!! >>

                  Mike HankeyM 1 Reply Last reply
                  0
                  • Mike HankeyM Mike Hankey

                    I have done a couple of project using the 328P and C++ and it works very well.

                    VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                    D Offline
                    D Offline
                    Dougy83
                    wrote on last edited by
                    #17

                    Most of the Arduino boards use a processor with 32kB flash ('328, or '32), and all use C++ for 'wiring' code http://arduino.cc/en/Products.Compare[^]

                    Mike HankeyM 1 Reply Last reply
                    0
                    • Mike HankeyM Mike Hankey

                      Does this subject appeal to the masses here?, and would anyone be interested in it? I have it on my site and it gets a lot of hits but don't know if it would be an interesting addition here.

                      VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                      G Offline
                      G Offline
                      glennPattonWork3
                      wrote on last edited by
                      #18

                      Well, anything Low Level get my vote :)

                      Mike HankeyM 1 Reply Last reply
                      0
                      • G glennPattonWork3

                        Well, anything Low Level get my vote :)

                        Mike HankeyM Offline
                        Mike HankeyM Offline
                        Mike Hankey
                        wrote on last edited by
                        #19

                        Thanks Glenn, I submitted it yesterday and it's getting a fairly good reception so I guess a lot of people think like us. :)

                        VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                        1 Reply Last reply
                        0
                        • D Dougy83

                          Most of the Arduino boards use a processor with 32kB flash ('328, or '32), and all use C++ for 'wiring' code http://arduino.cc/en/Products.Compare[^]

                          Mike HankeyM Offline
                          Mike HankeyM Offline
                          Mike Hankey
                          wrote on last edited by
                          #20

                          A lot of hobbyists use the Arduino IDE which has a lot of C++ code and I don't use it so haven't delved to deep in it. But most people that use it seriously use Asm or C for production!

                          VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                          1 Reply Last reply
                          0
                          • R R Erasmus

                            I'm working on AVR so wouldn't mind you posting on it. But whether anyone else would be interested on CP I don't know.

                            "Program testing can be used to show the presence of bugs, but never to show their absence." << please vote!! >>

                            Mike HankeyM Offline
                            Mike HankeyM Offline
                            Mike Hankey
                            wrote on last edited by
                            #21

                            Submitted it yesterday AVR Assembler 101[^] Didn't realize so many people on CP were interrested or worked on AVR.

                            VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                            1 Reply Last reply
                            0
                            • Mike HankeyM Mike Hankey

                              Does this subject appeal to the masses here?, and would anyone be interested in it? I have it on my site and it gets a lot of hits but don't know if it would be an interesting addition here.

                              VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                              L Offline
                              L Offline
                              L e g i 0 n
                              wrote on last edited by
                              #22

                              count me up as interested :)

                              Mike HankeyM 1 Reply Last reply
                              0
                              • L L e g i 0 n

                                count me up as interested :)

                                Mike HankeyM Offline
                                Mike HankeyM Offline
                                Mike Hankey
                                wrote on last edited by
                                #23

                                Done! AVR Assembler 101[^]

                                VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                                L 1 Reply Last reply
                                0
                                • Mike HankeyM Mike Hankey

                                  It's hard to get people to change I've been in a couple of positions where I've pushed C++ even to the point of writing a framework, giving classes and such but they were set in there ways and I finally just did my own thing and left them to there's. I'm using the ATMega1280 and ATMega2560 boards for my C++ projects and the have 128K and 256K flash memory respectively so there's no "limited memory" excuse and since C++ runs just about as fast as C that shouldn't be a problem. The IDE has finally started to support it and I've been writing a lot of libraries in C++.

                                  VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                                  B Offline
                                  B Offline
                                  Bitbeisser
                                  wrote on last edited by
                                  #24

                                  Mike Hankey wrote:

                                  I'm using the ATMega1280 and ATMega2560 boards for my C++ projects and the have 128K and 256K flash memory respectively so there's no "limited memory" excuse and since C++ runs just about as fast as C that shouldn't be a problem. The IDE has finally started to support it and I've been writing a lot of libraries in C++.

                                  The "memory problem" rather lies in the fact that even on a Mega2560, you still have only 8KB of RAM. So you have to still be fairly conscious about any dynamic memory allocation (avoid virtual methods at all cost) on top of the fact that AVR MCUs are prone to lock up on heavy memory fragmentation... And the Arduino IDE was always using C++, the "sketch" that you write is nothing more than an include file for a main() file wrapper and the "Arduino language" isn't actually more than using methods of the default libraries (which in turn are written in C++). After all, the compiler underneath is nothing more than a AVR targeted GCC (ok, there's now a ARM option to support the Due and Intel has their own version of the IDE to support the x86 in their Galileo board). Ralf ;)

                                  Mike HankeyM 1 Reply Last reply
                                  0
                                  • B Bitbeisser

                                    Mike Hankey wrote:

                                    I'm using the ATMega1280 and ATMega2560 boards for my C++ projects and the have 128K and 256K flash memory respectively so there's no "limited memory" excuse and since C++ runs just about as fast as C that shouldn't be a problem. The IDE has finally started to support it and I've been writing a lot of libraries in C++.

                                    The "memory problem" rather lies in the fact that even on a Mega2560, you still have only 8KB of RAM. So you have to still be fairly conscious about any dynamic memory allocation (avoid virtual methods at all cost) on top of the fact that AVR MCUs are prone to lock up on heavy memory fragmentation... And the Arduino IDE was always using C++, the "sketch" that you write is nothing more than an include file for a main() file wrapper and the "Arduino language" isn't actually more than using methods of the default libraries (which in turn are written in C++). After all, the compiler underneath is nothing more than a AVR targeted GCC (ok, there's now a ARM option to support the Due and Intel has their own version of the IDE to support the x86 in their Galileo board). Ralf ;)

                                    Mike HankeyM Offline
                                    Mike HankeyM Offline
                                    Mike Hankey
                                    wrote on last edited by
                                    #25

                                    Bitbeisser wrote:

                                    The "memory problem" rather lies in the fact that even on a Mega2560, you still have only 8KB of RAM

                                    Agreed but that is always a consideration no matter what language you are using.

                                    Bitbeisser wrote:

                                    (avoid virtual methods at all cost)

                                    Why? It just uses a virtual table right? I tend to stay away from doing to much dynamic allocation because as you say memory does get fragmented easily and the memory management sucks.

                                    VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                                    B 2 Replies Last reply
                                    0
                                    • Mike HankeyM Mike Hankey

                                      Bitbeisser wrote:

                                      The "memory problem" rather lies in the fact that even on a Mega2560, you still have only 8KB of RAM

                                      Agreed but that is always a consideration no matter what language you are using.

                                      Bitbeisser wrote:

                                      (avoid virtual methods at all cost)

                                      Why? It just uses a virtual table right? I tend to stay away from doing to much dynamic allocation because as you say memory does get fragmented easily and the memory management sucks.

                                      VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                                      B Offline
                                      B Offline
                                      Bitbeisser
                                      wrote on last edited by
                                      #26

                                      Mike Hankey wrote:

                                      Bitbeisser wrote:

                                      The "memory problem" rather lies in the fact that even on a Mega2560, you still have only 8KB of RAM

                                      Agreed but that is always a consideration no matter what language you are using.

                                      But with C++ and the craze of a lot of people to inherit the heck out of it, it is much more likely becoming a problem as it isn't as obvious how much RAM a certain object/method is using...

                                      Mike Hankey wrote:

                                      Bitbeisser wrote:

                                      (avoid virtual methods at all cost)

                                      Why? It just uses a virtual table right?

                                      Correct. And where do you think those VMTs are created? Ralf

                                      Mike HankeyM 1 Reply Last reply
                                      0
                                      • B Bitbeisser

                                        Mike Hankey wrote:

                                        Bitbeisser wrote:

                                        The "memory problem" rather lies in the fact that even on a Mega2560, you still have only 8KB of RAM

                                        Agreed but that is always a consideration no matter what language you are using.

                                        But with C++ and the craze of a lot of people to inherit the heck out of it, it is much more likely becoming a problem as it isn't as obvious how much RAM a certain object/method is using...

                                        Mike Hankey wrote:

                                        Bitbeisser wrote:

                                        (avoid virtual methods at all cost)

                                        Why? It just uses a virtual table right?

                                        Correct. And where do you think those VMTs are created? Ralf

                                        Mike HankeyM Offline
                                        Mike HankeyM Offline
                                        Mike Hankey
                                        wrote on last edited by
                                        #27

                                        I guess my point is in my Init method I create say an CSpi object and use it for the lifetime of the run I don't create and destroy every time I use it. I agree when you're working with limited resources of any kind you need to be conscious of what you're doing but I believe the price is worth it for the extra benefit gained from C++. I believe we're saying the same thing!

                                        VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                                        1 Reply Last reply
                                        0
                                        • Mike HankeyM Mike Hankey

                                          Does this subject appeal to the masses here?, and would anyone be interested in it? I have it on my site and it gets a lot of hits but don't know if it would be an interesting addition here.

                                          VS2010/Atmel Studio 6.1 ToDo Manager Extension Relax...We're all crazy it's not a competition!

                                          B Offline
                                          B Offline
                                          BotReject
                                          wrote on last edited by
                                          #28

                                          As a 'hobbyist' (and one who is not at all insulted by the term) I love assembly language. It is fascinating to see how computers work on a more fundamental level. I would like to see more articles on assembly language - any instruction set.

                                          Mike HankeyM 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups