Found a couple of more registers to control irq's. I can now select
the inputs for rising or falling edges. I can also clear extraneous
inputs for an active high signal. For some reason they only occur if
the input is normally low.
Anyway, to detect triggers via interrupts, just make sure that
external access is available for p6 - p8. I would select p8 to make
it compatible with the aux i/o on the PSIM.
Dave
--- In ComputerVoltageSources@yahoogroups.com, "djbrow54" <davebr@...>
wrote:
the inputs for rising or falling edges. I can also clear extraneous
inputs for an active high signal. For some reason they only occur if
the input is normally low.
Anyway, to detect triggers via interrupts, just make sure that
external access is available for p6 - p8. I would select p8 to make
it compatible with the aux i/o on the PSIM.
Dave
--- In ComputerVoltageSources@yahoogroups.com, "djbrow54" <davebr@...>
wrote:
>program
> Trigger success!
>
> It turns out I read the AtomPro24 datasheet incorrectly the first
> time. IRQ1 is on P8 which is the AUX input/output. You have to
> the PMR1 register (took a while to figure that out) to select thisnow
> input as an interrupt. The interrupt detects negative edges. I can
> generate an interrupt on a trigger edge. Great!eliminates
>
> It seems to work reasonably well with a positive trigger. It just
> detects the trailing edge. However, you get one extraneous interrupt
> when you enable IRQ1 since the level is low.
>
> Inverting the signal for a negative trigger works well and
> the extraneous interrupt when you enable IRQ1.see
>
> Just make sure that P8 is used as a digital input. The only way I
> to eliminate the extra interrupt for a positive trigger would be totest
> invert it on the PCB or via an external module as I have done to
> this. I'll keep playing with it as I have time to see if I canfigure
> out a way in software to reset this first interrupt. Off to read theright
> hardware manual.
>
> Dave
>
>
> --- In ComputerVoltageSources@yahoogroups.com, "drmabuce" <drmabuce@
> ..> wrote:
> >
> > yeh...
> > what Harry said!
> > I've been thinking about this too and i endorse Harry's position.
> > In the wild, there's just no 'right' way position every kind of
> > pulse... and satisfy every kind of application.
> >
> > Passive RC,
> > Active one shot (ala 555),
> > or software,
> > are all 'best' for different circumstances and making a choice now
> > (kinda) limits the flexibility.
> > of course...
> > (you can always dremel off the offending components) & solder
> > on to the exposed traces)
> > (but i don't wanna gross anybody out)
> > ;'>
> > -doc
>
