Page 1 of 1

PIC18F26K80 I2C read problem

Posted: Fri Apr 20, 2018 4:43 pm
by Speed64
Hi,

I'm trying to communicate with the MCP3421 from Microchip with the I2C bus. I can successfully write to the ADC but can't receive the answer. Attached is the programmcode and two screenshots. 1. screenshot shows the data I'm writing to the ADC and on the second screenshot is the anwser of the ADC.
every 3 data1 to data3 are 0. How do I read this answer correctly?
,

I2C.fcfx
(13.37 KiB) Downloaded 75 times


Best Regards
Speed64

Re: PIC18F26K80 I2C read problem

Posted: Sun Apr 22, 2018 12:50 pm
by Speed64
:oops: :oops: :oops: Variable entered in the wrong place sorry

Re: PIC18F26K80 I2C read problem

Posted: Wed Apr 25, 2018 4:42 pm
by howard123
Hi
I believe you have to have a delay between writing to the ADC and reading from it.
Not positive on that exact chip, but the delay will be related to the resolution you require.

Howard

Re: PIC18F26K80 I2C read problem

Posted: Fri May 25, 2018 9:23 am
by George_B
Hello, i want to use the MCP3421 Analog to Digital converter chip. Could you please let me know if you have any flowcode example for this specific chip?

Thank in advance
George

Re: PIC18F26K80 I2C read problem

Posted: Fri May 25, 2018 4:05 pm
by dazz
Hi George
if you download the flowcode file in this thread you should get the answer ,as that flowchart is for the same chip

Regards
Dazz