Assembly quick start

Discussion in 'Embedded Systems and Microcontrollers' started by stefan.54, Mar 24, 2016.

  1. stefan.54

    Thread Starter New Member

    Dec 26, 2015
    28
    4
    Hey guys, 2nd year EE student here.

    I just started taking a MCU class and I need a quick start on assembly language. I already know how to code in C (MikroC especially for PICs and Arduino-like C). So, if any of you has/knows any good tutorials/books, please be kind and share them with me.

    Cheers!
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,571
    2,382
    stefan.54 likes this.
  3. stefan.54

    Thread Starter New Member

    Dec 26, 2015
    28
    4
  4. DNA Robotics

    Member

    Jun 13, 2014
    123
    26
    I found these videos again. They are very good.

    PICmicro x14 Basic Training Modules

    http://techtrain.microchip.com/x14/

    The following modules are available to help you familiarize yourself with the PICmicro MCU. Each module is an animated movie with audio.

    If you want to download the files, you will not need an internet connection and can watch the presentations at your leisure. There is no installation necessary. Simply download the zip file to your hard drive and unzip the files. Each course should be copied to a unique folder so the files do not get mixed up

    Class Title, View Now in Browser, Download for viewing anytime .zip)

    PICmicro x14 Architecture view , download (12.8MB)

    PICmicro x14 Instruction Set view , download (12.6MB)

    Development Tools Overview view , download (13.3MB)

    PICmicro x14 Device Configuration view , download(4.0MB)

    PICmicro x14 Resets view , download(4.5MB)

    PICmicro x14 Oscillator view , download(2.9MB)

    Many more here http://www.microchip.com/videos.aspx
     
  5. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,571
    2,382
    Most of the tutorials out there for Pic are mainly aimed at the 16F series, but once you achieve a skill at Assembly I would suggest graduating to the 18F series as there are added instructions and methods that make things quite a bit easier.
    Max.
     
  6. NorthGuy

    Active Member

    Jun 28, 2014
    605
    121
    Or, even better, move straight ahead to PIC24.

    PIC16F are good because they're very small, energy efficient, and cheap, and for their price and size they're incredibly powerful. I'm mostly talking about newer ones, with numbers staring from PIC16F1.

    PIC18F are oversized version of PIC16F. They add cost, size, but they do not add much power. The only thing that stands out compared to PIC16F is hardware multiplication.

    PIC24/dsPIC33 are much more powerful than PIC16/18, slightly cheaper than PIC18F, consume more power than PIC16F. Probably the best choice for everything where you don't need to keep cost down.

    There are also PIC32, but they're drastically different from other PICs. They provide lots of computing power, memory - sort of small computers. However, the CPU isn't closely tied to the hardware as in other PICs. In most cases they're better programmed in C.
     
    OBW0549 and jpanhalt like this.
  7. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    Glad to see you say that.

    As a person starting fresh, however, you might be better off picking the chip used in whatever tutorial you chose. Gooligum does have equivalent beginner tutorials starting with an enhanced mid-range 12F1501 (http://www.gooligum.com.au/PIC-tutorials/enhanced-PIC-sample). While not completely free, they are low cost.

    John
     
  8. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,571
    2,382
    I checked out the P24 but could not seem to find a close equivalent to the 18F23K22 in a DIP package, all I seem to come across were SMT?
    The selection guide does not seem to indicate what form, unless I don't see it?
    Max.
     
  9. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    Hi Max,

    I have found DigiKey a little easier for things like packages. It lists 69 PIC24F in TH packages and several additional in SOIC, which is really not that small. Here's a sample:
    upload_2016-3-27_13-32-55.png

    Of course that number is deceptive as it includes non-stock, full rolls, etc. Wow, that last one is only $1.68 in singles!

    John
     
    MaxHeadRoom likes this.
  10. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,571
    2,382
    Thanks John.
    I see the other two are higher price than the 18F23K22, not that price is really an issue as I do not buy in qty.
    Max.
     
  11. NorthGuy

    Active Member

    Jun 28, 2014
    605
    121
    Bit the first one has 8 times more flash than PIC18F23K22, and the second one - 4 times.
     
  12. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,571
    2,382
    I will have to go over the migration doc. and see what I might be gaining.
    Max.
     
  13. NorthGuy

    Active Member

    Jun 28, 2014
    605
    121
    Few things: no banks to keep track of, 16 W registers instead of one (any of them can also be used as FSR), each interrupt has its own vector and interrupts can be nested.
     
    OBW0549 likes this.
  14. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    I am sold...for my next project. What amazes me is that the correlation between price and number of pins is better than that between price and capability. Is it true that MCC puts the same chip in all of them and just prices by the number of pins? ;)

    John
     
  15. OBW0549

    Well-Known Member

    Mar 2, 2015
    1,328
    890
    I'll second this recommendation. Although the PIC24/dsPIC30F/dsPIC33 parts pose a pretty hefty learning curve to climb up compared to the older, "lesser" PICs, I have found them much, MUCH easier to work with in assembly language. I no longer use the PIC16 or PIC18 series parts much; mostly, I've been using either the 8-pin PIC10F/12F microcontrollers for little stuff, and dsPIC30F or dsPIC33EP for everything else.
     
    JohnInTX likes this.
Loading...