12f629 Code Ref for Stepper Function.

Status
Not open for further replies.

cybersky

Member
Hi

I am building a stepper motor controller and would like to use the oshonsoft stepper funtion. However I cannot find an example of how to ref the "port" as the 12f629 only has GPx.

Code:
Define STEP_A_REG = GP5
Define STEP_A_BIT = 5
Define STEP_B_REG = GP4
Define STEP_B_BIT = 4
Define STEP_C_REG = GP0
Define STEP_C_BIT = 0
Define STEP_D_REG = GP1
Define STEP_D_BIT = 1

GP2 & GP3 will be Step & Dir

Perhaps a general tutorial on how to "substitute" Portx for GPx ?

Thanks
 
Code:
Define STEP_A_REG = GPIO
Define STEP_A_BIT = 5
Define STEP_B_REG = GPIO
Define STEP_B_BIT = 4
Define STEP_C_REG = GPIO
Define STEP_C_BIT = 1
Define STEP_D_REG = GPIO
Define STEP_D_BIT = 2
Define STEP_MODE = 2

GPIO is use for port access
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…