ECIO40P16 and AT24C32 eeprom

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

kennethnilsen69
Posts: 84
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

ECIO40P16 and AT24C32 eeprom

Postby kennethnilsen69 » Fri Aug 31, 2018 10:32 am

I can not make it read or write to external eeprom.

Slight strange behavior on the ReMap selections in flowcode 7.3.0.5.
When I put SDL and SCL Remap Pin, it does not change SDA and SCL. I have to put SDA and SCL to the correct Pin myself. but it does not work anyway

This is not the case with other components


Any suggestions?

ECIO40P16_CAN_BT_And_eeprom_Test.fcfx
(30.41 KiB) Downloaded 46 times

User avatar
LeighM
Matrix Staff
Posts: 1919
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 461 times
Been thanked: 649 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby LeighM » Fri Aug 31, 2018 10:51 am

Hi,
As I recall the ECIO40P16 does not expose any of the I2C hardware pins to the external connector.
You will need to use the I2C component in Software mode and select a pair of pins that are available on the connectors
Hope that helps
Leigh

kennethnilsen69
Posts: 84
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kennethnilsen69 » Fri Aug 31, 2018 11:12 am

I have now updated the eeprom components with them from this post but it still does not work
https://www.matrixtsl.com/mmforums/viewtopic.php?f=64&t=19707&p=86063&hilit=I2C+Spy#p86063

Remap is now gone and SDA and SCL can now be selected correctly
Software mode is on but it still does not work.

in the connectors I can choose all the ports that are on the chip. is that correct? can all be used to I2C in software mode?

ECIO40P16_CAN_BT_And_eeprom_Test.fcfx
(30.41 KiB) Downloaded 44 times

kennethnilsen69
Posts: 84
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kennethnilsen69 » Fri Aug 31, 2018 11:37 am

According to the chip pinout on the dsPIC33EP256MU806 chip, PIN 31 and 33 is SDA2 and SCL2
and PIN 43 and 44 is ASDA1 and ASCL1

Which Pinout Ports are this on ECIO40P16?. I can not find them

http://ww1.microchip.com/downloads/en/DeviceDoc/70616g.pdf

User avatar
LeighM
Matrix Staff
Posts: 1919
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 461 times
Been thanked: 649 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby LeighM » Fri Aug 31, 2018 11:50 am

Hi,

The pin-out, and usable pins are shown in the Flowcode View->Chip window

Information about ECIO40P16 can be found here ...
http://www.matrixtsl.com/webshop/40-pin ... -ecio.html
https://www.matrixtsl.com/resources/fil ... O-60-2.pdf

kennethnilsen69
Posts: 84
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kennethnilsen69 » Fri Aug 31, 2018 1:13 pm

Yes, I know about this but this does not help me anything

LeighM wrote:Hi,

The pin-out, and usable pins are shown in the Flowcode View->Chip window

Information about ECIO40P16 can be found here ...
http://www.matrixtsl.com/webshop/40-pin ... -ecio.html
https://www.matrixtsl.com/resources/fil ... O-60-2.pdf


Microchip is calling them:
PIN 31 = SDA2/PMA9/RP100/RF4
PIN 32 = SCL2/PMA8/RP101/RF5

These names can not be found on the Pinout for the ECIO40P16.
[img]
EPIO46P16%20Pinout.JPG
[/img]
Attachments
EPIO46P16 Pinout.JPG
EPIO46P16 Pinout.JPG (71.93 KiB) Viewed 2587 times

User avatar
LeighM
Matrix Staff
Posts: 1919
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 461 times
Been thanked: 649 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby LeighM » Fri Aug 31, 2018 1:17 pm

As you can see, Port F is not available on the ECIO pins (more accurately only RF0 and RF1)

You will need to use the I2C component in Software mode and select a pair of pins that are available on the connectors

kersing
Valued Contributor
Valued Contributor
Posts: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 530 times
Been thanked: 1040 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kersing » Fri Aug 31, 2018 1:22 pm

kennethnilsen69 wrote:Microchip is calling them:
PIN 31 = SDA2/PMA9/RP100/RF4
PIN 32 = SCL2/PMA8/RP101/RF5


That is because these pins are not available on the ECIO40P16. The controller used on it has too many pins so a subset has been mapped to the 40 pins of the module, these pins are unavailable.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

kennethnilsen69
Posts: 84
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kennethnilsen69 » Fri Aug 31, 2018 1:38 pm

so what do I do now? I need help because the eeprom component does not work.

User avatar
LeighM
Matrix Staff
Posts: 1919
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 461 times
Been thanked: 649 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby LeighM » Fri Aug 31, 2018 1:46 pm

Have you tried to use the I2C component in Software mode and select a pair of pins that are available on the connectors of the ECIO?
Have you got pull-up resistors on SDA and SCL?

I've just spotted a previous post with updated project, looks like you are using B6 and B7?
Are the address and write enable pins on the AT24C32 tied to GND?
These users thanked the author LeighM for the post:
kersing (Fri Aug 31, 2018 1:55 pm)
Rating: 5.26%
 

kennethnilsen69
Posts: 84
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kennethnilsen69 » Fri Aug 31, 2018 4:13 pm

Yes, I use B6 and B7
A0 A1 A2 and WP are not connected to GND because it is stated in the manual that they are If left unconnected, WP is internally pulled down to
GND. And When the pins are not hardwired, the default A2, A1, and A0
are zero.
But I Have not pull-up resistors on SDA and SCL. I can not see in the AT24C32 manual that it is necessary.


DEVICE/PAGE ADDRESSES (A2, A1, A0): The A2, A1 and A0 pins are device address
inputs that are hard wired or left not connected for hardware compatibility with
AT24C16. When the pins are hardwired, as many as eight 32K/64K devices may be
addressed on a single bus system (device addressing is discussed in detail under the
Device Addressing section). When the pins are not hardwired, the default A2, A1, and A0
are zero.
WRITE PROTECT (WP): The write protect input, when tied to GND, allows normal write
operations. When WP is tied high to VCC, all write operations to the upper quandrant
(8/16K bits) of memory are inhibited. If left unconnected, WP is internally pulled down to
GND.
Last edited by kennethnilsen69 on Fri Aug 31, 2018 4:22 pm, edited 1 time in total.

kennethnilsen69
Posts: 84
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kennethnilsen69 » Fri Aug 31, 2018 4:21 pm

I will try to add pull-up resistors on SDA and SCL this weekend and let's see if it helps :-)

kersing
Valued Contributor
Valued Contributor
Posts: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 530 times
Been thanked: 1040 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kersing » Fri Aug 31, 2018 5:14 pm

kennethnilsen69 wrote:But I Have not pull-up resistors on SDA and SCL. I can not see in the AT24C32 manual that it is necessary.


I2C bus requires pull-ups. Not specific to this device.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

kennethnilsen69
Posts: 84
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kennethnilsen69 » Sat Sep 01, 2018 9:15 am

pull-ups is now added but no luck. still not working.

I have GND on PIN 4
VCC on PIN 8 (5v)
SCL on PIN 6 with pull-up resistor of 4.7k to 5v (to ECIO40P16 Port RB6)
SDA on PIN 5 with pull-up resistor of 4.7k to 5v (to ECIO40P16 Port RB7)

A0-A2 and WP are not connected. they should then be GND internal

Someone who has more suggestions?

kersing
Valued Contributor
Valued Contributor
Posts: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 530 times
Been thanked: 1040 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kersing » Sat Sep 01, 2018 10:01 am

The controller on the ECIO40P16 uses 3.3V, not 5V. The ports you are using (RB6/7) are not listed as 5V tolerant so you might have damaged the controller. Use VDD Out of ECIO (Pin 1) to power the resistors and the AT24C32.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

kennethnilsen69
Posts: 84
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kennethnilsen69 » Sat Sep 01, 2018 1:22 pm

Even with pull-ups to 5V so there is only 3.7 volts on pin B7 and B6 so I do not think has been damaged by it.

I move them over to the 3.3v output but have my doubts that this is the reason why it does not work

kennethnilsen69
Posts: 84
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kennethnilsen69 » Sat Sep 01, 2018 1:34 pm

Now I have moved them over to 3.3 volts and I now measure 3.2 volts on B7 and B6.

But it does not help on the problem :-( It still does not work.

I have also tested the ports with LED diodes and they work as they should and are not damaged by 3.7v for just a few seconds :-)

kennethnilsen69
Posts: 84
Joined: Tue Sep 01, 2015 9:37 pm
Been thanked: 14 times
Contact:

Re: ECIO40P16 and AT24C32 eeprom

Postby kennethnilsen69 » Sat Sep 01, 2018 5:13 pm

I have now moved it to D5 and D4 and here everything works :-)


Thanks for the help
These users thanked the author kennethnilsen69 for the post:
kersing (Sat Sep 01, 2018 8:34 pm)
Rating: 5.26%