PIC18F26K80 I2C read problem

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

Moderator: Benj

Post Reply
Speed64
Posts: 32
Joined: Sat Jul 16, 2016 12:08 pm
Contact:

PIC18F26K80 I2C read problem

Post 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 110 times
Best Regards
Speed64
Attachments
senden.JPG
senden.JPG (58.91 KiB) Viewed 2509 times
empfangen.JPG
empfangen.JPG (63.75 KiB) Viewed 2509 times

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

Re: PIC18F26K80 I2C read problem

Post by Speed64 »

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

howard123
Posts: 73
Joined: Thu May 24, 2012 1:15 pm
Location: Cape Town
Contact:

Re: PIC18F26K80 I2C read problem

Post 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

George_B
Posts: 88
Joined: Wed Jul 04, 2012 11:21 pm
Contact:

Re: PIC18F26K80 I2C read problem

Post 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

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Contact:

Re: PIC18F26K80 I2C read problem

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

Post Reply