C cross compiler to target PIC16f877A

Hey folks! I am looking for a C cross compiler to target PIC16f877A. I searched for the Keil comiler for pic but it seems they dont make one. I would be grateful for some suggestions on this. Also,the pic is going to be used for calculating a 1024 point FFT. Is that kind of feat possible on a 16 series PIC? Otherwise I will have to go for the dsPIC series and the timespan I have to complete this project is very limited.So I am quite apprehensive about it. Regards.

Reply to
chetanthegreat
Loading thread data ...

chetanthegreat skrev:

No, there is no build in FFT routine and the processor is most of the time to slow, to handle that kind of calculations.

Go with the DSP solution.

--
Hilsen Mikkel Lund
"Sund fornuft, har aldrig stoppet en tosse"
Jokeren i "Mænds ruin"
Reply to
Mikkel Lund

There may not be any FFT hardware built into the micro, but that doesn't mean it cannot be calculated. And how can you say it is too slow? The OP did not state how fast it needed to be calculated, nor what precision or form the calculation was to have (i.e. floating point, fixed point, 16-bit, 32-bit, etc.).

I would question why a PIC was chosen for the task instead of something more compiler friendly. There may be reasons, but they should be good ones.

Reply to
Mr. C

Mr. C skrev:

Read what I wrote: "is most of the time" not all the time. And PICs are notoriously slow. The instructions take many instructions and the core has a clock divider. This make it slow compare to many other microcontrollers.

True

--
Hilsen Mikkel Lund
"Sund fornuft, har aldrig stoppet en tosse"
Jokeren i "Mænds ruin"
Reply to
Mikkel Lund

I have used the CCS compiler (

formatting link
). It has a pretty good price to performance ratio. I know the HiTech compiler is suppose to be the best, but it also has that kind of cost. I doubt I would pick a PIC16 series part to do FFT's if any kind of time constraint existed, but that is whole 'nuther thread.

Jim

Reply to
James Beck

"chetanthegreat" schreef in bericht news: snipped-for-privacy@h3g2000cwc.googlegroups.com...

Hi-Tech is supposed to sell the best PIC compiler. I used it and had no complaints. After all, I didn't have to pay for it :)

But... 1024 point FFT with less then 400 bytes RAM, a pretty slow processor and hardly math support. I like PICs and use them too, but this does not sound like a good idea.

Maybe we can give better advice if you tell more about your needs.

petrus bitbyter

Reply to
petrus bitbyter

(I can't believe I am defending PICs - I really don't like them much at all)

"Notoriously slow" compared to what? Compared to other 8-bitters, they are pretty fast. Most PIC instructions take 4 clock cycles. The PIC16F877 can run with a 20 MHz clock which is 5 million instructions per second, or 200 nS per instruction. Again, we would need to know what his time needs are, but I would not call the PIC a notoriously slow part.

Reply to
Mr. C

Mr. C skrev:

Me neather

I sorry, my memory has failed me. The MSP430 has a Von Neuman architecture, not PIC. Still I don't consider til PIC as a fast micro.

--
Hilsen Mikkel Lund
"Sund fornuft, har aldrig stoppet en tosse"
Jokeren i "Mænds ruin"
Reply to
Mikkel Lund

Yes, although I personally loathe 'C' I'm happy to say the CCS product is an excellent compiler for the PIC. I just wish someone would offer a Basic compiler of similar breadth and quality. john

--
Posted via a free Usenet account from http://www.teranews.com
Reply to
john jardine

No. It doesn't even have 1024 bytes of RAM. It doesn't have a hardware multiplier.

--
Ben Jackson AD7GD

http://www.ben.com/
Reply to
Ben Jackson

Well.. the time complexity problem wont be there i suppose as the FFT is going to be used to find the frequency of incoming signal and the harmonic analysis of current components etc. Basically I am set out to build a power analyzer, which will include :-

-1 phase supply monitoring-

-Surge detection capabilities of the order of 10 microseconds

-Data logging at configurable intervals

-Current harmonics distortion calculation

-Measurement of parameters -True rms I & V, KVA, KVAR , cos(phi)

The very fundamental problem i am facing is that I havnt used dsPIC series before and I have to produce results in next month or two. Also apart from the knowledge of basic C language and matlab I will be using a cross complier for the 1st time ever. So I was thinking of going by the beaten path and use a microcontroller such as the 877 or 917. But if using a dsPIC my task is gonna be achieved in a less time period then I have no constraints as such as I have the progamming kit and other necessary support. So any suggestions are most welcome! Regards.

Reply to
chetanthegreat

compared to 1 clock cycle on the AVR, it's mostly the two word instructions that take two cycles.

ATMeg8515-16 at 16MHz: 16 MIPS,

ATTiny2313-20 at 20MHz: 20MIPS (fewer pins and less ram and flash though)

Also the instructions seem achieve more than PIC instructions, (having 32 registers helps)

--

Bye.
   Jasen
Reply to
jasen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.