Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top