Hello everyone,
Currently, I'm trying to program PICAXE-28X2 BASE SHIELD to detect an angular position of the motor using an absolute encoder, you can find below my program that I used.
However the terminal displayed [00] time 78 per second, as you can see in the image down below :
I think the problem is in the code that I'm using, so I need help to display the right angular positions in the terminal.
Thank you in advance.
Currently, I'm trying to program PICAXE-28X2 BASE SHIELD to detect an angular position of the motor using an absolute encoder, you can find below my program that I used.
Code:
#picaxe 28X2
#terminal 115200
;symbol Miso = pinC.5; define input switch
symbol Sclk = C.0; define output pin
symbol Mosi = C.1; define output pin
symbol CS = C.4; define output pin
symbol Miso = b1;
main:
high C.0; switch on output SCLK
high C.1; switch on output MOSI
low C.4 ; switch on output CHIP SELECT line low which is the default active state
readadc C.5,b1
sertxd("La position angulaire =",#b1,13,10)
PAUSE 1000
goto main
I think the problem is in the code that I'm using, so I need help to display the right angular positions in the terminal.
Thank you in advance.