tomovill
Junior Member level 3
- Joined
- Oct 21, 2001
- Messages
- 27
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Location
- Hungary
- Activity points
- 98
PIC problem
I programming a PIC16LF877 device. I have wrote an easy subrutin:
PROG
BSF XSET
BSF YSET
BSF ZSET
BSF AUTOLED
L6
BSF ACK ;PROGRAM INDULHAT
CALL WAITMS
BCF ACK
MOVF PORTB,0
MOVWF PORTC ;MÁSOLÁS PORTC -RE, AHOL A MOTOROK VANNAK
CALL WAITMS
BTFSS ALAPH ;HA NEM ALPHELYZETRE
GOTO L6 ;EL?R?L
CALL ALAPHE ;ALAPHELYZETRE ÁLLÍTÁS
RETURN
END ;PROGRAM VÉGE
This subrutin must be copying portb to portc.
Portb comes on a PC LPT. Portc goes to stepper motors driver (MC3479).
Problem:
When PB3 is on high => no problem, everything is good.
When RB3 is on low => everything is good, bot only on RB4 is 1,2V and not copying on RC4
What is the problem?
I programming a PIC16LF877 device. I have wrote an easy subrutin:
PROG
BSF XSET
BSF YSET
BSF ZSET
BSF AUTOLED
L6
BSF ACK ;PROGRAM INDULHAT
CALL WAITMS
BCF ACK
MOVF PORTB,0
MOVWF PORTC ;MÁSOLÁS PORTC -RE, AHOL A MOTOROK VANNAK
CALL WAITMS
BTFSS ALAPH ;HA NEM ALPHELYZETRE
GOTO L6 ;EL?R?L
CALL ALAPHE ;ALAPHELYZETRE ÁLLÍTÁS
RETURN
END ;PROGRAM VÉGE
This subrutin must be copying portb to portc.
Portb comes on a PC LPT. Portc goes to stepper motors driver (MC3479).
Problem:
When PB3 is on high => no problem, everything is good.
When RB3 is on low => everything is good, bot only on RB4 is 1,2V and not copying on RC4
What is the problem?