Question RS232 and I2C component and interrupts

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
PICFriend
Posts: 36
Joined: Sat Nov 13, 2010 6:50 pm
Location: Germany

Question RS232 and I2C component and interrupts

Post by PICFriend »

Hey there,

I got a problem using RS232 and i2C component.

Short explain the situation:
A master/slave combination interchanges 10bytes with eachother.
The attached program is a slave (one of seven) that recieves RS485 Data from a Master (9,N,38400) via RS232 RX Interrupt.
Also in the slave is used a I2C bus component that read the the board temperature LM75.

Now the fault:
I´ve isolated the problem in fcf-file.
When I use the program without the i2c routines, then the slaves works free from error over days. That is detecting by the master, wich proofes the backsending slave adress.
Then I want to use the Flowcode routines “Start I2C “, “Transmit”, ”Read1”, ”Read2”, ”Stop” every second to read the temperature and then sometimes the RXINT seems to be done but there is no or a wrong value in the Rxread-component value what is given back. (This occours various times in a minute).
I checked the hardware
=> RS485 working over day => seems ok
=> I2C Pullups 4K7 an the picture seems ok to and the LM75 is working.

Is there a relationship between the both things. I don´t know how to solve this. I spend days to find out whats going on there. The I2C Signals are 72,57Khz (slowest).


Have you got any ideas?

PIC 16F876/20SP 18,432Mhz

Regards from the sunny :wink: germany

Carsten
Attachments
I2C scope screenshot
I2C scope screenshot
DSCI0073.JPG (48.49 KiB) Viewed 2428 times
Slave 7.fcf
isolated slave project
(33.06 KiB) Downloaded 280 times

Post Reply