Hi everyone, I want to learn how to use POT command so I tried some codes and try also to simulate it on protues.I tried to play around with the variable potentiometer to see if its displays varies, but it jumps from 2-8-15-47-255. How can I make it increment by 1 to have a smooth display to 255? I tried to change the pot resistance between 5-10K but no luck.Code:Include "modedefs.bas" ' Include serial modes TRISB =%00000001 Portb =%00000000 ' Allocate variables x Var Byte CMCON = 7 ' Set PORTA to digital Pause 100 ' Wait for LCD to start mainloop: Pot PORTB.0, 127, x Serout PortB.1,T9600, [$Fe,1] serout PortB.1,T9600,[" Pot ",#x] ' Send value to LCD Pause 100 ' for delays Goto mainloop ' Do it again End
Bookmarks