Can anyone clarify what's going on with RB0 INT on an F84 please Whilst writing a zero-crossing detector I measured the voltage threshholds for RB0, to find out when the interrupt would be generated. The results I've got are nothing like the data specs. If someone has documentation to back up what I've found I'd be glad to see it. I'm sure I'm not the first to run into this. If I've got it wrong I'd like to know where The assumption was that with RB0 as a Schmitt Trigger input the voltages would be 0.8V and 0.2V, but my measurements don't support this. The data sheet does say that Vhys is To Be Determined, but aside from that it seems there's a dv/dt limit for RB0, which doesn't sound like a Schmitt Trigger. With a pot in the range 500R to 100k and INTEDG set for falling voltage IRQ, it's quite easy to lower the voltage slowly (0.01V/s) on RB0 without the PIC generating an INT IRQ. If an IRQ is generated it happens at 1.6V. The ISR will be exited if btfss in the ISR is true at 1.5V. With INTEDG=1 (rising voltage IRQ), the IRQ will happen at 3.11V and exit via btfsc at 1.48V. An IRQ is always generated no matter how slowly VRB0 rises. (I've also tried this with RB3, and that will flip at 1.44V whichever way V is going) Sequence is, after Reset (using negative-going IRQ) - - LED2 on, pot at full CW, V on b0 = 5.00V - Turn pot CCW (ie lower voltage) - When VRB0=1.60V LED2 goes off, LED1 comes on. This shows that PC is in the ISR - When VRB0=1.50V LED1 goes off, LED2 comes back on, indicating completion of ISR - Repeat, back to step 1 (no h/w reset necessary) volts equ portb.0 ;pot wiper. Pot has 0V CCW terminal, 5V CW terminal led1 equ portb.1 ;LEDs are transistor-switched via diode/8k2 resistor led2 equ portb.2 org irq goto led movlw 00h ;porta all o/p, nothing connected except a4 10k p-u tris porta clrf porta movlw 01 ;portb all o/p except b0. Pot on b0, LEDs on b1 and b2 tris portb clrf portb movlw 80h ;pull-ups off, falling edge IRQ option bsf inte ;enable INT IRQ bsf gie wait bsf led2 ;LED2 on, wait for INT goto wait nop nop goto wait ;loop after ISR led bcf intf ;ISR entry point bcf led2 ;LED2 off bsf led1 ;LED1 on low btfsc volts ;test RB0 goto low ;loop until voltage drops under hysteresis pot btfss volts ;test RB0 goto pot ;loop until voltage rises above hysteresis bcf led1 ;led1 off retfie ;back to wait -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body