Hi,
I get a very strange problem... using 16F628
I'm using RB0 and RB1 for serial ps/2 interfacing (clk and data lines).
It works great but when the program reaches some place RB0 and RB1 refuse to go low. I mean, if I clear its bit in portb register, the line never goes low again... This, of course, makes the whole circuit stop working.
After hours, I found that this begins to happend after executing this instruction:
bcf portb, 2h
I really don't undertand. If I erase this instruction, it works again...
portb is set all outputs except RB0 and RB1 which are toggle from input to output to get 5V from pull up resistor or ground.
I set comparator off, writting 0x7 to CMCON..
Any advice?? I really don't understand!
Thank you!
I get a very strange problem... using 16F628
I'm using RB0 and RB1 for serial ps/2 interfacing (clk and data lines).
It works great but when the program reaches some place RB0 and RB1 refuse to go low. I mean, if I clear its bit in portb register, the line never goes low again... This, of course, makes the whole circuit stop working.
After hours, I found that this begins to happend after executing this instruction:
bcf portb, 2h
I really don't undertand. If I erase this instruction, it works again...
portb is set all outputs except RB0 and RB1 which are toggle from input to output to get 5V from pull up resistor or ground.
I set comparator off, writting 0x7 to CMCON..
Any advice?? I really don't understand!
Thank you!