Searching \ for 'PIC16F876 Who says hardware bug?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=16F
Search entire site for: 'PIC16F876 Who says hardware bug?'.

Truncated match.
PICList Thread
'PIC16F876 Who says hardware bug?'
1999\11\03@201112 by Dennis Plunkett

flavicon
face
At 16:22 3/11/99 -0800, you wrote:
{Quote hidden}

Oh,
Definintily is!
Pulling it out of circuit only exasporates the problem even more.

LOOK--->
The programme that you provided indicted that you where reading the port
pin then modifing it, this will cause unknown state to be read from the
pin. You must include some form of shadow register for the pin, modify this
then write that out.

Try this: -

Loop:   ;entry

       movlw   .1
       xorwf   shadow_register,f               ;not a good idea as it effects a
ll the bits
       btfss   shadow_register,1
       goto    set low

       bsf     PORTB,0
       goto    delay
set_low
       bcf     PORTB,0

delay
       nop
       nop
       nop
       goto    Loop

               end


movf    shadow_register,w



Your stuff

{Quote hidden}

Dunno why this seems to work cosmic radiation or something


>>
>>And for not working :
>>m015    MOVLW .1
>>00F0 1283  0529         BCF   0x03,RP0
>>00F1 1303  0530         BCF   0x03,RP1
>>00F2 0685  0531         XORWF PORTA,1                         This reads PORTA
then XORs that
value. If you take a look at the port structure of the PIC you will see
that reading this point will NOT read what you wrote, but what the pin
sees, note that the driver is disconnected during this phase, hence why you
don't see what you think you see.


>>00F3 0000  0533         NOP
>>00F4 0000  0535         NOP
>>00F5 0000  0537         NOP
>>00F6 0000  0539         NOP
>>00F7 0000  0541         NOP
>>00F8 28EF  0547         GOTO  m015
>>


Dennis

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...