Upstate Networks Incorporated |
The MDB2USB
Multi-drop bus (MDB) to USB 1.0 interface. Allows a USB PC to control a dollar bill validator coin acceptor/dispenser , credit card, magnetic swipe and other cashless devices. Perfect for PC controlled Kiosk requiring payment systems and PC based vending machines.
TELEPHONE: (315) 732-5664
E-MAIL: info@upstatenetworks.com
Order: www.upstatenetworks.com/order.html
Price: $249 each, $74.55 in quantity. Includes user's guide, hardware, USB and MDB cables, software and source code.
Introduction
The latest version of MDB2USB™ User’s Guide, along with technical support and information about Upstate Networks, may be found on the Upstate Networks World-Wide Web server at http://www.upstatenetworks.com/mdb2usb.
The MDB2USB™ is a Computer Peripheral for interfacing vending machine protocol used by various devices including: Dollar Bill Validators, Coin Acceptors, Coin Dispensers, Smart Cards, Foreign Currency, etc. This describes the Interface Protocol for the MDB2USB Hardware circuit. The MDB2USB™ interfaces any MDB vending device (6-pin molex/5pin MTA) to the PC via the USB port. The MDB2USB™ protocol is compatible with standard USB 1.0 Protocol.
Install the MDB2usb™ on a free USB port.
Connect 24Vdc power and MDB connections (6-pin Molex). Apply power. Check for LED1 (Green) indicating power is OK.
Install and run HIDCOMM_B.EXE AND SETUP.EXE from the MDB2USB directory on Disk or CD-ROM provided. Insert different dollar bill denominations, coins OR magnetic swipe, etc. and check to see that they register in the MDB2USB™ or MDBlab program. If all currency is registered the HARDWARE INSTALLATION is complete. Proceed to SOFTWARE DEVELOPERS KIT.
LED DESIGNATION |
INDICATION
|
D1 |
+5 VDC |
D2 |
TRANSMIT TO MDB |
D3 |
TRANSMIT TO PC |
It is time to install the MDB2USB™ itself and move on to the testing phase. Installation is relatively simple; there are only two connections that must be made for full functioning of the device. There are connectors on the edge of the board. The 6-pin Molex connects to the MDB devices. The final connector is a USB type A and connects into the back of the computer. There should be an open port on the back of the computer labeled “USB”
'*****************************************************************
'* *
'* MDB2USB Demonstration Software
V1.0 *
'* *
'* (c) Upstate Networks Inc *
'* 1001 Broad Street Utica, NY 13501 USA *
'* (315) 732-5664 info@upstatenetworks.com *
'* http://www.upstatenetworks.com/mdb2usb *
'* *
'* Description *
'* This program demonstrates transmit and
received to and from *
'* a MDB device using USB. The MDB protocol is used for payment*
'* systems such as coinc mechs bill acceptors
and card readers *
'* *
'* This appliction requires HIDcomm_B.oxc, the
API for the USB *
'* written by Microchip. www.upstatenetworks.net/hidcomm_b.exe *
'* *
'* The top row of text are the transmit bytes
and the bottom *
'* row are the receive byte. Any data can be put in the send *
'* box SEND in
DECIMAL
. *
'*****************************************************************
Private
Sub Command2_Click()
'DISPENSE
QUARTER
Dim buffer() As Byte 'define buffer to use for data
ReDim buffer(8) 'send 8 bytes at a time
Command2.Enabled = True 'disable send button until result
received
'On Error Resume Next 'trap errors if non numeric data in
'text box, or
textbox empty
buffer(0) = 3 '*********************************
buffer(1) = 15 '*
buffer(2) = 2 '* DISPENSE
Quarter
buffer(3) = 5 '* 03 15 02
05 Hex
buffer(4) = 0 '* See MDB
Spec for details
buffer(5) = 0 '* These values are in DECIMAL!
buffer(6) = 0
'*
buffer(7) = 0 '*********************************
HIDComm1.WriteTo
buffer(), 8 'write data to MDB2USB
Text1.Text = buffer(0) '**** Update display *************
Text2.Text = buffer(1)
Text3.Text = buffer(2)
Text4.Text = buffer(3)
Text5.Text = buffer(4)
Text6.Text = buffer(5)
Text7.Text = buffer(6)
Text8.Text = buffer(7)
End
Sub
Private
Sub Command1_Click() 'DISPENSE NICKEL
Dim buffer() As Byte 'define buffer to use for data
ReDim buffer(8) 'send 8 bytes at a time
'On Error Resume Next 'trap errors if non numeric data in
'text box, or
textbox empty
Command1.Enabled
= True 'disable send button
until result received
buffer(0) = 3 '*********************************
buffer(1) = 15 '*
buffer(2) = 2 '* DISPENSE
Nickel
buffer(3) = 1 '* 03 15 02 01 Hex
buffer(4) = 0 '* See MDB
Spec for details
buffer(5) = 0 '*
buffer(6) = 0 '*
buffer(7) = 0 '*********************************
HIDComm1.WriteTo
buffer(), 8 'write data to MDB2USB
Text1.Text = buffer(0) '**** Update display *************
Text2.Text = buffer(1)
Text3.Text = buffer(2)
Text4.Text = buffer(3)
Text5.Text = buffer(4)
Text6.Text = buffer(5)
Text7.Text = buffer(6)
Text8.Text = buffer(7)
End
Sub
Private
Sub Command3_Click() 'SEND BUTTON
Dim buffer() As Byte 'define buffer to use for data
ReDim buffer(8) 'send 8 bytes at a time
'On Error Resume Next 'trap errors if non numeric data in
'text box, or
textbox empty
buffer(0) = Text1.Text '***********************************
buffer(1) = Text2.Text '*
buffer(2) = Text3.Text '*
Send content of text boxes
buffer(3) = Text4.Text '*
to the MDB2USB
buffer(4) = Text5.Text '*
Put your transmit string here
buffer(5) = Text6.Text '*
buffer(6) = Text7.Text '*
buffer(7) = Text8.Text '***********************************
HIDComm1.WriteTo
buffer(), 8 'write data to MDB2USB
End
Sub
Private
Sub End_Click()
HIDComm1.Uninit 'disconnect from the USB device as prgoram ends
End
End
Sub
Private
Sub Form_Load()
HIDComm1.Connect 'connect to the USB device as the program starts
End
Sub
Private
Sub Form_Terminate()
HIDComm1.Uninit 'disconnect from the USB device as prgoram ends
End
Sub
Private
Sub HIDComm1_ConnectSuccess(ByVal Status As Long)
Command1.Enabled = True 'enable button when device is connected
Command2.Enabled = True 'enable button when device is connected
Caption = "MDB2USB - Connected to
MDB2USB HID Device"
End Sub
Private
Sub HIDComm1_Disconnected(ByVal Status As Long)
Command1.Enabled = False 'disable button when device unplugged
Command2.Enabled = False 'disable button when device unplugged
Caption = "MDB2USB - Looking for
MDB2USB HID Device"
End Sub
Private
Sub Timer1_Timer() 'try and
reconnect PIC
Dim
buffer() As Byte 'define
buffer to use for data
ReDim
buffer(8) 'send 8 bytes
at a time
If HIDComm1.Connected = False Then
HIDComm1.Connect
End If
End
Sub
Private
Sub Timer2_Timer() '***** READ MDB2USB *******
'** Timer set for 1mSec **
Dim
buffer() As Byte 'define buffer
to use for data
ReDim
buffer(8) 'send 8 bytes
at a time
buffer(0) = 0 'Clear all buffers
buffer(1) = 0
buffer(2) = 0
buffer(3) = 0
buffer(4) = 0
buffer(5) = 0
buffer(6) = 0
buffer(7) = 0
buffer() = HIDComm1.ReadFrom(8) 'Read
MDB2USB
If buffer(0) = 0 Then Exit Sub 'No Data received --> EXIT
Text9.Text = Chr((buffer(0))) 'Display data Received
Text10.Text = Chr((buffer(1))) '************************
Text11.Text = Chr((buffer(2))) '*
Text12.Text = Chr((buffer(3))) '* RECEIVE DATA HERE
Text13.Text = Chr((buffer(4))) '*
Text14.Text = Chr((buffer(5))) '*
Text15.Text = Chr((buffer(6))) '*
Text16.Text = Chr((buffer(7))) '************************
End
Sub
'************************************************************
'* END
END END END
END END END
END END END
END **
'************************************************************
UNI offers technical support for MDB2USBÔ primarily by e-mail and at http://www.upstatenetworks.com
Please read this manual thoroughly before contacting UNI.
Technical support is available via e-mail 24-hours-a-day, 7-days-a-week at tech@upstatenetworks.com.
|
Priority support will be given to people who have followed the instructions in the Before Contacting Technical Support section below. |
When contacting technical support with a question, please have the following information available or enclosed with your e-mail:
· Your name, e-mail address, fax and telephone number
· MDB2USBÔ serial number (Located on the packaging material)
· A detailed description of the problem you are experiencing
· Computer software type (operating system name and version, brand and version of other network drivers, video driver settings, plus the name and version of any device drivers or other memory-resident programs)
· Computer hardware type (type and make of CPU, RAM, hard disk type and size, video and network cards installed plus any other unusual cards)
SPECIFICATIONS
BILL
VALIDATOR
Bills Accepted (Byte 1)
1yyyxxxx yyy = Bill Routing
000 = Bill Stacked
001 = Escrow Request
010 = Bill Returned
011 = Not Used
100 = Disabled Bill Rejected
xxxx = Bill Type
The bill types are:
Type
0 = $1 Type 2 = $5 Type 4 = $20
Type
1 = $2 Type 3 = $10
The bill type number is also the
same as the bit # that must be set in order to enable the acceptance of the
bill itself. Ex. Set bit 3 to enable acceptance of a $10.
When all of the DIP switches on the BV are set to NOT accept any type of
bill, the validator’s default is to accept one dollar bills.
The software should have all of the bill types enabled; this will allow
the user to set which type of bills to be accepted on the validator itself.
-Firmware sets Bill Validator to accept 1, 2, 5, 10, 20 US bills by default
-Any commands to changed bills accepted or held in escrow will be set back to the firmware defaults upon a cycling of power or reset.
US Bills – Bit 0 = $1 Bit 3 = $5 Bit 5 = $20
Bit 1 = $2 Bit 4 = $10
Bill’s Accepted
Y1-Y2 = 001Fh for all US bills accepted
= 0000h accept no bill’s
Y3-Y4 = 001Fh for all US bills held in escrow
= 0000h for no bill’s held in escrow
Send out 34h and then the 4 bytes Y1-Y4 to change bill’s accepted and held in escrow.
Escrow 35h 1byte Y1
Return bill Y1 = 00h
Stack bill Y1 = 01h
Send 35h and then Y1 to act on bill held in escrow
Stacker 36h response Z1-Z2
Byte1 Byte2
Fxxxxxxx xxxxxxxx
F=1 Stacker Full
Xxxxxxxxxxxxxxx = Number of bill’s in stacker
Send out a 36h to the Bill Validator—It will respond with 2 bytes Z1-Z2
BILL VALIDATOR
|
|
|
MDB data
from Bill Validator to the PC
|
|
|
Bill Accepted
|
|
$1 |
30 80 09 |
$2 |
30 81 09 |
$5 |
30 82 09 |
$10 |
30 83 09 |
$20 |
30 84 09 |
Bill Returned
|
All valid
bill types disabled in software
|
$1 |
30 C0 09 |
$2 |
30 C1 09 |
$5 |
30 C2 09 |
$10 |
30 C3 09 |
$20 |
30 C4 09 |
Bill Held In Escrow
|
|
$1 |
30 90 09 |
$2 |
30 91 09 |
$5 |
30 92 09 |
$10 |
30 93 09 |
$20 |
30 94 09 |
Bill forcibly Removed
|
|
$1 |
30 A1 09 |
$2 |
30 A2 09 |
$5 |
30 A3 09 |
$10 |
30 A4 09 |
$20 |
30 A5 09 |
Bill Validator Status
|
|
01 |
Defective Motor
|
02 |
Sensor Problem
|
03 |
Validator Busy
|
04 |
ROM Checksum Error
|
05 |
Validator Jammed
|
06 |
Validator was Reset
|
07 |
Bill Removed
|
08 |
Cash Box Out of Position
|
09 |
Unit Disabled
|
0A |
Invalid Escrow Request
|
0B |
Bill Rejected
|
010xxxxxx |
Number of attempts to input a bill while
validator is disabled
|
14 |
Bill not accepted either because the bill type
is not enabled in the software or the bill was not recognized.
|
Coins Deposited: (Byte 1) (Byte 2)
01yyxxxx yy = Coin Routing zzzzzzzz = The number of coins
00: Cash Box in the tube for the
01: Tubes type accepted.
10: Not Used
11: Reject
xxxx = Coin Type
Coins Dispensed Manually (Byte 2)
1yyyxxxx yyy = # of coins dispensed zzzzzzzz = Same as above.
xxxx = The coin type dispensed
The coin types are:
Type 0 = 5c Type 2 = 25c Type 5 = $2 Can.
Type 1= 10c Type 4 = $1 Can.
Note: The type of the coin is the same as the bit that needs to be set in the ‘mdbCointype’ routine in order to enable the acceptance, or distribution of that coin.
COIN
ACCEPTOR
|
||||
|
DATA RECEIVED FROM MDB AND SENT TO
THE PC
|
|||
Below Low Mark
|
Above Low Mark
|
Above High Mark
|
||
Coin Inserted
|
|
|||
NICKEL |
08 50 00 |
08 50 06 |
08 40 4C |
|
DIME |
08 51 00 |
08 51 08 |
08 41 6B |
|
QUARTER |
08 52 00 |
08 52 06 |
08 42 4B |
|
QUARTER (1) |
08 52 00 |
08 52 06 |
08 42 15 |
|
$1 CANADIAN* |
08 44 00 |
|||
$2 CANADIAN* |
08 45 00 |
|||
* Dollar coins are routed directly to the cash box |
||||
Coin Dispensed Manually
|
|
|||
NICKEL |
08 90 00 |
08 90 06 |
08 90 4C |
|
DIME |
08 91 00 |
08 91 08 |
08 91 6B |
|
QUARTER |
08 92 00 |
08 92 06 |
08 92 4B |
|
QUARTER (1) |
08 92 00 |
08 92 06 |
08 92 15 |
|
Coin Rejected
|
|
|||
NICKEL |
08 70 00 |
08 70 06 |
08 70 4C |
|
DIME |
08 71 00 |
08 71 08 |
08 71 6B |
|
QUARTER |
08 72 00 |
08 72 06 |
08 72 4B |
|
QUARTER (1) |
08 72 00 |
08 72 06 |
08 72 15 |
|
$1 CANADIAN |
08 74 00 |
|||
$2 CANADIAN |
08 75 00 |
|||
MDB STATUS
|
|
|||
01
|
Escrow Request
|
|||
02
|
Changer Payout Busy
|
|||
03
|
No Credit
|
|||
04
|
Defective Tube Sensor
|
|||
05
|
Double Arrival
|
|||
06
|
Acceptor Unplugged
|
|||
07
|
Tube Jam
|
|||
08
|
ROM Checksum Error
|
|||
09
|
Coin Routing Error
|
|||
0A
|
Changer Busy
|
|||
0B
|
Changer was Reset
|
|||
0C
|
Coin Jam
|
|||
21
|
Coin not recognized/slug. Returned.
|
|||
Upon startup one of these values below may be sent to the PC – These
are the VMC Commands.
|
||||
08
|
Reset
|
|||
09
|
Status
|
|||
0A
|
Tube Status
|
|||
0B
|
Poll
|
|||
0C
|
Coin Type
|
|||
0D
|
Dispense
|
|||
Copyright 2005 Upstate Networks Inc | ||||