--=-/Unhq1sdvKG5oRg9jw7g Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi Everyone, I'm obviously doing something blatently silly here, but for the life of me I can't figure it out... I've got two 16f628's hooked up as a master/slave with rs485 IC's between them. I'm trying to send one byte from master to slave (expanding to 4 bytes when I can send one successfully). I've done this loads of times before on other projects, so it's quite frustrating that it doesn't work anymore.... I'm receiving on portb,0, using a falling edge to cause an interrupt. The problem seems to be that the slave is interrupting one more time after it's collected the initial byte, but it shouldn't be interrupting as portb,0 is back to it's idle state of high. I've hooked up my dual-channel scope to portb,0 on the slave and an extra debug pin which I'm pulsing everytime it samples the line. The ISR only collects one byte. I've added a few ms of a delay at the end of the ISR before I retfie. The bit-time is 1ms. You can see from the attached trace that the slave is jumping to it's ISR when portb,0 is still high. It's not constantly interrupting, it only does it twice for each byte I try to send. Here's how I've setup ints on the slave: bsf status,rp0 ; Bank1 bcf option_reg,intedg ; Interrupt on falling edge bcf status,rp0 ; Bank0 clrf intcon ; Prep intcon bsf intcon,INTE ; Int on portb,0 bsf intcon,GIE ; Global interupts on ..and the first line of the ISR: bcf intcon,INTF ; Clear the INT flag ..and the last line of the ISR: retfie ; Exit the ISR I'm not using any other ints on the slave. I've tried clearing the intf flag multiple times throughout the ISR, but it's still re-interrupting as soon as it's done it the first time. Am I missing something really obvious, or is there something I'm getting totally wrong? Cheers, Tim --=-/Unhq1sdvKG5oRg9jw7g Content-Disposition: attachment; filename=trace.gif Content-Type: image/gif; name=trace.gif Content-Transfer-Encoding: base64 R0lGODdhugGtAKEAAAAAAAD/AP8AAP///ywAAAAAugGtAAAC/pyPqcvtD6OctNqLs97cAfN14kiW 5omm6sq2Y4iEsEvX9o3n+s57YA8MCofEovECAyhlh+XxCYUsZ4/pxBrBZp0SrZTbpTa8UZGMOTin xeUVue1Rf0FshZI+X2/x+Xu/zgC45gdXgpb2M0hYSPPGmAjp05QVI1VpOYkZOXbZNTYFGio6Slpq eopKmpmUSJj6ChsrO2v6aNcpuRmIu5tZx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uqpBDAoy0wpExapELapA8QpUZ6AxSHpVvKpS0BUqmyI10qpmPaETwCpiig pWSqpmtqAzKYhVQSeln4aGKAhTI4esfIpnmqpzngeT8AeqvwhwYRqDHwh5Jmg39acnuqqIuqAiqH qO3HgIqwgHzgp12YqIyK/qmZagZ4AIGQWqmYMljTdqgRqKmlaqrj4KmdaqmIsAyhGnozeIOnKquz ugVxmnwpJ22kZ4xvaqfFR6u/CqyMN4rBSqzFWgMUl6bGqqzLehFsgqfMCq3RKq3TSq3Vaq3Xiq3Z qq3byq3d6q3fCq7hKq7jSq7laq7niq7pmgyeV6f/pq4bMaeG+qzvKg2+YCLJKq5meq/0KiVDIHGx eqknMWn4qiYot69bSrBFIHo9cGrm4K4usbDxSgQNG68JW6bzGgVjp7Ezwwu86msbC7IhK7KfN7Ij 27Hy+rElq7IrOzS2ELFAMCUNqKbn9rIMW1T9xqU1Cwc6m6WUeggPuxI8GcuzbeqzupqzGGuqHkuK QEuvSuuzFtsSBQAAOw== --=-/Unhq1sdvKG5oRg9jw7g Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --=-/Unhq1sdvKG5oRg9jw7g--