News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

how to scan an I2C ?

Started by Yves, Oct 02, 2023, 08:11 AM

Previous topic - Next topic

Yves

Hello all,

I like to scan an a known chip which as a initial address of %1101 (MCP3421 a/d) but the chip address is not readable. The address is 3 bit from %000 to %111. The whole call will like this: %1101 XXXX 0. the last bit 0 is r/w bit. Is anyone have a simple routine that scan the address and watching the ack bit until it is shows a zero which means the address is found.

Cheers,

Yves
Yves