Shop OBEX P1 Docs P2 Docs Learn Events
Al Williams: since elektroda is down... — Parallax Forums

Al Williams: since elektroda is down...

ArchiverArchiver Posts: 46,084
edited 2002-05-27 16:16 in General Discussion
Hi Al,
I'm having some problems with a 16F84A @20Mhz XTAL. I
suspect it's a RMW problem, however I can't 'see' the
solution. I have a pullup with a switch to Gnd on RA2.
I want to sink PORTB when the switch is thrown. On pin
RA2 i can see that i have 5v/0v when the switch is
thrown, however the program just sits in the 'loop'. I
have tried shadowed input, but that didnt help. I hit
a wall...maybe you can help
CLRF STATUS
CLRF PORTB
CLRF PORTA
BSF STATUS, RP0
MOVLW 0xFF
MOVWF TRISB
MOVLW 0x02
MOVWF TRISA
BCF STATUS, RP0
loop
BTFSC PORTA, 2
GOTO loop

loop2
MOVLW 0xFF
MOVWF PORTB
GOTO loop2

Thanks, Radu

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-05-27 16:07
    sorry LOOP2 should be
    > loop2
    > MOVLW 0x00
    > MOVWF PORTB
    > GOTO loop2
    >


    __________________________________________________
    Do You Yahoo!?
    Yahoo! - Official partner of 2002 FIFA World Cup
    http://fifaworldcup.yahoo.com
  • ArchiverArchiver Posts: 46,084
    edited 2002-05-27 16:16
    Is the 16F84A a new Stamp I'm not aware of? From your description it sounds
    like a PEBKAC error.

    ***********


    > I'm having some problems with a 16F84A @20Mhz XTAL.
Sign In or Register to comment.