Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 04:45 25 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Pic 32 Asm code for Micromite ?

Author Message
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 12:31am 23 Sep 2014
Copy link to clipboard 
Print this post

Hi ,
Is anyone good in Asm for pic32?
I fear my c routine for the ledstripe is a little
Bit to slow , its not tested yet but is c to slow i
Need to go with asm and will glad about any help.
Btw : if all working it will be free as ever
Thx
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3683
Posted: 12:55am 23 Sep 2014
Copy link to clipboard 
Print this post

Which C compiler have you used and with which options (switches)?

How is the hardware arranged? (Interfaces, speed, etc.)

What is the C that you want to speed up? Often a better algorithm will make a much bigger improvement...

JohnEdited by JohnS 2014-09-24
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3167
Posted: 03:26am 24 Sep 2014
Copy link to clipboard 
Print this post

C compilers are pretty good these days, I have long stopped trying to optimise my code by using assembler segments. Often the compiler output was better than my assembler.

My advice is to stick with C, if it is not fast enough then nothing else will be either.

Geoff
Geoff Graham - http://geoffg.net
 
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 04:43am 26 Sep 2014
Copy link to clipboard 
Print this post

Maybe you are right Geoff .
And John i will test the speed and hope all is ok
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 02:30pm 26 Sep 2014
Copy link to clipboard 
Print this post

To echo Geoff's sentiments.

MIPS assembler was never designed to be human coded - it's really quite "horrible" and human-unfriendly. Even the GCC compiler sometimes has trouble generating the truly best optimised code. Any comparison or thought that PIC32 assembler is like 80x86/68x000 etc would soon hit ugly reality.

Rely on GCC, and if it's not quick enough for your application, then you probably need to redesign your algorithm(s) and/or move up a processor range.

I wish that it wasn't so, but the days of hand-coded assembler have all but vanished (very sadly).

Peter
The only Konstant is Change
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024