Searching \ for '24C01' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=24c01
Search entire site for: '24C01'.

Truncated match.
PICList Thread
'24C01'
1998\06\14@220548 by Dejair Jose Muner

flavicon
face
I am seeking a simple project for read and write eeprom 24C01.

Dejair Muner

1998\06\18@003709 by Alex Torres

picon face
-----Original Message-----
From: Dejair Jose Muner <spam_OUTdejaTakeThisOuTspamST.COM.BR>
To: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU <PICLISTspamKILLspamMITVMA.MIT.EDU>
Date: Monday, June 15, 1998 6:05 AM
Subject: 24C01


>I am seeking a simple project for read and write eeprom 24C01.
>
>Dejair Muner

If You want to read and write it with PIC - see App.Notes at the M-chip's CD
or WWW.
But if You want do this from PC see here (You need Borland Pascal 7.0) :
==========================================================
{ (c) Dima Orlov

{ Connect to LPT port:
D1 ------- 1 (A0)     (Vcc)  8 -------------- D1
D2 ------- 2 (A1)               7 ----
D3 ------- 3 (A2)     (SCL) 6 -------------- D2
             4 (GND)  (SDA) 5 -------------- ACK
                        c ----------------|----R=15k---D1(Vcc)
D0 ----R=1k0---b
                        e--- gnd
                 n-p-n, 2n2222, etc. Coll connected with SDA.
}

uses CRT;
var
LPT1: Word;
A: Word;
Mode: (mError, mRead, mWrite);
FileName: String[80];
Buf : Array[0..2047] of byte;
F: File;


procedure Pause; assembler;
asm
push ax
@@0:
jmp @@1
@@1:
in al, dx
pop ax
end;
procedure Start; assembler;
asm
mov dx, lpt1
mov al, 00000110b {Vcc = 1, SCL = 1, SDA = 1}
out dx, al
call Pause
mov al, 00000111b {Vcc = 1, SCL = 1, SDA = 0}
out dx, al
call Pause
mov al, 00000011b {Vcc = 1, SCL = 0, SDA = 0}
out dx, al
call Pause
end;
procedure Stop; assembler;
asm
mov dx, lpt1
mov al, 00000111b {Vcc = 1, SCL = 1, SDA = 0}
out dx, al
call Pause
mov al, 00000110b {Vcc = 1, SCL = 1, SDA = 1}
out dx, al
call Pause
end;
function PutByte(B: Byte): boolean; assembler;
asm
mov dx, lpt1
mov ah, B
mov cx, 8
@@0:
rcl ah,1
jc @@1
mov al, 00000011b {Vcc = 1, SCL = 0, SDA = 0}
out dx, al
call Pause
mov al, 00000111b {Vcc = 1, SCL = 1, SDA = 0}
out dx, al
call Pause
mov al, 00000011b {Vcc = 1, SCL = 0, SDA = 0}
out dx, al
jmp @@2
@@1:
mov al, 00000010b {Vcc = 1, SCL = 0, SDA = 1}
out dx, al
call Pause
mov al, 00000110b {Vcc = 1, SCL = 1, SDA = 1}
out dx, al
call Pause
mov al, 00000010b {Vcc = 1, SCL = 0, SDA = 1}
out dx, al
@@2:
loop @@0
call Pause
mov al, 00000110b {Vcc = 1, SCL = 1, SDA = 1}
out dx, al
call Pause
inc dx
in al, dx
dec dx
and al, 01000000b
mov ah, 1
je @@3
mov ah, 0
@@3:
mov al, 00000010b {Vcc = 1, SCL = 0, SDA = 1}
out dx, al
mov al, ah
end;
function GetByte: byte; assembler;
asm
mov dx, lpt1
mov cx, 8
@@0:
mov al, 00000110b {Vcc = 1, SCL = 1, SDA = 1}
out dx, al
call Pause
inc dx
in al, dx
dec dx
and al, 01000000b
shl al,1
shl al,1
rcl ah, 1
mov al, 00000010b {Vcc = 1, SCL = 0, SDA = 1}
out dx, al
call Pause
loop @@0
mov al, 00000110b {Vcc = 1, SCL = 1, SDA = 1}
out dx, al
call Pause
mov al, 00000010b {Vcc = 1, SCL = 0, SDA = 1}
out dx, al
call Pause
mov al, ah
end;

procedure WriteByte(Addr:Word; B : Byte);
begin
Start;
PutByte($A0 or ((Hi(Addr) shl 1) and $0e));
PutByte(Lo(Addr));
PutByte(B);
Stop;
Delay(5);
end;
function ReadByte(Addr:Word): Byte;
begin
Start;
PutByte($A0 or ((Hi(Addr) shl 1) and $0e));
PutByte(Lo(Addr));
Start;
PutByte($A1 or ((Hi(Addr) shl 1) and $0e));
ReadByte := GetByte;
Stop;
end;

procedure ComStr;
var
PCStr : ^String;
i: Byte;
begin
PCStr := Ptr(PrefixSeg, $80);
for i := 0 to length(PCStr^) -1 do
 if PCStr^[i] in ['-', '/'] then
  begin
   case PCStr^[i+1] of
    'r', 'R' : Mode := mRead;
    'w', 'W' : Mode := mWrite;
   else Mode := mError;
   end;
   Delete(PCStr^, i, 2);
   Break;
  end;
if ParamCount = 0 then Mode := mError
else FileName := ParamStr(1);
end;

begin
LPT1 := $378;
asm
mov dx, lpt1
mov al, 00000110b   {Vcc = 1}
out dx, al
end;
ComStr;
Assign(F, FileName);
case Mode of
 mRead:
  begin
   for A:= 0 to 2047 do Buf[A] := ReadByte(A);
   Rewrite(F, 1);
   if IOResult = 0 then
    begin
     BlockWrite(F, Buf, SizeOf(Buf));
     Close(F);
    end;
  end;
 mWrite:
  begin
   Reset(F, 1);
   if IOResult = 0 then
    begin
     BlockRead(F, Buf, SizeOf(Buf));
     Close(F);
     for A:= 0 to 2047 do WriteByte(A, Buf[A]);
    end;
  end;
 mError:
  begin
   WriteLn('24c16 fileName -r|-w');
   WriteLn(' -r Read');
   WriteLn(' -w Write');
  end;
end;
end.
=========================================================
==================================
Alex Torres, Kharkov, Ukraine (exUSSR)
E-Mail: .....altorKILLspamspam.....geocities.com
2:461/28 FidoNet
Home Page: http://www.geocities.com/SiliconValley/Lab/6311

1998\06\18@041757 by Frank Hreczuch

flavicon
face
Greetings...!

I have thought about this too, but using a 28C16A, although, I am not
prepared to go out and buy Pascal 7.0.  Does anyone have any other
suggestions here..?

Alex Torres wrote:

> Subject: 24C01
>
> >I am seeking a simple project for read and write eeprom 24C01.
>
>
> If You want to read and write it with PIC - see App.Notes at the M-chip's CD
> or WWW.
> But if You want do this from PC see here (You need Borland Pascal 7.0) :
> ==========================================================

1998\06\18@053412 by Pasi T Mustalahti

picon face
On Thu, 18 Jun 1998, Frank Hreczuch wrote:

> Greetings...!
>
> I have thought about this too, but using a 28C16A, although, I am not
> prepared to go out and buy Pascal 7.0.  Does anyone have any other
> suggestions here..?
>
PTM: Use Basic. I wrote my own program with QBasic and it worked well
enough. The chip I connected to the LPTx: -port. I didn't even need
external power. LPT-port gave enough current, when I wrote some data-lines
UP.
I have it somewhere under all this carbage...



{Quote hidden}

--------------------------------------------------------------------------
PTM, EraseMEpasi.mustalahtispam_OUTspamTakeThisOuTutu.fi, ptmustaspamspam_OUTutu.fi, http://www.utu.fi/~ptmusta
Lab.ins. (mikrotuki) ATK-keskus/Mat.Luon.Tdk                    OH1HEK
Lab.engineer (PC support) Computer Center                       OI7234
Mail: Turun Yliopisto / Fysla, Vesilinnantie 5, 20014
Pt 02-3336669, FAX 02-3335632 (Pk 02-2387010, NMT 0400-555577)
--------------------------------------------------------------------------

1998\06\18@055109 by Frank Hreczuch

flavicon
face
Pasi T Mustalahti wrote:

> PTM: Use Basic. I wrote my own program with QBasic and it worked well
> enough. The chip I connected to the LPTx: -port. I didn't even need
> external power. LPT-port gave enough current, when I wrote some data-lines
> UP.
> I have it somewhere under all this carbage...

....many thanks !!!
...please keep me informed !!!

1998\06\18@065002 by tjaart

flavicon
face
Frank Hreczuch wrote:

> Greetings...!
>
> I have thought about this too, but using a 28C16A, although, I am not
> prepared to go out and buy Pascal 7.0.  Does anyone have any other
> suggestions here..?

There are plenty of information and programs at these links
:www.wasp.co.za/~tjaart/electronicsearch.html
--
Friendly Regards

Tjaart van der Walt
@spam@tjaartKILLspamspamwasp.co.za

Add your voice !!
Vote at the Great G Com Public Vote. Go to :
http://www.wasp.co.za/~tjaart/gcomvote.html

|--------------------------------------------------|
|                WASP International                |
|R&D Engineer : GSM peripheral services development|
|--------------------------------------------------|
|SMS KILLspam0832123443KILLspamspamwasp.co.za  (160 chars max)|
|     http://www.wasp.co.za/~tjaart/index.html     |
|Voice: +27-(0)11-622-8686  Fax: +27-(0)11-622-8973|
|          WGS-84 : 26¡10.52'S 28¡06.19'E          |
|--------------------------------------------------|

1998\06\18@081408 by Keith Howell

flavicon
face
Dejair Jose Muner <RemoveMEdejaTakeThisOuTspamST.COM.BR> wrote:

> >I am seeking a simple project for read and write eeprom 24C01.

and Alex Torres replied:

> If You want to read and write it with PIC -
> see App.Notes at the M-chip's CD or WWW.

These are crap.

{Quote hidden}

If you want to drive I2C with minimum hardware,
obey the I2C spec properly, and suit other I2C devices, use:

STB <---> SDA
AFD <---> SCL
GND ----- GND

STB and AFD are already open collector outputs with pullups,
and you can read their pin logic levels back.

In Alex's cct, SCL is driven by D2.
You can get away with this - the EEPROM never needs to
wait-state the I2C bus by holding SCL low.
But suppose you decide to talk to a device that may
need to do so, then D2 may try to drive high while
the device tries to pull low - undesirable!

Cheers, KH.

; Quote of the day:
; "Better a bottle in front of me than a frontal lobotomy"
; - W.C. Fields, I think.

1998\06\19@034721 by Dr. Imre Bartfai

flavicon
face
Hi,

I think there is an open question in the original question: which device
want to be used to read/write the 24C01. If it is a PC then maybe asked,
whether DOS or another platform, and whether the programming language is
an issue.

If the PIC would be the master device, then either: use the AN of
Microchip; it works, or a far more simple solution: the Pic Basic and the
Pic Basic Pro both have built in statements to handle directly the 24Cxx.
I used it to build an universal 24Cxx programmer device.

Imre


On Thu, 18 Jun 1998, Keith Howell wrote:

{Quote hidden}

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...