Gotta get that indent (space or tab) before, PS that version of the 16F877A was completly wrong, don't know how it slipped past me.
Although "org 0" works but it lazy coding(zero is zero in any base), org 0x000 is surefire (hex 000). if you want to use base 10 then put a decimal in front like this .0
Code:
;*** WDT reset toggles RB0
list p=16F877A
include <p16F877A.inc>
__CONFIG 0x3F7D
org 0
bsf STATUS, RP0
movlw b'00001110'
movwf OPTION_REG
movlw b'11111110'
movwf TRISB
bcf STATUS, RP0
movlw 1
xorwf PORTB, f
sleep
end
when i put the scope on the MCLR pin of my target , and press connect , it switches back and forth , a bunch if times , BUT it ends up at 0V , allways...
i have it set to power the target from the ICD2
shouldnt it end up at Plus 12V or so..? , after a reset ( i mean connect)
the cable is about 7 inches long
it is the one that came with the kit , minus about three inches , 1.5" off either end.
what should the output look like? after a sucessfull build and program?
thanks for your help
mine connects fine
it reads fine
it blank checks fine
it doesn't erase.
another funny thing If I recall correctly
the 16F877A has a built in block erase command, which means you just give it the command to block erase , and the whole erase is automatic, timing is internal..
Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to MPLAB ICD 2
Target Device PIC16F877A found, revision = b4
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready
Downloading Operating System
ICD0152: Failed to read all of requested bytes (0x0 of 0x8)
...Download Operating System Failed
ICD0152: Failed to read all of requested bytes (0x0 of 0x2)
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
ICD0082: Failed MPLAB ICD 2 operation
MPLAB ICD 2 Ready
question ? i have had the option to automatically download the os selected all along..but when i manually try to D/L it i get the above error.
i'm thinking the os goes into the target?
all transistors are the right way round.
i have scoped RC3, RC4 , & RC5 ,on the inchworm 16F877 and nothing is comming from them, maybe it never gets to that point , i just dont know.