Hello. I'm currently developing my thesis project for which I'm using a PIC 18f2550 to do some things:
- Sample 2 signals, one at 1.6kHz and the other at 3.2kHz, both with the TIMER0.
- Communicate with my PC via the USB, receive commands and reply data at 1.6kHz. Done with TIMER1.
- Control valves, and pumps with PWM. Duty Cycle is calculated from the information present in the sampled signals. I'm doing this with TIMER0 also.
However I'm facing a difficulty. If I try to speed up the PWM modulation a bit it hinders my analog sampling. If I use the PWM sequence more often it starts doing some funny stuff with my analog samples (increases noise, modifies offsets and such). No matter what I do I cannot seem to enhance the pic's performance. RIght now I'm using CCS to program and the PIC is at it's maximum 12 MIPS. And I cannot use the CCP module as at this clock frequency the minimum PWM frequency is rather high for my application requirements.
My question is: I've seen AtMega chips can handle 20 MIPS, and I've been experiencing funny unreliable ADC behaviour for a while with my PIC. Is it worth changing to an AtMega or even an assembled arduino? What's AVR's performance like compared to PICs in general?
- Sample 2 signals, one at 1.6kHz and the other at 3.2kHz, both with the TIMER0.
- Communicate with my PC via the USB, receive commands and reply data at 1.6kHz. Done with TIMER1.
- Control valves, and pumps with PWM. Duty Cycle is calculated from the information present in the sampled signals. I'm doing this with TIMER0 also.
However I'm facing a difficulty. If I try to speed up the PWM modulation a bit it hinders my analog sampling. If I use the PWM sequence more often it starts doing some funny stuff with my analog samples (increases noise, modifies offsets and such). No matter what I do I cannot seem to enhance the pic's performance. RIght now I'm using CCS to program and the PIC is at it's maximum 12 MIPS. And I cannot use the CCP module as at this clock frequency the minimum PWM frequency is rather high for my application requirements.
My question is: I've seen AtMega chips can handle 20 MIPS, and I've been experiencing funny unreliable ADC behaviour for a while with my PIC. Is it worth changing to an AtMega or even an assembled arduino? What's AVR's performance like compared to PICs in general?