Chris is right on the money.
You could simplify this even more with PORTA.0 = PORTB.0 and drop the IF
statement altogether.
Chris is right on the money.
You could simplify this even more with PORTA.0 = PORTB.0 and drop the IF
statement altogether.
Hey guys, thanks for the ideas. Although what Chris said seems to make sense, I was able to run this code on a PIC16F88 with no problems at all. I also wrote a similar program that uses portc.4 as the input and ran it in the dark. Without the light on I could see the LED I had on the output light dimly when I brought the input high and turn off when I disconected the input. I am sure the LED was flickering and that is why it looked dim. I am not sure if this would also work on other I/O lines if I looked at them it the dark. I am now going to try your ideas and see what I get.
Thanks again!!
It worked!! thanks for the idea Chris. I am still not exactly clear on why it didn't work the first time but hey, it works now so no complaints. again thanks for all the help.
Bookmarks