[<<][staapl][>>][..]
Thu Oct 6 16:01:14 EDT 2011

PORTB IOC

A change on RB7-RB4 sets RBIF (= INTCON:0)

To ack we need to read PORTB to end the mismatch condition, and clear
RBIF.

: rbif-ack   PORTB @ drop INTCON RBIF low ;
: rbif       INTCON @ 1 and ;
: rbif-test  rbif-ack rbif ;


Tried this, no success:

\ This doesn't actually wait for a clock pulse, but for a change on
\ *ANY* of RB7-RB4.  This is a hack to work around failure to detect
\ short pulses due to interrupts in the busy loop.  Doesn't seem to work.
: icsp-sync.hack \ .hack
    begin icsp-clock low?  until
    PORTB @ drop INTCON RBIF low \ ack RBIF
    begin INTCON RBIF high? until \ wait for change on RB7-RB4
    ;



[Reply][About]
[<<][staapl][>>][..]