ms744l1.txt ;************************************************************************************************ ; LISTING 1 - SUBROUTINE FOR PSEUDO POLLING CODE ; ; "Interfacing switches and relays to the real world in real time," EDN, June 7, 2001, pg 135 ; ; http://www.ednmag.com/ednmag/reg/2001/060701/13ms744.htm ;************************************************************************************************ Port Polling Subroutine 1 Check_Port: Read Port Data 2 Store Port_Data in Port1 3 Compare Port1 with Port_P, (EX-OR Port1 with Port_P) 4 Test for Bit Changes, (No) Return from Check_Port subroutine, (Yes) continue 5 Add 1 to Count 6 Count = N_Pass_Value, (No) Return from Check_Port subroutine, (Yes) continue 7 Set Count = 0 8 Store Port1 in Port_P 9 {do some thing with the new port data} 10 Return from Check_Port subroutine with new Port_P data for main program