Re: PICs as replacements for L297s
Posted by
Kerry
on 2001-04-22 09:29:05 UTC
--- In CAD_CAM_EDM_DRO@e..., "Tom Eldredge" <harmonyt@r...> wrote:
I use the tasm compiler and the send program to program the chips. if
you whant them let me know.
#DEFINE PAGE0 bcf STATUS,5
#DEFINE PAGE1 bsf STATUS,5
STATUS: .EQU $03
TRISB: .EQU $06
PORTB: .EQU $06
PORTA: .EQU $05
COUNT: .EQU $0C
COUNTH: .EQU $0D
COUNTA: .EQU $0E
SWITCH: .EQU $0F
.ORG 4
.ORG 5
clrf PORTB
PAGE1
clrf TRISB
PAGE0
BEGIN: clrf COUNT
clrf COUNTH
clrf COUNTA
clrf SWITCH
bsf COUNT, 1
bsf COUNTH, 0
bsf COUNTA, 0
TESTIT: btfsc PORTA, 4
GOTO TSTPRV
bcf SWITCH, 0
GOTO TESTIT
TSTPRV: btfsc SWITCH, 0
GOTO TESTIT
btfss PORTA, 3
GOTO HALFST
btfsc PORTA, 2
GOTO ANTI
btfsc COUNT, 1
GOTO P2
btfsc COUNT, 2
GOTO P3
btfsc COUNT, 3
GOTO P4
btfsc COUNT, 4
GOTO P1
ANTI: btfsc COUNT, 1
GOTO P4
btfsc COUNT, 2
GOTO P1
btfsc COUNT, 3
GOTO P2
btfsc COUNT, 4
GOTO P3
GOTO TESTIT
P1: MOVLW %11111010
MOVWF PORTB
bsf SWITCH, 0
bsf COUNT, 1
bcf COUNT, 2
GOTO TESTIT
P2: MOVLW %11110110
MOVWF PORTB
bsf SWITCH, 0
bsf COUNT, 2
bcf COUNT, 1
bcf COUNT, 3
GOTO TESTIT
P3: MOVLW %11110101
MOVWF PORTB
bsf SWITCH, 0
bsf COUNT, 3
bcf COUNT, 2
bcf COUNT, 4
GOTO TESTIT
P4: MOVLW %11111001
MOVWF PORTB
bsf SWITCH, 0
bsf COUNT, 4
bcf COUNT, 3
bcf COUNT, 1
GOTO TESTIT
HALFST btfsc PORTA,2
GOTO ANTIH
btfsc COUNTH, 0
GOTO PH2
btfsc COUNTH, 1
GOTO PH3
btfsc COUNTH, 2
GOTO PH4
btfsc COUNTH, 3
GOTO PH5
btfsc COUNTH, 4
GOTO PH6
btfsc COUNTH, 5
GOTO PH7
btfsc COUNTH, 6
GOTO PH8
btfsc COUNTH, 7
GOTO PH1
ANTIH btfsc COUNTH, 0
GOTO PH8
btfsc COUNTH, 1
GOTO PH1
btfsc COUNTH, 2
GOTO PH2
btfsc COUNTH, 3
GOTO PH3
btfsc COUNTH, 4
GOTO PH4
btfsc COUNTH, 5
GOTO PH5
btfsc COUNTH, 6
GOTO PH6
btfsc COUNTH, 7
GOTO PH7
PH1 MOVLW %00001010
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 0
bcf COUNTH, 7
bcf COUNTH, 1
GOTO TESTIT
PH2 MOVLW %00000010
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 1
bcf COUNTH, 0
bcf COUNTH, 2
GOTO TESTIT
PH3 MOVLW %00000110
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 2
bcf COUNTH, 1
bcf COUNTH, 3
GOTO TESTIT
PH4 MOVLW %00000100
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 3
bcf COUNTH, 2
bcf COUNTH, 4
GOTO TESTIT
PH5 MOVLW %00000101
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 4
bcf COUNTH, 3
bcf COUNTH, 5
GOTO TESTIT
PH6 MOVLW %00000001
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 5
bcf COUNTH, 4
bcf COUNTH, 6
GOTO TESTIT
PH7 MOVLW %00001001
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 6
bcf COUNTH, 5
bcf COUNTH, 7
GOTO TESTIT
PH8 MOVLW %00001000
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 7
bcf COUNTH, 6
bcf COUNTH, 0
GOTO TESTIT
.END ;final statement
> Kerry,this is the code for the pic16f84 full/half step controler
>
> Where and how can we get your code?
>
> Tom Eldredge
> ----- Original Message -----
> From: Kerry <kez@w...>
> To: <CAD_CAM_EDM_DRO@y...>
> Sent: Saturday, April 21, 2001 7:07 PM
> Subject: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
>
I use the tasm compiler and the send program to program the chips. if
you whant them let me know.
#DEFINE PAGE0 bcf STATUS,5
#DEFINE PAGE1 bsf STATUS,5
STATUS: .EQU $03
TRISB: .EQU $06
PORTB: .EQU $06
PORTA: .EQU $05
COUNT: .EQU $0C
COUNTH: .EQU $0D
COUNTA: .EQU $0E
SWITCH: .EQU $0F
.ORG 4
.ORG 5
clrf PORTB
PAGE1
clrf TRISB
PAGE0
BEGIN: clrf COUNT
clrf COUNTH
clrf COUNTA
clrf SWITCH
bsf COUNT, 1
bsf COUNTH, 0
bsf COUNTA, 0
TESTIT: btfsc PORTA, 4
GOTO TSTPRV
bcf SWITCH, 0
GOTO TESTIT
TSTPRV: btfsc SWITCH, 0
GOTO TESTIT
btfss PORTA, 3
GOTO HALFST
btfsc PORTA, 2
GOTO ANTI
btfsc COUNT, 1
GOTO P2
btfsc COUNT, 2
GOTO P3
btfsc COUNT, 3
GOTO P4
btfsc COUNT, 4
GOTO P1
ANTI: btfsc COUNT, 1
GOTO P4
btfsc COUNT, 2
GOTO P1
btfsc COUNT, 3
GOTO P2
btfsc COUNT, 4
GOTO P3
GOTO TESTIT
P1: MOVLW %11111010
MOVWF PORTB
bsf SWITCH, 0
bsf COUNT, 1
bcf COUNT, 2
GOTO TESTIT
P2: MOVLW %11110110
MOVWF PORTB
bsf SWITCH, 0
bsf COUNT, 2
bcf COUNT, 1
bcf COUNT, 3
GOTO TESTIT
P3: MOVLW %11110101
MOVWF PORTB
bsf SWITCH, 0
bsf COUNT, 3
bcf COUNT, 2
bcf COUNT, 4
GOTO TESTIT
P4: MOVLW %11111001
MOVWF PORTB
bsf SWITCH, 0
bsf COUNT, 4
bcf COUNT, 3
bcf COUNT, 1
GOTO TESTIT
HALFST btfsc PORTA,2
GOTO ANTIH
btfsc COUNTH, 0
GOTO PH2
btfsc COUNTH, 1
GOTO PH3
btfsc COUNTH, 2
GOTO PH4
btfsc COUNTH, 3
GOTO PH5
btfsc COUNTH, 4
GOTO PH6
btfsc COUNTH, 5
GOTO PH7
btfsc COUNTH, 6
GOTO PH8
btfsc COUNTH, 7
GOTO PH1
ANTIH btfsc COUNTH, 0
GOTO PH8
btfsc COUNTH, 1
GOTO PH1
btfsc COUNTH, 2
GOTO PH2
btfsc COUNTH, 3
GOTO PH3
btfsc COUNTH, 4
GOTO PH4
btfsc COUNTH, 5
GOTO PH5
btfsc COUNTH, 6
GOTO PH6
btfsc COUNTH, 7
GOTO PH7
PH1 MOVLW %00001010
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 0
bcf COUNTH, 7
bcf COUNTH, 1
GOTO TESTIT
PH2 MOVLW %00000010
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 1
bcf COUNTH, 0
bcf COUNTH, 2
GOTO TESTIT
PH3 MOVLW %00000110
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 2
bcf COUNTH, 1
bcf COUNTH, 3
GOTO TESTIT
PH4 MOVLW %00000100
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 3
bcf COUNTH, 2
bcf COUNTH, 4
GOTO TESTIT
PH5 MOVLW %00000101
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 4
bcf COUNTH, 3
bcf COUNTH, 5
GOTO TESTIT
PH6 MOVLW %00000001
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 5
bcf COUNTH, 4
bcf COUNTH, 6
GOTO TESTIT
PH7 MOVLW %00001001
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 6
bcf COUNTH, 5
bcf COUNTH, 7
GOTO TESTIT
PH8 MOVLW %00001000
MOVWF PORTB
bsf SWITCH, 0
bsf COUNTH, 7
bcf COUNTH, 6
bcf COUNTH, 0
GOTO TESTIT
.END ;final statement
Discussion Thread
beer@s...
2001-04-20 12:01:01 UTC
Re: PICs as replacements for L297s
Alan Marconett KM6VV
2001-04-20 17:16:33 UTC
Re: PICs as replacements for L297s
Larry Edington
2001-04-20 18:09:14 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Larry Edington
2001-04-20 18:29:06 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Ian Wright
2001-04-21 01:11:50 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
paul@a...
2001-04-21 07:23:34 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Larry Edington
2001-04-21 11:05:43 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Kerry
2001-04-21 17:07:33 UTC
Re: PICs as replacements for L297s
Larry Edington
2001-04-21 17:39:19 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
ballendo@y...
2001-04-21 23:19:09 UTC
Re: PICs as replacements for L297s
paul@r...
2001-04-22 03:04:43 UTC
Re: PICs as replacements for L297s
Ian Wright
2001-04-22 04:04:35 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Carol & Jerry Jankura
2001-04-22 05:16:58 UTC
RE: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Flosi Gudmundsson
2001-04-22 06:36:12 UTC
Re: PICs as replacements for L297s
Tom Eldredge
2001-04-22 08:58:45 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Tom Eldredge
2001-04-22 08:58:46 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Kerry
2001-04-22 09:29:05 UTC
Re: PICs as replacements for L297s
Tim Goldstein
2001-04-22 09:35:07 UTC
RE: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Kerry
2001-04-22 10:08:04 UTC
Re: PICs as replacements for L297s
Tim Goldstein
2001-04-22 10:46:10 UTC
RE: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Kerry
2001-04-22 11:36:23 UTC
Re: PICs as replacements for L297s
Smoke
2001-04-22 18:56:07 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Alan Marconett KM6VV
2001-04-22 21:03:39 UTC
Re: PICs as replacements for L297s
Larry Edington
2001-04-22 22:01:57 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Larry Edington
2001-04-22 22:03:06 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Larry Edington
2001-04-22 22:31:40 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Larry Edington
2001-04-22 22:40:14 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Alan Marconett KM6VV
2001-04-22 22:51:21 UTC
Re: PICs as replacements for L297s
paul@r...
2001-04-23 03:12:55 UTC
Re: PICs as replacements for L297s
Tom Eldredge
2001-04-23 18:46:18 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
chapmani@m...
2001-05-08 04:36:12 UTC
PICs as replacements for L297s
Dan Mauch
2001-05-08 08:36:20 UTC
Re: [CAD_CAM_EDM_DRO] PICs as replacements for L297s
Larry Edington
2001-05-08 09:14:35 UTC
Re: [CAD_CAM_EDM_DRO] PICs as replacements for L297s
Tony Jeffree
2001-05-08 12:19:43 UTC
Re: PICs as replacements for L297s
Eric Keller
2001-05-08 13:10:20 UTC
RE: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Carol & Jerry Jankura
2001-05-08 17:45:10 UTC
RE: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s
Larry Edington
2001-05-08 18:17:30 UTC
Re: [CAD_CAM_EDM_DRO] Re: PICs as replacements for L297s