Hello @JonnyMac and @evanh , Can you please help me to know how to define propeller 2 any pins as smart pin and how to read the data using smart pins. I need one simple example to know this mechanism.
Looking at Eric's manual on Flex Basic I see PINSTART for configuring a smartpin and RDPIN for reading a smartpin's Z register. And of course there is also WRPIN/WXPIN/WYPIN for component writing to a smartpin.
The mechanism is the same as with Spin or C. Eg: (My Basic is rusty so excuse any syntax errors)
pinstart 25, P_QUADRATURE | P_PLUS1_B, 0, 0 'Encoder inputs on P25 and P26
print "counter = ";_rdpin(25);" ";chr$(13) 'display the encoder count