PIC32 and ASM - Page 1
Forum section: electronics / general

author: DominusDRR
author_rank: Newbie
timestamp: May 15, 2014, 07:21:01 pm
content: 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

author: madshaman
author_rank: Frequent Contributor
timestamp: May 15, 2014, 08:18:33 pm
content: Have you read the documentation for that uC? It might have an instruction reference..

author: westfw
author_rank: Super Contributor
timestamp: May 15, 2014, 08:25:31 pm
content: 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 :-( )

author: andersm
author_rank: Super Contributor
timestamp: May 15, 2014, 08:40:03 pm
content: 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 15, 2014, 11:41:36 pm
content: Quote from: lewis on May 15, 2014, 08:07:15 pmYou missed a sign on the 14th line, 3rd term.J/K(FWIW, ref appears to be:http://semiclassicallimit.wordpress.com/2012/09/14/the-beauty-of-particle-physics-i/)Tim

author: nctnico
author_rank: Super Contributor
timestamp: May 16, 2014, 12:06:21 am
content: Quote from: DominusDRR on May 15, 2014, 07:21:01 pmRead 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.

author: andersm
author_rank: Super Contributor
timestamp: May 16, 2014, 04:15:53 am
content: Quote from: nctnico on May 16, 2014, 12:06:21 amImgTec just released R6 of the architecture, and it actually removes the delay slot, among many other compatibility-breaking changes.

author: PeterG
author_rank: Frequent Contributor
timestamp: May 16, 2014, 06:59:43 am
content: Quote from: lewis on May 15, 2014, 08:07:15 pmSolve for X

author: neslekkim
author_rank: Super Contributor
timestamp: May 19, 2014, 01:18:49 pm
content: Quote from: andersm on May 15, 2014, 08:40:03 pmDo you have an link to those three volumes?, I was looking around, but could not find much?

author: andersm
author_rank: Super Contributor
timestamp: May 19, 2014, 01:49:33 pm
content: Quote from: neslekkim on May 19, 2014, 01:18:49 pmYou can find them onImgTec's website, but you may have to register first.

author: neslekkim
author_rank: Super Contributor
timestamp: May 19, 2014, 02:05:02 pm
content: Quote from: andersm on May 19, 2014, 01:49:33 pmah, thanks!

author: jlmoon
author_rank: Unknown
timestamp: May 21, 2014, 04:58:47 pm
content: Quote from: lewis on May 15, 2014, 08:07:15 pmWhere's FogHorn-LegHorn when you need him?

author: os40la
author_rank: Regular Contributor
timestamp: June 02, 2014, 06:50:07 pm
content: Quote from: PeterG on May 16, 2014, 06:59:43 am42

author: Q-Kernel
author_rank: Contributor
timestamp: June 09, 2014, 12:49:58 am
content: Quote from: DominusDRR on May 15, 2014, 07:21:01 pmI 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

author: Stonent
author_rank: Super Contributor
timestamp: June 10, 2014, 12:29:13 pm
content: Quote from: jlmoon on May 21, 2014, 04:58:47 pmGot any more of them long haired books, boy?

author: jlmoon
author_rank: Unknown
timestamp: June 10, 2014, 09:06:34 pm
content: Quote from: Stonent on June 10, 2014, 12:29:13 pmLOL..Great Show!

author: SolarSunrise
author_rank: Regular Contributor
timestamp: June 13, 2014, 07:48:03 pm
content: Quote from: lewis on May 15, 2014, 08:07:15 pmAssembly ain't that complicated. Heck that picture probably represents .NET