PDA

View Full Version : Instruction set PIC12F675



Lionheart
- 5th October 2009, 11:39
Hey,

I'm writing a program in assembler language and i didn't find the multiply or divide opcode back in de instruction set.

Is it wrong of me to assume that you can't myltiply or divide with the PIC12F675 or the whole PIC12 family?

Thanks at advance,
Ward

Acetronics2
- 5th October 2009, 12:23
Hi, Ward

I do think you're a beginner ... so, ...

1) only the 18F,24,33 and 32 series processors have the HARDWARE multiplication aboard ...

2) You are on a PICBASIC PRO Forum ... as the Compiler name states ... it's BASIC language and not assembler ...

From 1) you understand the 10,12 and 16 series only can use SOFTWARE multiplication ...

From 2) that you are not in the best place to get infos about assembler. I'd recommend you to join the MICROCHIP forums that mainly deal with assembler language.

As a bonus, I greatly encourage you to read and Download THIS :

http://www.mikroe.com/en/books/picmcubook/ch1/ ... ( all chapters )

That might help you to understand what you try to play with ...

Alain

comwarrior
- 5th October 2009, 15:30
Acetronics;
This is a GENERAL forum, so it's GENERAL information and questions.

Lionheart;
from what Acetronics has said the answer is no... the PIC12's don't have hardware maths, so you'll have to do multiply and devide in software...

I'd reccomend if your PIC is going to be doing a lot of advanced maths then you'll definatly want to use a PIC18, the cost diference alone is not that much and means programs run a hell of a lot faster.

Acetronics2
- 5th October 2009, 15:42
Acetronics;
This is a GENERAL forum, so it's GENERAL information and questions.

.

YOU WRONG !!! NEVER BEEN A GENERAL FORUM ( you quite new here - end of june 2009 - ..., so read a bit before making YOUR rules. )


MEL PICBASIC Forum ... everything in the title !!!




General
Area for general PIC BASIC discussion



You are in THIS SECTION ...

This is a PicBasic Forum ... but that doesn't mean some help can't be given for Assembler including .

Alain

Darrel Taylor
- 5th October 2009, 23:16
You're right, this is a PicBasic forum.

And assembly language is a "HUGE" part of PicBasic Pro.
If you don't know ASM, then you only know HALF or less of what PBP has to offer.

Instead of telling people to go away...
Learn ASM and help them. Or learn ASM in the process of helping them.

You will be better off in the long run.
<br>

Lionheart
- 6th October 2009, 08:05
Thanks for the info.

Acetronics:
As you have guessed i am ideed a beginner with PIC controllers i only have some experience with the 8051 family. I will certainly read the info you gave me.

comwarrior:

I'd reccomend if your PIC is going to be doing a lot of advanced maths then you'll definatly want to use a PIC18, the cost diference alone is not that much and means programs run a hell of a lot faster.

I originally thought that all PIC controllers had the multiply tool build in so i already bought the controller, but there isn't that many mathts so it should be doable. You learn from your mistakes, so next time i don't make the same mistake hopefullyhttp://www.picbasic.co.uk/forum/images/icons/icon7.gif.

Darrel Taylor
- 6th October 2009, 08:18
Here's a bunch of good math routines for PIC's in ASM.

If it's not there ... you probably don't need it. :)

Start with the "Basic math" link.

http://www.piclist.com/techref/microchip/math/index.htm
<br>

comwarrior
- 6th October 2009, 18:47
Thanks for the... correction... Darrel ;)
I'm currently immersed in your instant interupts, nice work, i like it :D

Lionheart:
I registerd on here in june granted...
I started with the 16F877A running at 20MHz... I've recently baught a 18F4550 thats capable of running at 48MHz. Two reasons i've done it...

The amount of maths i wanted it to do while maintaing it's scanning speed was getting rediculeous, it was starting to struggle with all the multiply and devides...

Also, the extra speed (48MHz instead of 20MHz)

The fact that the 18F4550 has additional ADC's, USB, and tonns more hardware... I just want the speed... lol