ICSP considerations

Status
Not open for further replies.
my cheap clone pickit is starting to go, or maybe I have bad circuit too!
I say this because at 5v i get power error too, but when I step it down to 4.75v it works ok!

also is resistor tested on ohmmeter to be 10k?
or maybe switch was installed 90degrees off?
also did you include: trisb=0b11111111? since your switches are now on port b?

..... just throwing these out there as a possibility..
 
I duplicated the suspected B7 port error using a Tap-28. I first assured my circuit was correct by using portB.0 as led and B.1 as my NO mon switch. All ok
I then connected to portB.7 and programmed. All works as Jon noted.
I am wondering, after looking at post#23 if port assignment (output etc) would have anything to do with it??
here is my simple test code
DEVICE = 18F2420
CLOCK = 8

INCLUDE"InternalOscillator.bas"
INCLUDE "SetDigitalIO.bas"


// alias to port pin...
DIM LED1 AS PORTb.0
dim swt as portb.7
DIM x AS BYTE
trisb=$00000000
setalldigital
swt = 1
WHILE true

if swt = 1 then led1 = 0
end if
if swt = 0 then led1 = 1
delayms(2000)
end if
wend
 
trisb = direction: 1=input , 0 = output

when trisb = 0: portb = Vout: 1=5v, 0 = 0v
... I could see short circuit if button is down and trisb=0 and portb=1
... again just shots in the dark
 
The code in the chip doesn't matter. You made a wiring error. It was neither your first nor your last.
 
we all have an error or two
I wanted to make sure what was going on.
I used the posted code and changed the swt to an input. didn't make a difference.
Curious what the actual issue was?? its water under the bridge.
 
Status
Not open for further replies.