Shop OBEX P1 Docs P2 Docs Learn Events
Prop as I2C memory programmer — Parallax Forums

Prop as I2C memory programmer

nicolad76nicolad76 Posts: 164
edited 2009-02-01 23:14 in Propeller 1
Hi,
I have a Prop connected to 3 i2c memory chips. Since I had the "bright" idea to solder the memories to the PCB (grrrrr) I have no way to programm them outside the board.

I was thinking to write some application in VB+SPIN to read/write directly the i2c chips.

Before I waste my time, has anyone done something like that already?

I would like to be able to read the content of the eeproms and save them on disk and, of course, the other way around.

Thanks
Nicola

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2009-02-01 07:59
    Hello nicolad,

    it happends only VERY FEW times that somebody has coded EXACTLY what you need

    But in the obex there are several objects for read/write data to I2C-EEPROMs

    i2cObjectv2

    Enhanced I2C

    A first approach to this could be to write a SPIN-program that waits for a start-command read out EEPROM-data and then
    sends the data via serial connection to the PC. Some terminalsoftwares have a log-mode which writes the received data to disk

    For some small kind of datachecking you could repeat this for two times and compare the received files
    on the PC

    That wouldn't be comfortable but would be a start

    best regards

    Stefan

    Post Edited (StefanL38) : 2/1/2009 10:13:16 AM GMT
  • EricGarlicEricGarlic Posts: 41
    edited 2009-02-01 17:23
    Have you tried setting up a prop as an I2C slave? I tried Hippy's routines without luck.

    Eric
  • nicolad76nicolad76 Posts: 164
    edited 2009-02-01 19:44
    Hi,
    thanks for your advices....
    I have no trouble to use Prop as I2C slave....I am developing the VB interface.
    If I get anything useful I will upload the project here...

    Ciao
    Nicola
  • StefanL38StefanL38 Posts: 2,292
    edited 2009-02-01 20:43
    Hello Nicola,

    there is a terminalsoftware which has a script feature. The scriptlanguage is in a pascal-style

    here is the demoscript

    program ScriptTest;
    
    const STRING1 = 'first test';
    
    var i: longint;
    begin
      writeln(STRING1);
      comsendstr(STRING1);
      while not(i=27) do // wait for ESC char
      begin
        i:=0;
        while i=0 do i:=ComReadChr();
          if (i=ord('1')) then writeln('Test 1...');
          if (i=ord('2')) then writeln('Test 2...');
          if (i=ord('3')) then writeln('Test 3...');
      end;
      writeln('while loop exit');
      
      // send alphabet
      for i:=65 to 90 do
      begin
        comsendchr(i);
      end;
    end.
    
    
    



    you can download it from

    braypp.googlepages.com/terminal


    best regards

    Stefan
  • EricGarlicEricGarlic Posts: 41
    edited 2009-02-01 22:00
    Nicolad76, I'm very interested in understanding how you program you Propeller as an I2C slave. I look forward to seeing your code. Eric
  • hippyhippy Posts: 1,981
    edited 2009-02-01 23:14
    For details on using the Propeller as an I2C Slave, the starting point is here ...

    propeller.wikispaces.com/I2C+Slave
Sign In or Register to comment.