Been a little while since I've annoyed the community with my petty problems, so here I go again (grin).
Did a program a few weeks back that used 2 SPI busses on a PIC18F45K22 (and the uart2 which worked just fine). I didn't have any luck getting any action out of MSSP2, so (since I was in a hurry) I just knocked out a quick bit-banger to read what I needed out of the other chip. Now I've got another board with the same processor pushing SPI speed to the hardware limit and an I2c bus wired to MSSP2. Since Mike's I2c-base words have worked so well for me before, I changed the pin assignments to PortD, the interrupt lookup to PIR3, and switched all of the register references to ssp2xxxx (and got the addressing right as far as my one good eye can see). All I get from any call is a timeout-reset whrn the watchdog runs out and no pin changes state, the 10K pullups just sit there high.
It's really no big deal to whack out a bit-bang I2c but I'm getting really curious what I'm missing in the chip docs... The hardware SHOULD work. The only thing that I've noticed that I can imagine might be causing id the config-bit redirection of the CCP2 pins, but the more I blear at that, the less likely it seems.
If anyone else has had problems with this or gotten it working, I could use the encouragement.
Oh and if anyone's got a workaround to run the SPI CLK at 8 Mhz without slowing the Pic18 to 32Mhz (or get around the 30ns rise-time on the pin to use 16Mhz) I'ld love to hear about it.
Thanks for your attention,
craig bair
|