PDA

View Full Version : detect1 to 0 change on RA0



med2007
- 15th January 2008, 15:26
Why does this fall through?

loop:
IF porta.0 = 1 then loop

next lot of basic code follows here

RA0 is tied up via 10K and a press button grounds it, to get out of the loop, but...it fall thro anyway
Rgds
Mike URGENT for my sanity

skimask
- 15th January 2008, 18:55
Why does this fall through?
loop:
IF porta.0 = 1 then loop
next lot of basic code follows here
RA0 is tied up via 10K and a press button grounds it, to get out of the loop, but...it fall thro anyway
Rgds
Mike URGENT for my sanity

Think analog...
Think datasheets...
Think about telling which PIC you're using...
Just a few things to think about...

Ioannis
- 16th January 2008, 08:40
And also your configurations, DEFINES, schematic, etc.

Why don't you post your code? If you seek help from experts, then do not worry about stealing you code... They sure know and do better!

With no infos, only guesses can be made. And I am not good at. If I was I would have won the Lotto or Casino or something anyway...

Ioannis

med2007
- 16th January 2008, 08:55
Thanks guys, the answer is to configure porta for digital I/O, which I hadn't done.
CMCON = %00000111 using 16F628
Rgds