Raspberry Pi Interface to Cosmac Elf

elf2bin Utility

Copies the Elf (Membership Card) memory to a binary file on the Raspberry Pi.

The Raspberry Pi GPIO is used as interface to the Cosmac Elf SBC (e.g. Elf Membership Card parallel port).

pi@cosmac:~/elf/RaspiElf/chase $ bin2elf -e 7fff </dev/zero
0x8000 bytes written
pi@cosmac:~/elf/RaspiElf/chase $ bin2elf -w -r chase.bin
0x002d bytes written


pi@cosmac:~/elf/RaspiElf/chase $ elf load
01 1 0 0 1 1 0 0c
pi@cosmac:~/elf/RaspiElf/chase $ elf2bin -e 3f | hexdump -C 
0x0040 bytes read
00000000  c0 00 03 e3 90 b3 f8 30  a3 f8 01 53 64 6c 23 fa  |.......0...Sdl#.|
00000010  fe 3a 1a f0 f6 c7 f8 80  30 1f f0 fe c7 f8 01 53  |.:......0......S|
00000020  f8 14 b2 22 92 3a 23 c5  7a 38 7b 30 0c 00 00 00  |...".:#.z8{0....|
00000030  04 ff 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000040


pi@cosmac:~/elf/RaspiElf/chase $ elf
02 1 1 0 1 1 1 ff
pi@cosmac:~/elf/RaspiElf/chase $ elf -n read
02 1 1 0 1 1 0 ff
pi@cosmac:~/elf/RaspiElf/chase $ elf run

pi@cosmac:~/elf/RaspiElf/chase $ elf put 0
40 1 1 0 0 0 0 00
pi@cosmac:~/elf/RaspiElf/chase $ elf put 80
10 1 1 0 0 0 0 80

pi@cosmac:~/elf/RaspiElf/chase $ elf -v
LED:40 Q:1 Rx:1 IN:0 WAIT:0 CLR:0 READ:0 SWITCH:80
pi@cosmac:~/elf/RaspiElf/chase $ elf -v
LED:02 Q:0 Rx:1 IN:0 WAIT:0 CLR:0 READ:0 SWITCH:80

bin2elf Utility

http://hex2bin.sourceforge.net/

hexdump

/dev/null

elf CLI Tool

  • elf [-i] [-v] [-s ] [load|run|wait|reset|write|get|put] []

LED Q IN WAIT CLEAR WRITE SWITCH

-i increment -v verbose

wiringPi

Pi Pin# Pi FunctionSorted ascending Elf Pin DSUB J2 POWER P4 Elf Function
1 3.3 V (18) (3) (VIN, +)
17 3.3 V      
2 5 V (18) 3 VIN, +
4 5 V      
27 BCM 0      
28 BCM 1      
19 BCM 10, MOSI 5, in   IN3
23 BCM 11,SCLK 8, in   IN6
32 BCM 12 22, out, Cathode   O3 (*)
33 BCM 13 13, out, Cathode   O4 (*)
8 BCM 14, TXD (20) 4, in RXD, RX (EF3)
10 BCM 15, RXD (15) 5, out, Cathode TXD, TX (Q)
36 BCM 16 10, out, Cathode   O6 (*)
11 BCM 17 14, in   WAIT-
12 BCM 18 16, in   CLR-
35 BCM 19 12, out, Cathode   O5 (*)
3 BCM 2, SDA      
38 BCM 20      
40 BCM 21      
15 BCM 22 2, in   IN0
16 BCM 23 3, in   IN1
18 BCM 24 4, in   IN2
22 BCM 25 7, in   IN5
37 BCM 26 11, out, Cathode   O7 (*)
13 BCM 27 17, in   WE-
5 BCM 3, SCL      
7 BCM 4 1, in   IN- (EF4)
29 BCM 5 24, out, Cathode   O1 (*)
31 BCM 6 23, out, Cathode   O2 (*)
26 BCM 7, CE1 25, out, Cathode   O0 (*)
24 BCM 8, CE0 9, in   IN7
21 BCM 9, MISO 6, in   IN4
6 GND (19) 1 GND, -
9 GND 21 6 GND, /ON
14 GND      
20 GND      
25 GND      
30 GND      
34 GND      
39 GND      

Other Tools

hex2bin

Intel Hex or Motorola Hex file converter.

http://hex2bin.sourceforge.net/

> tar xvjf Hex2bin-2.5.tar.bz2 > make > sudo make install

-- Peter Schmid - 2017-11-26

Comments

  • gpio-numbers-pi2.png:
    gpio-numbers-pi2.png
Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng gpio-numbers-pi2.png r1 manage 53.2 K 2017-11-26 - 18:46 PeterSchmid  
Edit | Attach | Watch | Print version | History: r38 | r16 < r15 < r14 < r13 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r14 - 2017-12-17 - PeterSchmid
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback