Re: PIC16F88, PORTA strange behaviour

From: Frank Bemelman (f.bemelmanx_at_xs4all.invalid.nl)
Date: 12/02/04


Date: Thu, 2 Dec 2004 14:27:38 +0100


"Frank Bemelman" <f.bemelmanx@xs4all.invalid.nl> schreef in bericht
news:41af158c$0$566$e4fe514c@news.xs4all.nl...
> Strange problem:
>
> Setting an output low on PORTA, causes another output
> on PORTA to go low too.
>
> Below is the entire program. It should generate two signals:
>
> ---, ,---, ,---, ,---, ,---
> '---' '---' '---' '---'
> -, ,---, ,---, ,---, ,---
> '- -' '---' '---' '---'
>
> But instead gives this:
>
> -, ,-, ,-, ,-, ,-
> '-----' '-----' '-----' '-----'
> -, ,---, ,---, ,---, ,---
> '- -' '---' '---' '---'
>
> If I generate the second signal on an output of PORTB,
> it all works okay.
>
> L0000: MOVLW 00
> L0001: MOVWF 0A
> L0002: GOTO 004
> L0003: NOP
> L0004: CLRF 04
> L0005: MOVLW 1F
> L0006: ANDWF 03,F
> L0007: BSF 03,5
> L0008: BCF 1F,4
> L0009: BCF 1F,5
> L000A: MOVF 1B,W
> L000B: ANDLW 80
> L000C: IORLW 0F
> L000D: MOVWF 1B
> L000E: MOVLW 07
> L000F: BCF 03,5
> L0010: MOVWF 1F
> L0011: MOVLW 00
> L0012: TRIS 5
> L0013: NOP
> L0014: NOP
> L0015: NOP
> L0016: BSF 05,2
> L0017: NOP
> L0018: NOP
> L0019: NOP
> L001A: BCF 05,3
> L001B: NOP
> L001C: NOP
> L001D: NOP
> L001E: BCF 05,2
> L001F: NOP
> L0020: NOP
> L0021: NOP
> L0022: BSF 05,3
> L0023: GOTO 013
> END
>
> Any suggestions?

And also, when I change everything to use outputs
on PORTB, everything also works as expected. Is there
something seriously wrong with PIC16F88 ?

-- 
Thanks, Frank.
(remove 'x' and 'invalid' when replying by email)