Subject: [Vending Machine Memory Map] ----- Forwarded message from Simon Fryer ----- Date: Sat, 8 Sep 2001 12:22:39 +0800 Evening Had a look at the circuit diagram for the vending machine this evening. Tried to work out how all the I/O is arranged in memory as viewed by the HC11. For the most part, only the address lines A11, A12 and A13 are decoded into useful addresses. This means that to drive all the devices except for the EPROM and the FLASH memory, A0 to A10 can be ignored and any value can be used. The two memory chips actually care about the state of A0 to A10. I suspect that the devices built onto the HC11 sit in memory somewhere but I am not sure where yet. As far as I can tell, the memory map is as follows: 0x8000 to 0xFFFF - EPROM. 27C256 0x3800 to 0x3FFF - U14. 74HC374 - 8 * D type flip flops. Here the data bits are latched and taken off to various devices. (read serial I/O by toggling data lines). D0, D1 - Bill Valadator D2, D3 - Display - D2 is data, D3 is clock (I think) D4, D5, D6 - Snack Motors. D4 is data for the row decoder. D5, D6 form part of the column decoders as far as I can tell. 0x3000 to 0x37FF - U13. 74HC374. For the changer - dispenses change and/or counts change I think. Just latches data to the device. 0x0800 to 0x0FFF - U12. 40Z12. The Flash memory. 0x1800 to 0x1FFF - U7. 74HC245. This IC is a tristate buffer. It is used for reading in the status of serveral switches. These switches are the cost, door and soldout switches. 0x2000 to 0c27FF - U5. 74HC245. This reads in the status of the switch block 1. These switces are LANG, LANG, FORCE, PROMO, MULTI and WN-SNK. suspect these are read on startup to provide running state. 0x2800 to 2FFF - U6, 74HC245. This reads row 1-5,6-9 onto the data bus. There are some other bits of the circuit diagram that I want to get my head around but I am going to leave that for another night. Some more good news. I has having a look through one of the junk rooms at home and found that I have a nice collection of 27C256 EPROMS sitting on some old ISA boards. They have a difficult to remove plastic sticker over the UV window. These stickers are not Leatherman proof though. Next couple of steps... read up on the internals of the HC11. We have the simple model with only minimal useful stuff on board. Also, to get a HC11 assembler and a working EPROM writer. See Ya Simon ----- End forwarded message ----- From vend.asm: ;0006 slot number ;Rows are numbered 1-9, skipping 5. There is no row 5. ;2800 home sensors ; 7 row 9 ; 6 row 8 ; 5 row 7 ; 4 row 6 ; 3 row 4 ; 2 row 3 ; 1 row 2 ; 0 row 1 ;Motor driver data is sent cols 7, 6, 5, 4, 3, 2, 1, 0 rows 9, 8, 7, 6, 4, 3, 2 ;1. Cols 8 and 9 are separate outputs (they ran out of driver chip outputs). ;Motor driver column output enable is PA6 ;Motor driver serial clock is PA5 ;It looks like motor overcurrent sense is on PE1 (PE1 will be low if a motor ;is drawing too much current) ;3000 misc outputs ; 7 motor driver serial data ; 6 col 9 motor driver ; 5 col 8 motor driver ; 4 display connector ; 3 display connector ; 2 not used ; 1 note acceptor connector ; 0 note acceptor connector ;3800 changer outputs ; 7 /ACCEPT ; 6 /SEND ; 5 RESET ; 4 /$.05 ; 3 /$.10 ; 2 /$.25 ; 1 /$1.00 ; 0 motor driver row output enable ;PA5 selects between RS232 and current loop serial interface? Simon's comments say this: 0x3800 to 0x3FFF - U14. 74HC374 - 8 * D type flip flops. Here the data bits are latched and taken off to various devices. (read serial I/O by toggling data lines). D0, D1 - Bill Valadator D2, D3 - Display - D2 is data, D3 is clock (I think) D4, D5, D6 - Snack Motors. D4 is data for the row decoder. D5, D6 form part of the column decoders as far as I can tell. 0x3000 to 0x37FF - U13. 74HC374. For the changer - dispenses change and/or counts change I think. Just latches data to the device. John's say this: ;3000 misc outputs ; 7 motor driver serial data ; 6 col 9 motor driver ; 5 col 8 motor driver ; 4 display connector ; 3 display connector ; 2 not used ; 1 note acceptor connector ; 0 note acceptor connector ;3800 changer outputs ; 7 /ACCEPT ; 6 /SEND ; 5 RESET ; 4 /$.05 ; 3 /$.10 ; 2 /$.25 ; 1 /$1.00 ; 0 motor driver row output enable ; which is correct?