Mr E, I was wondering about that too but since I'm not at work I can't confirm nor deny the statement. Yours is definitely the safe option.
Mr E, I was wondering about that too but since I'm not at work I can't confirm nor deny the statement. Yours is definitely the safe option.
Thanks Guys, I do have pull down resistors on PORTC and PORTD but overlooked the one for PORTB.2. I did install one and it did fix my problem. However I don't quite understand why this would cause the problem that I had since this switch was used only to tell the program when to write to EEPROM. By the way the Write 0, PORTC does work OK.
Thanks Again for your help
Roy
The input on portb.2 was left floating which means that it's not really ground nor is it vcc. A floating input can change it state be simpling touch it or even something around it. Think of it this way, if the input requires say 0.7V to register as a low and 1.2V to register as a high you now have a 500mV dead zone than can go either way, pull in one way and the problem is resolved because you now know where it will always be without any other for of influence like a switch.
Bookmarks