PIC18F26K80 I2C read problem

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Speed64
Posts: 29
Joined: Sat Jul 16, 2016 12:08 pm
Contact:

PIC18F26K80 I2C read problem

Postby Speed64 » Fri Apr 20, 2018 4:43 pm

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 45 times


Best Regards
Speed64
Attachments
senden.JPG
senden.JPG (58.91 KiB) Viewed 1068 times
empfangen.JPG
empfangen.JPG (63.76 KiB) Viewed 1068 times

Speed64
Posts: 29
Joined: Sat Jul 16, 2016 12:08 pm
Contact:

Re: PIC18F26K80 I2C read problem

Postby Speed64 » Sun Apr 22, 2018 12:50 pm

:oops: :oops: :oops: Variable entered in the wrong place sorry

howard123
Posts: 66
Joined: Thu May 24, 2012 1:15 pm
Location: Cape Town
Has thanked: 25 times
Been thanked: 27 times
Contact:

Re: PIC18F26K80 I2C read problem

Postby howard123 » Wed Apr 25, 2018 4:42 pm

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

George_B
Posts: 88
Joined: Wed Jul 04, 2012 11:21 pm
Has thanked: 37 times
Been thanked: 12 times
Contact:

Re: PIC18F26K80 I2C read problem

Postby George_B » Fri May 25, 2018 9:23 am

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

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 514 times
Been thanked: 467 times
Contact:

Re: PIC18F26K80 I2C read problem

Postby dazz » Fri May 25, 2018 4:05 pm

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
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php