# Assembly quick start

#### stefan.54

Joined Dec 26, 2015
28
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!

#### stefan.54

Joined Dec 26, 2015
28

#### DNA Robotics

Joined Jun 13, 2014
571
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

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

Joined Jul 18, 2013
21,189
I just started taking a MCU class and I need a quick start on assembly language.
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.

#### NorthGuy

Joined Jun 28, 2014
611
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.
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.

#### jpanhalt

Joined Jan 18, 2008
10,066
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.
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

Joined Jul 18, 2013
21,189
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.

#### jpanhalt

Joined Jan 18, 2008
10,066
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:

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 Joined Jul 18, 2013 21,189 Wow, that last one is only$1.68 in singles!

John
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.

#### NorthGuy

Joined Jun 28, 2014
611
I see the other two are higher price than the 18F23K22.
Bit the first one has 8 times more flash than PIC18F23K22, and the second one - 4 times.

Joined Jul 18, 2013
21,189
I will have to go over the migration doc. and see what I might be gaining.
Max.

#### NorthGuy

Joined Jun 28, 2014
611
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.

#### jpanhalt

Joined Jan 18, 2008
10,066
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

#### OBW0549

Joined Mar 2, 2015
3,503
Or, even better, move straight ahead to PIC24. (...) 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.
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.