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.

programming question

Status
Not open for further replies.

Muhammad89

New Member
this code is taken from a PIC18C452 stepper motor driving application note, and when i try to run it in mplab, it doesnt seem to work.

I am using a PIC18F452 instead of the PIC18C452..does that affect the codes being used?


in this part of program what does UDATA_ACS actually mean?
my prgramming knowledge is very very limited so I hope there is someone to help

;******************************************************************
UDATA_ACS ;Relocatable variables in access RAM
STEP_NUMBER res 1 ;Used for tracking the microstep counts
MOTOR_DIRECTION res 1 ;Motor direction byte
;0 indicates Reverse rotation
;1 indicates forward
COUNTER res 1 ;Counter used for counting key debounce time
COUNTER1 res 1 ;Counter used for counting key debounce time
SPEED_REF_H res 1 ;Speed referance, read from ADC0, connected
SPEED_REF_L res 1 ;to Preset on the board
FLAG_BYTE res 1 ;Indicates status flags
STEP_JUMP res 1 ;Step jump count based on DIP switch setting
RECIEVED_BYTE res 1 ;Byte recieved from host PC
COMMAND_BYTE res 1 ;Command from host PC
INCH_VALUE res 2 ;Inch count from host PC
RPM_VALUE res 4 ;RPM value
MICRO_STEPS res 1 ;No. of microsteps stored
TEMP_RPM res 3 ;Temparary reg
TEMP_LOCATION res 4 ;Temparary reg
TEMP res 1 ;Temparary variable
TEMP1 res 1
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top