add credit, add 013 debug timer message on keypress
[uccvend-snackrom.git] / doc / memorymap
1 Subject: [Vending Machine Memory Map]
2
3 ----- Forwarded message from Simon Fryer <[email protected]> -----
4 Date: Sat, 8 Sep 2001 12:22:39 +0800
5
6 Evening
7
8 Had a look at the circuit diagram for the vending machine this evening. Tried
9 to work out how all the I/O is arranged in memory as viewed by the HC11. For
10 the most part, only the address lines A11, A12 and A13 are decoded into 
11 useful addresses. This means that to drive all the devices except for the
12 EPROM and the FLASH memory, A0 to A10 can be ignored and any value can be used. 
13 The two memory chips actually care about the state of A0 to A10. I suspect that
14 the devices built onto the HC11 sit in memory somewhere but I am not sure 
15 where yet. 
16
17 As far as I can tell, the memory map is as follows:
18 0x8000 to 0xFFFF - EPROM. 27C256
19 0x3800 to 0x3FFF - U14. 74HC374 - 8 * D type flip flops. Here the data bits
20         are latched and taken off to various devices. (read serial I/O by 
21         toggling data lines). 
22         D0, D1 - Bill Valadator
23         D2, D3 - Display - D2 is data, D3 is clock (I think)
24         D4, D5, D6 - Snack Motors. D4 is data for the row decoder. D5, D6
25                 form part of the column decoders as far as I can tell. 
26 0x3000 to 0x37FF - U13. 74HC374. For the changer - dispenses change and/or
27                 counts change I think. Just latches data to the device. 
28 0x0800 to 0x0FFF - U12. 40Z12. The Flash memory. 
29 0x1800 to 0x1FFF - U7. 74HC245. This IC is a tristate buffer. It is used
30         for reading in the status of serveral switches. These switches are 
31         the cost, door and soldout switches. 
32 0x2000 to 0c27FF - U5. 74HC245. This reads in the status of the switch 
33         block 1. These switces are LANG, LANG, FORCE, PROMO, MULTI and WN-SNK. 
34         suspect these are read on startup to provide running state. 
35 0x2800 to 2FFF - U6, 74HC245. This reads row 1-5,6-9 onto the data bus. 
36
37 There are some other bits of the circuit diagram that I want to get my head 
38 around but I am going to leave that for another night. 
39
40 Some more good news. I has having a look through one of the junk rooms at 
41 home and found that I have a nice collection of 27C256 EPROMS sitting on some 
42 old ISA boards. They have a difficult to remove plastic sticker over the UV
43 window. These stickers are not Leatherman proof though. 
44
45 Next couple of steps... read up on the internals of the HC11. We have the 
46 simple model with only minimal useful stuff on board. 
47
48 Also, to get a HC11 assembler and a working EPROM writer. 
49
50 See Ya
51 Simon
52
53 ----- End forwarded message -----
54
55
56
57 From vend.asm:
58
59
60
61 ;0006   slot number
62
63 ;Rows are numbered 1-9, skipping 5.  There is no row 5.
64 ;2800   home sensors
65 ;       7  row 9
66 ;       6  row 8
67 ;       5  row 7
68 ;       4  row 6
69 ;       3  row 4
70 ;       2  row 3
71 ;       1  row 2
72 ;       0  row 1
73 ;Motor driver data is sent cols 7, 6, 5, 4, 3, 2, 1, 0 rows 9, 8, 7, 6,
74 4, 3, 2
75 ;1.  Cols 8 and 9 are separate outputs (they ran out of driver chip
76 outputs).
77 ;Motor driver column output enable is PA6
78 ;Motor driver serial clock is PA5
79 ;It looks like motor overcurrent sense is on PE1 (PE1 will be low if a
80 motor
81 ;is drawing too much current)
82 ;3000   misc outputs
83 ;       7  motor driver serial data
84 ;       6  col 9 motor driver
85 ;       5  col 8 motor driver
86 ;       4  display connector
87 ;       3  display connector
88 ;       2  not used
89 ;       1  note acceptor connector
90 ;       0  note acceptor connector
91 ;3800   changer outputs
92 ;       7  /ACCEPT
93 ;       6  /SEND
94 ;       5  RESET
95 ;       4  /$.05
96 ;       3  /$.10
97 ;       2  /$.25
98 ;       1  /$1.00
99 ;       0  motor driver row output enable
100 ;PA5 selects between RS232 and current loop serial interface?
101
102
103
104
105
106
107 Simon's comments say this:
108 0x3800 to 0x3FFF - U14. 74HC374 - 8 * D type flip flops. Here the data bits
109         are latched and taken off to various devices. (read serial I/O by 
110         toggling data lines). 
111         D0, D1 - Bill Valadator
112         D2, D3 - Display - D2 is data, D3 is clock (I think)
113         D4, D5, D6 - Snack Motors. D4 is data for the row decoder. D5, D6
114                 form part of the column decoders as far as I can tell. 
115 0x3000 to 0x37FF - U13. 74HC374. For the changer - dispenses change and/or
116                 counts change I think. Just latches data to the device. 
117
118 John's say this:
119 ;3000   misc outputs
120 ;       7  motor driver serial data
121 ;       6  col 9 motor driver
122 ;       5  col 8 motor driver
123 ;       4  display connector
124 ;       3  display connector
125 ;       2  not used
126 ;       1  note acceptor connector
127 ;       0  note acceptor connector
128 ;3800   changer outputs
129 ;       7  /ACCEPT
130 ;       6  /SEND
131 ;       5  RESET
132 ;       4  /$.05
133 ;       3  /$.10
134 ;       2  /$.25
135 ;       1  /$1.00
136 ;       0  motor driver row output enable
137 ;
138
139 which is correct?

UCC git Repository :: git.ucc.asn.au