PDA

View Full Version : Problem with INTB0 and HPWM



TurboLS
- 3rd March 2005, 01:23
I have the HPWM working at 3.6kHz and I want to use that signal to set the interrupt flag on the rising edge. The signal coming out of the HPWM is fine when I do not have it wired to PORTB.0. Are my registers set correctly to make PORTB.0 an input and the others an output??

TRISB = %00000001 ' Set PORTB to all output, except for bit 0

That's the only thing I can think of that would be messing up the signal when I connect the two pins (CCP1, pin 17 and INTB0, pin 40). Any suggestions?

mister_e
- 3rd March 2005, 04:43
That's the only thing I can think of that would be messing up the signal when I connect the two pins (CCP1, pin 17 and INTB0, pin 40). Any suggestions?

RB0/INT0 is PIN 33.... PIN40 is RB7 wich you set as output, this short your signal to ground.

TurboLS
- 3rd March 2005, 14:06
wow, i don't know what to say. I feel like an idiot... b/c in a way, i am an idiot for doing something like that. I could have sworn I got the diagram right but I guess not. If that was my problem the whole time, then let me switch it (to pin 33) and see if it works.

mister_e
- 3rd March 2005, 16:15
those things happens. With eyes open it can help to read datasheet LOL!