AnsweredAssumed Answered

S08 KBI vs General Purpose IO Port Scan

Question asked by danielhembree on Aug 6, 2013
Latest reply on Aug 8, 2013 by Derrick Klotz

I have a project that has eight push button switches that are connected to and driving the KBI pins for user input. My code utilizes an ISR that responds to interrupts generated by the KBI. The particular device I have selected (MC9S08SE8CWL) has the KBI input pins spread across two ports. Because of this, my inputs and outputs are scattered and mixed across all available ports. If I adopt a general purpose I/O port scan method versus the KBI approach I can clean up some of the scattered architecture. The project has no timing critical tasks - simply writing output ports based on user selections, and periodically performing an A2D conversion on a potentiometer connected to one ATD pin. Is thee additional benefit to using the KBI scheme vs the port scan that I may be unaware of? I'm relatively new to all of this, so any input is welcome!

 

Thanks in advance,

Dan

Outcomes