Author Topic: PIC32 and ASM  (Read 10012 times)

0 Members and 1 Guest are viewing this topic.

Offline DominusDRRTopic starter

  • Newbie
  • Posts: 1
PIC32 and ASM
« on: May 15, 2014, 07:21:01 pm »
Hi.

Can anyone tell me where I can learn how to program the PIC32 microcontroller assembly language?

I prefer to do it by MPLAB X.

Thanks

 :-DD
 

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: PIC32 and ASM
« Reply #1 on: May 15, 2014, 08:07:15 pm »
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Offline madshaman

  • Frequent Contributor
  • **
  • Posts: 698
  • Country: ca
  • ego trans insani
Re: PIC32 and ASM
« Reply #2 on: May 15, 2014, 08:18:33 pm »
Have you read the documentation for that uC?  It might have an instruction reference..
To be responsible, but never to let fear stop the imagination.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: PIC32 and ASM
« Reply #3 on: May 15, 2014, 08:25:31 pm »
It's a MIPS core.  A lot of relatively recent "how to program in assembly language" and "computer architecture" classes have been based on MIPS. (after all, it originated in Academia.)

The MPLabX uses the gnu assembler, which has a lot of features independent of the target cpu, so learning any other gnu-as (gas) target may be useful.  (alas, gas is not a particularly user-oriented assembler :-( )
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: PIC32 and ASM
« Reply #4 on: May 15, 2014, 08:40:03 pm »
If you're familiar with assembly for some other architecture, you can go to ImgTec's website and download "MIPS Architecture For Programmers", volumes 1-3. The book "See MIPS Run" by Dominic Sweetman is a thorough coverage of the architecture, though it also covers a lot of things not relevant for microcontrollers. And as westfw said, a lot of academic courses use MIPS as example.

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PIC32 and ASM
« Reply #5 on: May 15, 2014, 11:41:36 pm »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: PIC32 and ASM
« Reply #6 on: May 16, 2014, 12:06:21 am »
Hi.

Can anyone tell me where I can learn how to program the PIC32 microcontroller assembly language?

I prefer to do it by MPLAB X.

Thanks

 :-DD
Read the instruction set reference and do not forget that a MIPS processor also executes the instruction after a jump before making the jump. Very annoying.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: PIC32 and ASM
« Reply #7 on: May 16, 2014, 04:15:53 am »
do not forget that a MIPS processor also executes the instruction after a jump before making the jump.
ImgTec just released R6 of the architecture, and it actually removes the delay slot, among many other compatibility-breaking changes.

Offline PeterG

  • Frequent Contributor
  • **
  • Posts: 831
  • Country: au
Re: PIC32 and ASM
« Reply #8 on: May 16, 2014, 06:59:43 am »
Testing one two three...
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: PIC32 and ASM
« Reply #9 on: May 19, 2014, 01:18:49 pm »
If you're familiar with assembly for some other architecture, you can go to ImgTec's website and download "MIPS Architecture For Programmers", volumes 1-3. The book "See MIPS Run" by Dominic Sweetman is a thorough coverage of the architecture, though it also covers a lot of things not relevant for microcontrollers. And as westfw said, a lot of academic courses use MIPS as example.

Do you have an link to those three volumes?, I was looking around, but could not find much?
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: PIC32 and ASM
« Reply #10 on: May 19, 2014, 01:49:33 pm »
Do you have an link to those three volumes?, I was looking around, but could not find much?
You can find them on ImgTec's website, but you may have to register first.

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: PIC32 and ASM
« Reply #11 on: May 19, 2014, 02:05:02 pm »
Do you have an link to those three volumes?, I was looking around, but could not find much?
You can find them on ImgTec's website, but you may have to register first.

ah, thanks!
 

Offline jlmoon

  • Supporter
  • ****
  • Posts: 609
  • Country: us
  • If you fail the first time, keep trying!
Re: PIC32 and ASM
« Reply #12 on: May 21, 2014, 04:58:47 pm »


Where's FogHorn-LegHorn when you need him?

Recharged Volt-Nut
 

Offline os40la

  • Regular Contributor
  • *
  • Posts: 122
  • Country: us
Re: PIC32 and ASM
« Reply #13 on: June 02, 2014, 06:50:07 pm »
"No, but I did stay at a Holiday Inn Express"
 

Offline Q-Kernel

  • Contributor
  • Posts: 13
Re: PIC32 and ASM
« Reply #14 on: June 09, 2014, 12:49:58 am »
Can anyone tell me where I can learn how to program the PIC32 microcontroller assembly language?

I wrote assembler for the Open Source RTOS Q-Kernel. I would not recommend it is difficult to optimize the pipeline for the MIPS processor. Most C compilers generate code that performs better than assembler. If you want to try it anyway I would recommend the book from Morgan Kaufmann See.MIPS.Run
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: PIC32 and ASM
« Reply #15 on: June 10, 2014, 12:29:13 pm »


Where's FogHorn-LegHorn when you need him?

Got any more of them long haired books, boy?

The larger the government, the smaller the citizen.
 

Offline jlmoon

  • Supporter
  • ****
  • Posts: 609
  • Country: us
  • If you fail the first time, keep trying!
Re: PIC32 and ASM
« Reply #16 on: June 10, 2014, 09:06:34 pm »


Where's FogHorn-LegHorn when you need him?

Got any more of them long haired books, boy?

LOL..  :-DD  Great Show!
Recharged Volt-Nut
 

Offline SolarSunrise

  • Regular Contributor
  • *
  • Posts: 93
  • Country: ua
  • Hi there!
Re: PIC32 and ASM
« Reply #17 on: June 13, 2014, 07:48:03 pm »


Assembly ain't that complicated. Heck that picture probably represents .NET  :scared:
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf