Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC 16F873 Port a And Port B voltage rise / fall

Status
Not open for further replies.

bikerbiker

Newbie level 4
Joined
Jul 28, 2008
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Earth
Activity points
1,344
I am writing a small program to drive LCD where I change the I/O line for Hi/Low digital signal however when I write for a second time to either Port A or Port B the voltage on the output rise and fall instead of being fixed 5V or 0V. This onlt happens after the second MOVWF is issued, if i reprogram with out the second MOVWF then all voltages are OK, Please Help as I am unable to pass a changing parallel data pattern to the LCD module.
ORG 0 ;
PIC16F84
GOTO RESET

; ************************** ;Delay routine.
; * delay routine: *
; **************************
DELAY MOVLW D'250'
MOVWF TIMER1
DELAY2 MOVLW D'250' ;
MOVWF TIMER2
DECFSZ TIMER2,F
GOTO $-1
DECFSZ TIMER1,F
GOTO DELAY2
RETLW 0


; **************************
; * main routine: *
; **************************

RESET

BSF STATUS,RP0
MOVLW B'00000000'
MOVWF TRISA
MOVLW B'00000000'
MOVWF TRISB
BCF STATUS,RP0

CLRF PORTA
CLRF PORTB

CLRWDT

MOVLW B'00001100'
MOVWF PORTA
MOVLW B'00001111'
MOVWF PORTB

CALL DELAY
CALL DELAY
MOVLW B'00001000'
;this command below causes problem
MOVWF PORTA
CALL DELAY


END ;End of so
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top