How to wait on a pin state?
 Dave Hein            
            
                Posts: 6,347
Dave Hein            
            
                Posts: 6,347            
            
            
                            
                                  in Propeller 2             
        
                    I was updating my P1Spin bytecode interpreter this morning, and I'm trying to figure out how to handle the WAITPEQ and WAITPNE bytecodes.  When I did this a few years ago I use SETPAE, SETPBA, SETPAN or SETPBN followed by a WAITPAT.  However, those SETXXX instructions no longer exists.  It seems now I must do a MODCZ, DECOD, SETPAT and then WAITPAT.  Is that the way best way to wait on a pin where the pin number is specified in a register, or is there an easier way to do it that requires fewer instructions?                
                            
 
                            
Comments