Permalink
Browse files

initial checkin

  • Loading branch information...
0 parents commit 11ac44a1a0e82a36882bd12beb54f40a179f641f @phooky committed Jun 25, 2012
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+import sys
+import Image
+
+
+buf = sys.stdin.read()
+
+# rearrange buf into parallel columns
+cols = 1
+bitw = 1024
+imgw = cols * bitw
+imgh = len(buf)/(cols*bitw/8)
+
+print imgw, imgh, len(buf)
+
+img = Image.new("1",(imgw,imgh))
+
+for c in range(cols):
+ colimg = Image.fromstring("1",(bitw,imgh),buf[c*imgh*(bitw/8):(c+1)*imgh*(bitw/8)])
+ img.paste(colimg,(bitw*c,0))
+
+img.save("eprom-font.png")
+
+
+# Create BDF file
+f = open("eprom-font.bdf","w")
+f.write("""STARTFONT 2.1
+FONT -osbourne-charrom-medium-r-normal--16-160-75-75-c-80-iso10646-1
+SIZE 16 75 75
+FONTBOUNDINGBOX 8 10 0 -2
+STARTPROPERTIES 2
+FONT_ASCENT 7
+FONT_DESCENT 2
+ENDPROPERTIES
+CHARS 128""")
+
+for i in range(128):
+ f.write("""
+STARTCHAR U+{0:04X}
+ENCODING {0:d}
+SWIDTH 500 0
+DWIDTH 8 0
+BBX 8 10 0 -2
+BITMAP
+""".format(i))
+ for j in range(10):
+ offset = 128*j + i
+ f.write("{0:02X}\n".format(ord(buf[offset])))
+ f.write("ENDCHAR")
+
+f.write("\nENDFONT\n")
+f.close()
@@ -0,0 +1,3 @@
+These are the EPROMs from a Waters W600E solvent pump control system.
+
+Processor: M68K series
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,56 @@
+#include <stdint.h>
+
+void setup() {
+ for (int i = 26; i < 42; i++) {
+ digitalWrite(i,LOW);
+ pinMode(i, OUTPUT);
+ }
+ for (int i = 2; i < 10; i++) {
+ digitalWrite(i,HIGH);
+ pinMode(i, INPUT);
+ }
+ Serial.begin(115200);
+ Serial.println("Initialized.");
+}
+
+void writeAddr(uint32_t addr) {
+ uint32_t mask = 0x01;
+ for (int i = 26; i < 42; i++) {
+ if ((mask & addr) != 0) {
+ digitalWrite(i,HIGH);
+ } else {
+ digitalWrite(i,LOW);
+ }
+ mask = mask << 1;
+ }
+}
+
+
+uint8_t readByte() {
+ uint8_t data = 0;
+ uint8_t mask = 0x1;
+ for (int i = 2; i < 10; i++) {
+ if (digitalRead(i) == HIGH) {
+ data |= mask;
+ }
+ mask = mask << 1;
+ }
+ return data;
+}
+
+#define MAX_ADDR 65536L
+
+void loop() {
+ uint32_t addr = 0;
+ while (addr < MAX_ADDR) {
+ for (int i = 0; i < 16; i++) {
+ writeAddr(addr);
+ uint8_t b = readByte();
+ Serial.print(b, HEX);
+ Serial.print(" ");
+ addr++;
+ }
+ Serial.println("");
+ }
+ while (1) {}
+}
Oops, something went wrong.

0 comments on commit 11ac44a

Please sign in to comment.