FYI: Software I2C gotcha -- at least for the 24F08KL302!
Posted: 22 Oct 2020 00:50
I was trying to get the MikroC Software I2C working on a 24F08KL302 and NO GO. The Start would happen, but the Address wouldn't send! -- scratched my head for hours!! Then I took another look at the Example Code in the Help Document, and re-noticed the line where Analog is config'ed to all Digital. The 24F08KL302 has no Analog ports!!!
But, just out of curiosity, and to heed Arthur Conan Doyle, I checked the P24F08KL302.c DEF file, and son-of-a-gun, ANSELA and ANSELB are defined?!?!
So I added the following to my code, and Yhoo Hoo! Off it went!!!
But, just out of curiosity, and to heed Arthur Conan Doyle, I checked the P24F08KL302.c DEF file, and son-of-a-gun, ANSELA and ANSELB are defined?!?!
So I added the following to my code, and Yhoo Hoo! Off it went!!!
Code: Select all
ANSELA = 0;
ANSELB = 0;