[sdiy] Digital topics like PLDs?
rsdio at audiobanshee.com
rsdio at audiobanshee.com
Tue May 26 09:54:01 CEST 2015
So far, I've found that discrete logic gates are cheaper than the cheapest CPLD, but I guess I've been lucky. There are certainly designs that require more logic than will fit on a board, which becomes expensive in multiple dimensions.
I would like to find a way to program those older technologies, if for no other reason than to repair old synths. Speaking of PICs, they might do well at programming the PLD, if you can find a data sheet on the PLD that explains the timing and voltages needed. I've certainly built a couple of EEPROM programmers in my poor high school student days, so it seems reasonable to build your own PLD programmer.
If you pick a part, GB, let us know.
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.
Brian
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.
>>
>> MC
>
> 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…..
More information about the Synth-diy
mailing list