[Oberon] PO2013 - Real time measurement

Tomas Kral thomas.kral at email.cz
Tue Apr 23 09:50:20 CEST 2019


On Fri, 19 Apr 2019 16:51:25 +0100
Paul Reed <paulreed at paddedcell.com> wrote:

Thank you for taking your interest.

> (In your configuration in the hex you published, I thought you *were* 
> using the external RC.)

Yes, initially, meant for backward compatibility with `p16f84a'. But I
managed to get a couple of `p16f818' for half the price.

I wish to connect a thermo sensor, to one of A/D muxed inputs, and drive
`PWM' out through that `RC' to have defacto analog out. I have also
thought of servos being `PWM' capable, so to get proportional control on
a valve seems now possible, or even a robotic arm?  

My goal is to do a single `PID' control loop, whith a simple `SPI' data
exchange (setting P-I-D, while polling A/D measurements). That may
require an interrupt (possibly another use of SS signal) to step out of
PID loop, do SPI, and return back to the control loop.

> I assume you still have the LEDs on bits 3..0, it looks like that may
> (Curious about the resistor already on RA4, BTW.)

Yes {RB0..RB3}, the resistor is 10K pullup on MCLR to VDD, perhaps not
needed, as I get also some reset delay on power up timer.

But I have seen this resistor in many wiring diagrams, though, possibly
to drive SW reset or in circuit programming?

I have found a PID algo on a Microchip site, doing PID in 78-90us. It
is based on TMR1/IRQ 1ms timing, so perhaps external interrupt on SS
not necessary.

-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list