Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

what am i doing wrong?

Status
Not open for further replies.
OOps forgot to attach code

Code:
shutdown
        clrw
        call delay3                ;0.002 ms delay
        btfsc GPIO,2               ;test if GP2 is cleared(switch pressed)
        clrf GP2
        call delay3                ;0.002 ms delay
        clrw
        btfss GPIO,2               ;test if GP2 is set(switch pressed)
        goto shutdown
        goto start
 
to simplify things can you post a schematic?
You said "There is no residual power on GP2, as there is a10k resistor to GND."

try the 10k to vdd and when switch is pressed it ties to ground.

if you dont want to change circuit try "btfsc"
 

Attachments

  • gp2.jpg
    gp2.jpg
    35.8 KB · Views: 118
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top