[Oberon] PO2013 - Real time measurement
Paul Reed
paulreed at paddedcell.com
Mon Mar 25 19:38:47 CET 2019
> I found this programmer on the net, that I wish to give a try.
> Single sided PCB, soldering iron, that seems within reach of my hobby
> capabilities. Later as my knowledge and confidence grows, I may
> try programming through FPGA and PICL directly.
Seems like a lot of work when you have the FPGA solution already in
PICL.Mod. Compare the code to the programming commands in
http://ww1.microchip.com/downloads/en/DeviceDoc/39603c.pdf.
Also, you probably don't want that programmer circuit, I think it's
designed to run off the old +-12V RS232 voltages. Old PIC programmers
like that don't tend to work nowadays, since even if you have a USB to
RS232 converter or an old laptop serial port, it probably won't generate
the full voltage swings. Google further if you don't believe me. :)
If the purpose of the exercise is to learn, I think building an analogue
PIC programmer (with the high voltage programming pin) is a bit of a
side-track.
> What I need to find out yet, how to best match the PIC to FPGA
> frequency. PIC has got its own xtal, and may support also low cost RC
> resonator.
The PIC would run independently of the FPGA on its own oscillator,
communicating by providing data on the SPI port when requested (ie as a
slave). That *is* a good use of interrupts (in the PIC).
> I was also thinking to use PIC as a single loop PID controller,
> Oberon then as a sort of supervision and visual layer for trends and
> some optimisations. Not sure though, we could do PID without FPU math,
> just using integers?
Interesting. Googling, some PIC chips have a PID controller in
hardware, it seems:
http://ww1.microchip.com/downloads/en/AppNotes/90003136A.pdf
That note concludes that using the PIC16F161X's Proportional Integral
Derivative (PID) peripheral takes 9 instruction cycles, whereas a
software implementation would take about 1000. I agree it might be a
stretch to do full PID on an 8-bit PIC in software, but you never know -
maybe fixed point in two bytes. I know people who are a lot more
experienced with PID than me, so I'll stop speculating now. :)
Cheers,
Paul
More information about the Oberon
mailing list