Hi all,
I'm a complete NOOB. I have some programming experience but very little hardware experience.
I have a project that I'm working on and I decided that I would try to implement it with a PIC controller so I purchased the PICKit-1 and started learning.
I plan to use the 16F684 that came with the kit simply because it has enough I/O pins for what I need. I want to use PortA as inputs with interrupt-on-change enabled. Based on what I have learned from the data sheet I have been able to get into my ISR whenever there is a change on one of the input pins. What I haven't been able to discern from the data sheet is how to detect exactly which pin generated the interrupt. My plan is to simply save the port register each time I enter the ISR and compare it to the previously saved setting unless there is a potential problem doing it this way. Or, if there is a better way, I'm certainly open to any suggestions.
Thanks,
Dave
P.S. I am using PICbasic.
I'm a complete NOOB. I have some programming experience but very little hardware experience.
I have a project that I'm working on and I decided that I would try to implement it with a PIC controller so I purchased the PICKit-1 and started learning.
I plan to use the 16F684 that came with the kit simply because it has enough I/O pins for what I need. I want to use PortA as inputs with interrupt-on-change enabled. Based on what I have learned from the data sheet I have been able to get into my ISR whenever there is a change on one of the input pins. What I haven't been able to discern from the data sheet is how to detect exactly which pin generated the interrupt. My plan is to simply save the port register each time I enter the ISR and compare it to the previously saved setting unless there is a potential problem doing it this way. Or, if there is a better way, I'm certainly open to any suggestions.
Thanks,
Dave
P.S. I am using PICbasic.