Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ Flash a binary file to the EEPROM:

![Breadboard Diagram](at28c_programmer_bb.png)

See the [circuit pinout table](circuit_table.csv) as well.

9 changes: 6 additions & 3 deletions at28c_programmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def main():

if (args.offset):
addr = args.offset[0]
else:
args.offset = [0] # Set offset to zero

if args.read:
print("Reading EEPROM")
Expand All @@ -59,8 +61,9 @@ def main():
contents = file.read()

print("Input file size: " + str(len(contents)))

print("Limiting to first " + str(args.limit[0]) + " bytes")
print(args)
if args.limit:
print("Limiting to first " + str(args.limit[0]) + " bytes")

if args.write:
for b in contents:
Expand All @@ -83,7 +86,7 @@ def main():
print(
str(addr - args.offset[0]) + " / " + str(len(contents)))

if args.limit[0] is not None and addr >= args.limit[0] + args.offset[0]:
if args.limit and args.limit[0] is not None and addr >= args.limit[0] + args.offset[0]:
break

elif args.clear:
Expand Down
29 changes: 29 additions & 0 deletions circuit_table.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
EEPROM,Arduino
1,40
2,38
3,33
4,32
5,31
6,30
7,29
8,28
9,27
10,26
11,46
12,47
13,48
14,GND
15,49
16,50
17,51
18,52
19,53
20,7
21,36
22,8
23,37
24,35
25,34
26,39
27,9
28,5V