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
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.