[sdiy] Digital topics like PLDs?
tom at electricdruid.net
Tue May 26 12:15:54 CEST 2015
I agree. This was the gist of my original caveat.
My reason for mentioning control panels was that human interface functions tend to be exactly those where "jitter and latency are not an issue". Us poor humans don't really notice much below 10 or 20 milliseconds, and a PIC can have done all its jobs and be sat around twiddling its digital thumbs in that amount of time. Wrapping up a lot of fiddly (and slow) control logic onto a single chip is a job that comes up often enough to be useful.
On 26 May 2015, at 08:54, rsdio at audiobanshee.com wrote:
> As for PIC programming versus logic, you have to keep in mind that the PIC is not continuously reading all inputs, and it certainly cannot read multiple inputs simultaneously (*). Whether you use interrupts or just poll in a tight loop, there will be some random number of cycles between an external signal change and the PIC code reaction. Worst case, the input changes right after you read in the old value, and then there are several instructions before your code loops back around to check that input again to see that it's changed. Many processors sample for a few cycles on pins that generate an interrupt, so there's a delay between a signal change and the start of the interrupt (not to mention the delay between the start of the interrupt and the actual interrupt code running after the context change).
> Depending upon the timing needed, a PIC can do the job. Beyond a certain point, it is hopelessly incapable.
> A few years back, I briefly took over a project where the original designer could not meet the client's goal of sub-millisecond latency. Apparently, the STM ARM was expected to update all 132 I/O pins in that window while reading an ADC at 3.2 MSPS, and it couldn't be done. My redesign was to use discrete logic to drive those pins, allowing the processor (a DSP instead of ARM) to focus on reading the ADC at 3.2 MHz via DMA. The number of I/O pins dropped to 2 - a trigger to step through the sequence and a reset to start it.
> The thing about logic is that everything runs in parallel. The PIC (or any processor) can only handle things one at a time, with a sequence of instructions. The exceptions are those analog comparators and other peripherals that can offload certain processes for instantaneous results without waiting for the software loop. Sometimes jitter and latency are not an issue, if they're below a threshold.
> On May 25, 2015, at 11:12 PM, Colin Hinz <lists at meccanion.com> wrote:
>> On Mon, 25 May 2015, Michael E Caloroso wrote:
>>> PICs are more convenient coding wise, but PLDs can have faster
>>> propagation times.
>> PLDs also have very tightly controlled propagation times.
>> A microcontroller that is coded exclusively in assembly language
>> will have very deterministic propagation times.
>> A microcontroller that is coded in a high level language will
>> probably have repeatable propagation times, though YMMV.
>> If your compiler implements your logic using ISRs, and your
>> timing is tighter than metal-gate CMOS, I think you're really
>> taking your chances.
>> I suppose one should take my opinions with a grain of salt, as
>> I'm one of those hardware engineers who trusts HDL compilers
>> more than I trust software compilers…..
> Synth-diy mailing list
> Synth-diy at synth-diy.org
More information about the Synth-diy