Oznog
Active Member
I have done a number of complex PIC projects with the PIC18252/452. I am having trouble with a new project on the PIC18F452 at a very simple level. I code in C, but checked the assembly code too.
I am seeing pin E2 is somehow cleared by a bit clear to E1. I rewrote a very simple piece of code to explore the problem.
03BA bsf PORTE,2
03BC bcf PORTE,1
03BE bsf PORTE,1
03C0 bra 0x3BA
This is causing E2 to clear along with E1 when "bcf PORTE,1" executes. E2 has a square wave with a duty cycle of what looks like 1/4. The board definitely does not connect these pins together, and TRISE=0x00. There is nothing in the interrupt routine which deals with portE, and in any case no interrupts are enabled.
I have tried this with different PIC18F452 chips and the results are the same.
I'm stumped. Any ideas?
I am seeing pin E2 is somehow cleared by a bit clear to E1. I rewrote a very simple piece of code to explore the problem.
03BA bsf PORTE,2
03BC bcf PORTE,1
03BE bsf PORTE,1
03C0 bra 0x3BA
This is causing E2 to clear along with E1 when "bcf PORTE,1" executes. E2 has a square wave with a duty cycle of what looks like 1/4. The board definitely does not connect these pins together, and TRISE=0x00. There is nothing in the interrupt routine which deals with portE, and in any case no interrupts are enabled.
I have tried this with different PIC18F452 chips and the results are the same.
I'm stumped. Any ideas?