Shop OBEX P1 Docs P2 Docs Learn Events
Code does not work on Propeller Mini (solved) — Parallax Forums

Code does not work on Propeller Mini (solved)

iseriesiseries Posts: 1,452
edited 2020-02-24 14:44 in Propeller 1
I have this code that work on all the other Propeller boards but not the Mini. I have tried the code on 3 different Mini boards and they all fail.

I have tried the code on an Activity Board, Activity Board WX, Flip, Project Board and even Badge WX. The code works on all of them.

So why does the code not work on the Propeller Mini?
#include "simpletools.h"

#define XSCL 28
#define XSDA 29

struct log
{
  int magic;
  int last;
};

char Buf[512];
i2c *mem;
int i;


int main()
{
  printi("Starting\n");
  
  mem = i2c_newbus(XSCL, XSDA, 0);
  
  i = i2c_in(mem, 0x50, 0, 2, Buf, 256);
  
  printi("read: %d\n", i);
  
  for (i=0;i<256;i++)
  {
    printi("%x ", Buf[i]);
  }
  
  Buf[0] = 0xff;
  Buf[1] = 0xfe;
  
//  i2c_out(mem, 0x50, 0, 2, Buf, 2);
  
  printi("\nDone\n");
  
  while(1)
  {
    pause(1000);
    
  }  
}

Mike

Comments

  • I solved this problem. You have to read the fine print. Some Propeller board do not have pullup resister on the clock line and need to have clock drive turned on.

    This means that none of the EEPROM functions will work with this board as those functions do not use clock drive.

    So "ee_getByte()" will not work with this board.

    Mike
  • Interesting... Good thing it was documented and you were able to find it.
Sign In or Register to comment.