chipKIT® Development Platform

Inspired by Arduino™

Program hang with Max32 and Basic I/O

Created Tue, 23 Sep 2014 11:05:43 +0000 by Papyroot


Tue, 23 Sep 2014 11:05:43 +0000

Hi, I have bought a Max32 board and a Basic I/O shield. When I try ton run the example sketch to write on the EEPROM on the Basic I/O shield, the program hangs in the "IOShieldEEPROM.writeString" routine (see in the joined file). I have connect the A4 and A5 on the basic I/O to pin 20 and 21 (SDA and SCL) on the Max32 board. I don't know how to do to debug this problem (I am a beginner !). Thank you for your help. Best regards

Listing of the sketch : /* Note: For chipKit Max users you must manually ** connect SDA and SCL (pins 20 and 21 on Max32) to pins A4 and A5 of ** IO Shield ** ** Note: For chipKit Uno Users you must have Jumpers JP6 and JP8 ** set in the RG3 and RG2 positions */

#include <IOShieldEEPROM.h> #include <Wire.h>

void setup() { char buf[26]; char single; int i; Serial.begin(9600); //Write the alphabet to the EEPROM //The data length is assumed in this example because the data //is a string. If you write an array numbers to EEPROM then the //length of the array must be provided. IOShieldEEPROM.writeString(0,"ABCDEFGHIJKLMNOPQRSTUVWXYZ");

//Read alphabet back and print to monitor IOShieldEEPROM.readString(0, buf, 26); Serial.print(buf);


//Write a single character IOShieldEEPROM.write(20,'#');

//Read all characters back IOShieldEEPROM.readString(0, buf, 26); Serial.print(buf);


//Read back last letter single =; Serial.print(single); }

void loop() { }


Tue, 19 Jan 2016 18:23:59 +0000

Hi Papyroot,

Sorry you never received an answer. This error was caused by a problem with the I2C module in that version of MPIDE. It should work fine in newer versions.

Hope this helps anybody else having this problem!