32Bit DSP

I built a (low performance) VFD using three Uno's

http://arduino.cc/forum/index.php/topic,84086.0.html

I really want to up my game and I have waited and waited for the due to be released but I just cant see it happening

So I would like to hear peoples recommendations for a 32Bit board with a faster processor most preferably with a faster processor 80MHz ish would be great

So where would you go and which is the best to get me started doing some real programming away from the wiring commands obviously not going to be an arduino!!

Answers on a post card :stuck_out_tongue_closed_eyes:

Re the Due, as of the other day on twitter they said there will be a big announcement "after Easter" so it may not be long now.

Meanwhile there are the usual candidates, Maple, Beagle, Duinomite etc.


Rob

Thanks for the reply

I would like to start a discussion on this I am basically a noob and there is so much to get to grips with

Theres AVR based which the Uno is there is ARM based MAXQ MSP and PIC based which I dont understand the differences

I have done a little reading and it seems some of these can have a monitor and keyboard plugged directly into the board so no computer needed however this isnt something I think I would require

Programming in basic isnt something I know much about but tbh it doesnt really intererst me as I want to move away from wiring and learn C programming (I have a long way to go)

The Maple looks like good value for money but it says its 3.3V output at 500mA does this mean the output pins can only output 3.3V as I absolutely need a 5V output for my application(s)

The Beagle looks good but it does seem expensive at well over £100

The Duinomite also looks good

Basically I want something as flexible as the UNO with a faster processor and more resources so I would like to hear recommendations on where to start

Resinator: Theres AVR based which the Uno is there is ARM based MAXQ MSP and PIC based which I dont understand the differences

PIC is ARM based? ARM is basically a type of chip design. Everyone builds their own chips, but it is still based on the same architecture. Not sure if the compilers are compatible between manufacturers. ARM is also a wee bit more complicated than AVR. Mind you that ATMEL also makes ARM chips.

Resinator: I have done a little reading and it seems some of these can have a monitor and keyboard plugged directly into the board so no computer needed however this isnt something I think I would require

There is an ARM processor in your mobile phone and a lot of other places. However not all of these boards have the possibility to connect a keyboard and monitor to them. Maple is one of those. It is very fast, but not that powerful out of the box. The Beagle and similar can do that, but then you'd have to know how to program inside an operating system (there's good and bad things) instead of a single chip like the Arduino.

Resinator: Programming in basic isnt something I know much about but tbh it doesnt really intererst me as I want to move away from wiring and learn C programming (I have a long way to go)

You can learn C in your computer at home... if the plan is to learn C, I'd go with a computer program first and then move on to a chip like an ARM or AVR. It's difficult enough to learn C in a computer, so it's best you focus on the language first and on the chip later.

Resinator: The Maple looks like good value for money but it says its 3.3V output at 500mA does this mean the output pins can only output 3.3V as I absolutely need a 5V output for my application(s)

Yes, the pins work at 3,3. At 5V voltages, is very hard to find microcontrollers that do it. Can't you place an isolator or voltage adapter? It would serve as a protection for your processor as well. :\ 500mA is the capacity of the voltage regulator I think. The pin can't output 500 mA.

Resinator: The Beagle looks good but it does seem expensive at well over £100

It is a completely different beast. :)

Resinator: Basically I want something as flexible as the UNO with a faster processor and more resources so I would like to hear recommendations on where to start

Maple looks nice to me but I own one. Maybe waiting for the Arduino Due is a good idea, at least it'll sit close to the Maple and you can have an idea of price/benefit. Although I am quite sure there will be more support for the Due than for the Maple because of the user base and name. Arduino and these forums have way more people than the leaflabs.com one. If you look at Arduino the user base was crucial to make it what it is now. So your doubts and problems will probably be solved faster with the Arduino Due.

To finish, I think you should learn C, then quit the Arduino libraries and use your own to put that knowledge to the test, see how you can change your design to be 3,3V friendly and by then choose the board. :)

The chipKIT Uno32 has an 80 MHz PIC32 and costs about the same as a standard AVR Uno:

http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,892,893&Prod=CHIPKIT-UNO32

It's supported by a special version of the Arduino IDE, which also supports the standard Arduino boards.

The PIC32 has DSP capability, and has a lot more performance than an ARM device at the same clock rate.

Thanks for the replies,

I am starting to realise just how little I know about computer science, its shocking!!!, second only to my grammer!

Please excuse all the noob-ish-ness

For a kick off I am talking about a 32Bit DSP device but I want to discuss this, the bit part especially now I have studied a couple of modules on computer science at Uni but we only scrape the surface power electronics and maths is my thing

I use the term DSP because the way I thought was a proper DSP chip is geared towards doing mathematical operations like invers trigonometry FFT transforms etc can anyone elaborate on what makes a device a DSP chip?, I have been using an Uno which is an 16MHz 8 Bit device, the MHz speed of the processor is easy to understand for a layman like me the faster the clock the more instructions can be processed and the processor speed relates to how quick things happen which is dead easy

Regarding the bits the way I thought of it was that that the bits relates to the values the processor can handle the more bits the bigger the number and greater the accuracy, take the ADC/DAC with the Uno for instance my 10Bit ADC with the uno has a resolution of about 5mV/increment double the bits and double the resolution but after looking around it seems that theres more to it than this if I had an imaginary Uno with a 16Bit processor (instead of 8Bit) but still 16MHz, would the increased bits only increase the values I could use and not actually increase the speed of operation? I would need to increase the clock speed to decrease execution time thats the way I thought of it I have no issues with the values I am using being to large I am no where near 8bit values even if I was I could just divide by a factor use ms scales instead of us and the numbers smaller!!!!, I have just read some pretty confusing stuff on it all which has left me wondering if I can even spell my own name right! I dont have a clue!!!

I want faster operation faster calculations and would love the ability to calculate inverse sin on the fly in the less than 10us range it took the Uno (with my programming) about 160us to do a truncated version of Maclaurin series which is just taking the pee IMO

You can learn C in your computer at home... if the plan is to learn C, I'd go with a computer program first

I could do that but, if I am honest, I think it would be a bit boring I learn best by doing real things in the real world and I have read a fair bit on C through places like the MIT (OCW), books etc and I am ready to actualy do some real controlling in the real world I feel that way would be better for me start simple like blink LED and hello world etc and work up to interrupt vectors etc, in fact its stuff I had to do in my last project some pretty hardcore stuff (IMO!) so I am not totally new to C language

I have looked into the recommended boards here, first of all the chipkitUno 32 seems attractive to me it basically looks like microchip have totally ripped off Arduino with the name I mean an UNO 32 is just total cheek by microchip couldnt they think up there own name? it seems from what I have read that its a 3.3V output device which like I said I could really use 5V outputs and I took it for granted that the majority of boards would be 5V outputs to be used directly with TTL devices however it seems this is not the case, I could use devices to up the voltage, transistors or even opto couplers but it will mean another power supply to do this not the end of the world but more hassle, 5V output would be great as I dont introduce any further delays into the project as every us really does count! but it seems like I might just have to put up and shut up, is the arduino the only board with 5V outputs????? I cant find any other!!!!

the Beagle seems like a very powerful piece of kit when you say programme in an operationg system I take it you dont mean windoze??? (What do you mean?), I just dont get what the benefit of plugging a monitor and keyboard directly into a micro controller is??, fair enough if you dont have a PC then yeah great but in this day and age with laptops its just no hardship to me as I have a laptop why waste it??? its lighter than a monitor and the keyboards already plugged in, in fact I want to program from my laptop just like I program my UNO, I really like the look of the beagle I will pay the money if its something I can pick up and learn the speed and resources are very attractive to me as I would love to develop a space vector modulation motor drive or a FOC drive I love hardcore maths it seems like it would be good to do high end math in minimum time???, I would love to hear more about the Beagle the pros and the cons etc etc.

The Maple also looks good but after a little read it seems very similar to the ChipkitUno? 72MHz Arm vs 80MHz Pic does the ARM do things better than the PIC 32 I really am lost when it comes to this as being noob I would just impulse buy the fast chip an extra 8MHz clock speed but I just know theres more to it than that!!!

Thanks for the replies, I am more confused than ever!, the more I learn the less I know if you follow me please anyone else whos read this far please join in the discussion as there has got to be other noobs out there feeling confused like me! and I for one want to hear your opinions and experiences no matter how small

Can I ask how the PIC32 is better than an ARM device of same speed

I could wait for the Due but will it happen anytime soon\? I think it was back in September when I heard about it!!! they certainly got the name right I will give them that! :)

(Bit of a long post, I hope I responded to all the points!)

Resinator: For a kick off I am talking about a 32Bit DSP device but I want to discuss this, the bit part especially now I have studied a couple of modules on computer science at Uni but we only scrape the surface power electronics and maths is my thing

DSP stand for Digital Signal Processor. Basically, it's a processor with dedicated hardware for Signal Processing. This means that it's prepared to do a lot of math and do it very fast. Some of the times, to do that, there's special instructions for you to use to achieve this.

Resinator: I use the term DSP because the way I thought was a proper DSP chip is geared towards doing mathematical operations like invers trigonometry FFT transforms etc can anyone elaborate on what makes a device a DSP chip?, I have been using an Uno which is an 16MHz 8 Bit device, the MHz speed of the processor is easy to understand for a layman like me the faster the clock the more instructions can be processed and the processor speed relates to how quick things happen which is dead easy

It's more or less accurate, if you compare the same family of processor, then the higher the speed, the faster it will run. Given that they both have the same word size. But, for the sake of clearing some concepts, lets compare a RISC processor (Reduced Instruction Set Computer) to a CISC (Complex... you get the rest). The CISC might do a multiplication in one instruction, while the RISC will have to add a number a certain amount of times to achieve the same result. So you see that if they both run at the same speed, the CISC will have faster output. So the clock rate and speed of processing isn't always linear. But for what we are talking here, let's assume it is.

Resinator: Regarding the bits the way I thought of it was that that the bits relates to the values the processor can handle the more bits the bigger the number and greater the accuracy, take the ADC/DAC with the Uno for instance my 10Bit ADC with the uno has a resolution of about 5mV/increment double the bits and double the resolution but after looking around it seems that theres more to it than this if I had an imaginary Uno with a 16Bit processor (instead of 8Bit) but still 16MHz, would the increased bits only increase the values I could use and not actually increase the speed of operation? I would need to increase the clock speed to decrease execution time thats the way I thought of it I have no issues with the values I am using being to large I am no where near 8bit values even if I was I could just divide by a factor use ms scales instead of us and the numbers smaller!!!!, I have just read some pretty confusing stuff on it all which has left me wondering if I can even spell my own name right! I dont have a clue!!!

If I understood you correctly, it's like this.

The 8bit processor compared to the 16 bit processor will be slower when you use data types bigger than 8 bits. That's because the processor needs to do more instructions to add the second byte, whilst the 16 bit processor only needs to worry about doing one operation. For 32 bit variables the same applies, the 16 bit processor has operate on 2 16 bit registers, the 8 bit one has to operate on 4. Regarding the ADC, the bits the ADC has are fixed. 10, 12, 14, 16, 18, 24... and you are right about the higher the number of bits, the higher the resolution. What I think confused you was the calculation of bit loss due to noise or uncertainty in the ADC. Say for example that you convert a value that sits right on the border between 12 and 13, your readings might give you12 and other times 13... this means that the last bit of the measurement is uncertain and therefore is considered a bit loss. Of course that the higher number of ADC bits, the better off you'll be regarding losing them.

Resinator: I want faster operation faster calculations and would love the ability to calculate inverse sin on the fly in the less than 10us range it took the Uno (with my programming) about 160us to do a truncated version of Maclaurin series which is just taking the pee IMO

My Math is way to rusty to remember Maclaurin series off the top of my head, but if you could post the code in C without any special processor registers I might be able to run it on my Maple and try to get you a number.

Resinator: I could do that but, if I am honest, I think it would be a bit boring I learn best by doing real things in the real world and I have read a fair bit on C through places like the MIT (OCW), books etc and I am ready to actualy do some real controlling in the real world I feel that way would be better for me start simple like blink LED and hello world etc and work up to interrupt vectors etc, in fact its stuff I had to do in my last project some pretty hardcore stuff (IMO!) so I am not totally new to C language

You said you wanted to learn C... if you already know C, then you need to know how to apply it to microcontrollers. I don't know how you programmed your first VFD with the Arduino, but if you used the standard Arduino libraries for timers, UART, interrupts, etc... a better idea would be to start programming your board without all that. Don't get me wrong, I am not saying that the Arduino stuff is bad, but is just not made to be the most efficient code. So you can save a lot of clock cicles by writing the stuff by yourself. Also, if you get used to configure the peripherals in an AVR, moving towards a 32 bit processor will be a bit easier. You won't be swamped with all the options that are available there.

Resinator: I have looked into the recommended boards here, first of all the chipkitUno 32 seems attractive to me it basically looks like microchip have totally ripped off Arduino with the name I mean an UNO 32 is just total cheek by microchip couldnt they think up there own name? it seems from what I have read that its a 3.3V output device which like I said I could really use 5V outputs and I took it for granted that the majority of boards would be 5V outputs to be used directly with TTL devices however it seems this is not the case, I could use devices to up the voltage, transistors or even opto couplers but it will mean another power supply to do this not the end of the world but more hassle, 5V output would be great as I dont introduce any further delays into the project as every us really does count! but it seems like I might just have to put up and shut up, is the arduino the only board with 5V outputs????? I cant find any other!!!!

AVR based boards and PIC based boards are likely to run at 5V, but the processors are not as fast as you want them to be. I think you need to consider the 3,3V option. Just guessing here, but why do you need 5V outside of the processing part?

Resinator: the Beagle seems like a very powerful piece of kit when you say programme in an operationg system I take it you dont mean windoze??? (What do you mean?), I just dont get what the benefit of plugging a monitor and keyboard directly into a micro controller is??, fair enough if you dont have a PC then yeah great but in this day and age with laptops its just no hardship to me as I have a laptop why waste it??? its lighter than a monitor and the keyboards already plugged in, in fact I want to program from my laptop just like I program my UNO, I really like the look of the beagle I will pay the money if its something I can pick up and learn the speed and resources are very attractive to me as I would love to develop a space vector modulation motor drive or a FOC drive I love hardcore maths it seems like it would be good to do high end math in minimum time???, I would love to hear more about the Beagle the pros and the cons etc etc.

Not windows, some sort of linux or maybe even a real time OS. The beagle boots up an operating system and runs that operating system. If you want to run your controller software, you have to do it on top of that operating system. See what I mean?

Resinator: The Maple also looks good but after a little read it seems very similar to the ChipkitUno? 72MHz Arm vs 80MHz Pic does the ARM do things better than the PIC 32 I really am lost when it comes to this as being noob I would just impulse buy the fast chip an extra 8MHz clock speed but I just know theres more to it than that!!!

8MHZ might not mean faster output. Check some lines above. To be honest I've worked with PICs back in '99. It was a bitter experience and I moved on to AVR after that so the differentiating factor here might be the compiler (does it have a free and good compiler) and the peripherals inside the board.

Now here's a curve ball for you... look up on the internet STM32F4 discovery. 168MHz (My first computer ran at 166), F4 ARM core with floating point processor at around 15 USD. The problem with it is that there aren't many options to program it, but it sure looks like a good option for your VFD. It is fast enough and has enough hardware peripherals for what you need. It has a DAC and the option to run a timer as an encoder counter (which your drive will eventually need).

Resinator: Can I ask how the PIC32 is better than an ARM device of same speed

I could wait for the Due but will it happen anytime soon\? I think it was back in September when I heard about it!!! they certainly got the name right I will give them that! :)

Don't know about this. :(

look up on the internet STM32F4 discovery

I have a couple of these and they are very fast. However they are not simple to program and there is little support for beginners.

A DSP processor is one where the instruction set and architecture make it easy to implement things like recursive digital filters, with lots of terms.

Excellent replies thank you

A DSP processor is one where the instruction set and architecture make it easy to implement things like recursive digital filters

that makes sense, I have done a little on adaptive filters etc but like I said scraping the surface…

why do you need 5V outside of the processing part

It could well be that I just think I do, my main isue is to input into a gate drive chip to drive an inverter but I suspect I am getting my knickers in a twist when 3.3V will probably be just fine, its something I will look into thanks

If you want to run your controller software, you have to do it on top of that operating system

Is that an issue though?, once the OS boots then am I right in thinking the software just runs as normal and I wouldnt even notice a difference or am I missing the point?

STM32F4 discovery

Looking into that as well when I get chance seems good but I havent had time to check it out properley I am onto it though!

the 16 bit processor will be slower when you use data types bigger than 8 bits

Just/almost! as I thought tbh, some instructions might be more bits hence more cycles which can make the higher bit processor a bit quicker for some instructions but the bottom line is as long as the data we deal with doesnt exceed the chip then its clock speed which dictates processing speed

My Math is way to rusty to remember Maclaurin series off the top of my head, but if you could post the code in C without any special processor registers I might be able to run it on my Maple and try to get you a number.

My math is far from perfect but the series is basically derived by writing d(arcsin(x))/dx as 1/((1-x^2)^1/2 and expanding as a binomial expansion then integrating lots of room for mistakes

heres a program I wrote to test the execution time, I used serial write to introduce a delay and wrote a pin high before the write and then low after, hence the time for the series execution is the lowtime of the output and I measured it on a scope problem is I cant remember the exact time it was around 160us IIRC

Ahhhh the program is on my other computer and I only have a screen shot, I can get the program tomorrow but I will upload the screen shot if you dont mind a little typing!, the program does a subtraction a multiply and a division or two so not only the series done in the 160us, but IMO its still taking the pee

The 50Hz output with an index of 32 was the minimum steptime hence I wrote the test program for that point, inverse sin/omega is time in seconds the 1000000 is to convert to us which is used to set the time count in the program, thjere is much more than that to it in the real program which I will upload next (see screen shot attached)

You said you wanted to learn C… if you already know C, then you need to know how to apply it to microcontrollers

I should of said I want to get better with C, I am noob no doubt but not brand new I know a little I justb want to learn it properley so that I dont need the wiring commands, for instance I use analog read (had to change presacle values for speed) I wouldnt have a clue how to analog read without wiring command I will upload the main winding program next to show my mixed method some C++ some wiring!!!

All the working programs are on my desktop PC, but this looks like the working program with lots of serial print stuff for debugging etc

I used the asin function (offline) to write a step time array as the mac series took too long

Not the right program but it looks similar it shows my programming method and how noob I am! a little C with some wiring

#include <avr/io.h> 
             #include <avr/interrupt.h>
             #include <math.h>
             volatile boolean enable_my_ints;
             volatile boolean READY;
             volatile int TEST_VIN;
             volatile int TEST_VIN2;
             float TEST_HERTZ;
             float TEST_HERTZ2;
             float FLOAT_NUM;
             float FLOAT_NUM2;
             volatile int NUM;
             volatile int NUM2;
             volatile int HERTZ;
             volatile int HERTZ2;
             volatile int STEP_TIME;
             volatile int STEP_TIME2;
             volatile int Vin; 
             volatile int count;
             float T_OLD;
             float T_NEW;
             float X_OLD;
             float X_NEW;
             float INV_SIN;
             float OMEGA;
             float FLOAT_index; 
             volatile int n;

int MainRef[81] = {
  

  431, 433, 435, 437, 439, 441, 443, 445, 447, 449, 451, 453, 455, 457,
  459, 461, 463, 465, 467, 469, 471, 473, 475, 477, 479, 481, 483, 
  485, 487, 489, 491, 493, 495, 497, 499, 501, 503, 505, 507, 509, 
  511,  
  
  513, 515, 517, 519, 521, 523, 525, 527, 529, 531, 533, 535, 537, 
  539, 541, 543, 545, 547, 549, 551, 553, 555, 557, 559, 561, 563,
  565, 567, 569, 571, 573, 575, 577, 579, 581, 583, 585, 587, 589,
  591,

  

 
};  
             volatile int index;
             volatile int increment ;
             int REF = MainRef[index];
              int OFFSET;
             volatile int Iin1;
             volatile int Tindex;
             volatile int x;
             volatile int Iin4;
             volatile long int ERR;
             int GATE = 12;
             int INDEX_TIME [82]={};
             int TIMEARRAY [82]={};
  
  
  void setup(){ 
  
             Serial.begin(9600);
             digitalWrite(6&7,  LOW);
             enable_my_ints=false;
             READY=false;
             pinMode(13, OUTPUT);
             pinMode(GATE, OUTPUT);
             pinMode(8, OUTPUT);
             pinMode(7, INPUT);
             pinMode(6, OUTPUT);
             bitClear(ADCSRA,ADPS0) ;
             bitClear(ADCSRA,ADPS1) ;
             bitSet(ADCSRA,ADPS2) ;
             
             
             float SETUP_VIN =(analogRead(A4)+ 511.0);
             float TEST_HERTZ = ((SETUP_VIN)/1020.0)*50.0;
             HERTZ =ceil(TEST_HERTZ);
             float FLOAT_NUM = HERTZ*1.6 ;
             NUM=floor(FLOAT_NUM);
             TEST_VIN = SETUP_VIN;
             OMEGA = 2*PI*HERTZ;
             OFFSET = analogRead(A3) -511;
             index = 40;
  
 for(index=40; index<= 40+ NUM/2; index++)
  {
  
  X_NEW = ((index-40)/(FLOAT_NUM/2));
  INV_SIN = asin(X_NEW);
  T_NEW = (1000000)*(INV_SIN/OMEGA);
  INDEX_TIME [index] = T_NEW;
  }
  
  x=0;
  index=40-NUM/2;
   for(index>=40-NUM/2; index< 40; index++)
  { INDEX_TIME [index] = -INDEX_TIME [(40+NUM/2-x)];
  x=x+1;
  }
  
  
 index = 40-NUM/2;
   for(index>=40-NUM/2; index< 40+NUM/2; index++)
  {   
  TIMEARRAY [index]= 2*(INDEX_TIME[(index+1)]-INDEX_TIME[index])-1;
  }
  
  
  for(index=40-NUM/2; index<= 40+NUM/2; index++)
  { Serial.println(INDEX_TIME[index]);
  }
  Serial.println("MAIN_REF  ");
   for(index=40-NUM/2; index<= 40+NUM/2; index++)
  { Serial.println(MainRef[index]);
  }
   Serial.println("TIME ARRAY  ");
  for(index=40-NUM/2; index<= 39+NUM/2; index++)
  { Serial.println(TIMEARRAY[index]);
  }
  
    index = 40+NUM/2;
  Serial.print("HERTZ  ");
  Serial.println(HERTZ);
  Serial.print("TEST_VIN  ");
  Serial.println(TEST_VIN);
  Serial.print("T_NEW  ");
  Serial.println(T_NEW);
  Serial.print("X_NEW  ");
  Serial.println(X_NEW,9);
  Serial.print("T_OLD    ");
  Serial.println(T_OLD);
  Serial.print("OMEGA  ");
  Serial.println(OMEGA);
  Serial.print("INV_SIN  ");
  Serial.println(INV_SIN, 9);
  Serial.print("NUM  ");
  Serial.println(NUM);
  Serial.print("index  ");
  Serial.println(index);
  Serial.print("refindex  ");
  Serial.println(MainRef[index]);
  digitalWrite(6, HIGH);
  Serial.print("HERTZ  ");
  Serial.println(HERTZ);
  Serial.print("STEP TIME  ");
  Serial.println(STEP_TIME);
  
   
  
  
enable_my_ints= true;
  READY=true;
  count = 0;
  increment=-1; 
  index =40+NUM/2;
  cli();
  TCCR1A=0;
  TCCR1B=0;
  Iin4= TIMEARRAY[index];
    Serial.println(Iin4);
  OCR1A = Iin4;
  TCCR1B|=(1<<WGM12);
  TCCR1B|=(1<<CS11);
  TIMSK1|=(1<<OCIE1A);
  sei();
 
}
  
  
ISR(TIMER1_COMPA_vect){
 
   
   if( enable_my_ints == true){digitalWrite(6,HIGH);
                               
                               
                               index = index+increment;
                               Tindex=index;
                               
                               if(Tindex>=40+NUM/2)
                               {Tindex=39+NUM/2;
                               }
                               if(Tindex<=40-NUM/2)
                               {Tindex=41-NUM/2;
                               }
                               
                              Iin4= TIMEARRAY[Tindex];
                              OCR1A = Iin4;  
                               
                              if(index<=40 -(NUM/2))
                              {increment=1;
                              }
                              else{if (index>=40 + NUM/2)
                              {increment=-1;}      
                               }     
                               
                               count = count+1;
   if(count>= NUM/2 ){
     
  
     enable_my_ints =false;
     READY=false;
     cli();
     loop();
     }
  

}
}






 void loop(){
   
   
   while(READY==false){digitalWrite(6,LOW);
                                       
                                         
if(digitalRead(7)==LOW){
  
                        
                        
                        enable_my_ints =true;
                        READY=true;
                        count=0;
                        TCNT1=0x00;
                        sei();
                        break;}
                                         
     
  }
  
   Iin1=analogRead(A3) -OFFSET;
   ERR = MainRef[index]-Iin1;
   if (ERR>= 2){ 
     
   digitalWrite(GATE, LOW);
 }

   
     else{if (ERR <= -2){
        

   digitalWrite(GATE, HIGH );}  
   
     }


 }

Resinator: Can I ask how the PIC32 is better than an ARM device of same speed

It's got a MIPS core, with the following advantages:

Five-stage pipeline.

32 registers.

I/O at the full clock speed, the ARM has slow I/O.

Outputs have more drive.

Faster multiple and divide.

Easy upgrade to 64-bit.

etc.

Quote If you want to run your controller software, you have to do it on top of that operating system

Is that an issue though?, once the OS boots then am I right in thinking the software just runs as normal and I wouldnt even notice a difference or am I missing the point?

You are. The OS never goes away, it uses interrupts to do stuff in the background and that screws up timing, you need regulat timing to do DSP. So you end up having to use interrupts too. Even then there are occasions when the OS interrupts mask out the ones you want to use.

I/O at the full clock speed, the ARM has slow I/O.

This is not always true, it depends on the processor. Some have a setting to restrict the I/O access time so you can make it what you want. Accessing at full speed is not so important for audio DSP.

Note the STM32F4 only works in ARM thumb mode, that is a 16 bit instruction set. The registers are still 32 bits though.

The Cortex-M0 and -M3 have slow I/O. They are the ARM chips that compete with the PIC32.

Well after reading and re reading this thread, giving Arduino a bit more time I have ordered one of those STM32F4 discovery

The price meant it was stupid not to get it, £9 is unbelievable IMO it certainly looks hard to program so it should at least entertain me until Arduino get their finger out

The PIC32 does look good with lots more backup how does an ARM M4 do against a PIC32 is ,my next question!