I'd look very carefully at any areas of code that involve bank switching. It seems most likely that you are setting bank 1 then exiting the routine before returning to bank 0. Any write to the port(s) will then actually adress the data direction register and coul easily change an input to an output. Check for branches that could jump over the set bank 0 instruction or "early" subroutine returns. Since interrupts are disabled this simplifies things somewhat - but place an RETI instruction at the interrupt vector anyway - just in case! If you are using the windowed version make sure the window is covered. I've done a fair bit of work with the '73B and not had problems with the chip - just the software! |--------+----------------------------------> | | Gonzalo Jiminez Yamasaki| | | | | | Sent by: pic | | | microcontroller | | | discussion list | | | | | | | | | | | | 01/12/00 06:06 | | | Please respond to pic | | | microcontroller | | | discussion list | | | | |--------+----------------------------------> >-----------------------------------------------------------------------------------------------------------| | | | To: PICLIST@MITVMA.MIT.EDU | | cc: | | Subject: Fw: [PIC]: can't read an input after a while... | >-----------------------------------------------------------------------------------------------------------| Sorry if see this twice but I had some troubles with my e-mail... ----- Original Message ----- From: "Gonzalo Jiminez Yamasaki" To: "pic microcontroller discussion list" Sent: Thursday, November 30, 2000 11:14 AM Subject: [PIC]: can't read an input after a while... | Hi all: | | I'm doing a simple program that acording to some combination of imputs | gives some combination of outputs... I'm using a PIC16C73B and something | really strange happened... two pin ports (RB6 and RB7) works well (as | imputs) but suddenly they don't work anymore (seems like they are not imputs | at that moment) while the rest of imputs works well... I have all | interruptions disable, I also try four diferents PICs and same problem, I | guess is not a code problem because it happens any time, sometimes takes | longer than other to happen but happens... | | It is possible that those pins change their configuration? (because of | noise or something) if some body has some expirience with it and can help me | I'll be very thankful... | | Regards, | | Gonzalo | -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body