EmbeddedRelated.com
Forums

How connect PC Embedded to MDB (Vending Machine)

Started by Unknown September 28, 2008
On Mon, 29 Sep 2008 11:32:31 +1000, "PhilW" <phil@microcoin.com>
wrote:

> ><juanma.freelance@gmail.com> wrote in message >news:c4d5b1b0-ea81-446b-ba2a-4f7ebe2811c3@l64g2000hse.googlegroups.com... >> Hi! >> >> I'm sorry but I am not English and I speack English very bad. >> >> My question is: How connect a PC Embedded to Vending Machine? I know >> that exist a protocol MDB that is used by vending machine, but this >> conector is different to pc conector (RS232, USB, i2c, etc). Can I >> connect a PC Embedded by MDB? How? >> >> Anybody understand me? >> >> Thanks you! > >We understand you. > >Read the spec to understand what is required to connect. > >However, even once you have done the hardware to be able to connect to a >PC's RS232 port you will, more than likely run into the problem of the 9bit >char format not being supported on a std PC serial port.
This is the tricky part. Unless you are prepared to do very low level coding, the only thing I have found so far is some ethernet to 9bit serial converters done by Port Box in Prague.
>You can fudge it using the mark/space parity control but it is not very >nice.
This is OK for slow speeds and as long as you are able to disable the interrupts. Paul
On Sep 29, 3:46 pm, juanma.freela...@gmail.com wrote:

> I need to create adapter for MDB to any port (serial?) the PC ... it > is difficult? I know computer science, but the electronic... :( any > idea?
How about doing your own MDB-USB adapter using either the FT232 or related (if it can do 9-bit serial) or some more capable USB microcontroller. You could even use a microcontroller as a bridge between 8 and 9 bit serial. What you would want to do is check microcontrollor data sheets and find one with a serial port that can be programmed to 9 bits.
<juanma.freelance@gmail.com> wrote in message 
news:73aaa712-5e75-4674-a2b2-3a62b78569a3@p25g2000hsf.googlegroups.com...
On 29 sep, 20:29, James Beck <j...@reallykillersystems.com> wrote:
> In article <29c16500-d3a1-4d46-a7d4- > 59492ef13...@w7g2000hsa.googlegroups.com>, juanma.freela...@gmail.com > says... > > > > > On 29 sep, 17:56, James Beck <j...@reallykillersystems.com> wrote: > > > In article <3834d44e-355e-4d5f-af57-87e9ec4c0a97 > > > @z72g2000hsb.googlegroups.com>, juanma.freela...@gmail.com says... > > > > > On 29 sep, 16:33, James Beck <j...@reallykillersystems.com> wrote: > > > > > In article <1da3a443-e530-487a-8cb7-e4166e206414 > > > > > @i76g2000hsf.googlegroups.com>, juanma.pal...@gmail.com says... > > > > > > > On 29 sep, 11:11, juanma.freela...@gmail.com wrote: > > > > > > > On 29 sep, 03:32, "PhilW" <p...@microcoin.com> wrote: > > > > > > > > > <juanma.freela...@gmail.com> wrote in message > > > > > > > > >news:c4d5b1b0-ea81-446b-ba2a-4f7ebe2811c3@l64g2000hse.googlegroups.com... > > > > > > > > > > Hi! > > > > > > > > > > I'm sorry but I am not English and I speack English very > > > > > > > > > bad. > > > > > > > > > > My question is: How connect a PC Embedded to Vending > > > > > > > > > Machine? I know > > > > > > > > > that exist a protocol MDB that is used by vending machine, > > > > > > > > > but this > > > > > > > > > conector is different to pc conector (RS232, USB, i2c, > > > > > > > > > etc). Can I > > > > > > > > > connect a PC Embedded by MDB? How? > > > > > > > > > > Anybody understand me? > > > > > > > > > > Thanks you! > > > > > > > > > We understand you. > > > > > > > > > Read the spec to understand what is required to connect. > > > > > > > > > However, even once you have done the hardware to be able to > > > > > > > > connect to a > > > > > > > > PC's RS232 port you will, more than likely run into the > > > > > > > > problem of the 9bit > > > > > > > > char format not being supported on a std PC serial port. > > > > > > > > > You can fudge it using the mark/space parity control but it > > > > > > > > is not very > > > > > > > > nice. > > > > > > > > > Why don't you use ccTalk instead?www.cctalk.org > > > > > > > > > regards > > > > > > > > PhilW > > > > > > > > Thanks you. > > > > > > > > I dont understand all, what is "ccTalk"?? > > > > > > > > regards. > > > > > > > Juanma.- Ocultar texto de la cita - > > > > > > > > - Mostrar texto de la cita - > > > > > > > I read a little about spec of "ccTalk", and this is other > > > > > > protocol, > > > > > > no? > > > > > > > I need "to talk" with a vending machine. The standard of vending > > > > > > machine is the MDB (i think). > > > > > > > Are you understand me? > > > > > > > Thanks you. > > > > > > regards. > > > > > > Here is a USB to MDB bridge > > > > > :http://www.geocities.com/bonusdata/analyzer/mdb_interface/mdb_interface. > > > > > htm > > > > > (sorry for the spanning) > > > > > > Here is the protocol :http://www.vending.org/technical/MDB_3.0.pdf > > > > > >www.vending.orgiswhereyou need to go for any info about MDC/ICP- > > > > >Ocultar texto de la cita - > > > > > > - Mostrar texto de la cita - > > > > > Thanks you!! > > > > > I know this all, but the "USB to MDB" is not a good solution for me, > > > > should be others solutions... > > > > > I am interesting in ccTal PhilW but i dont understand how apply this > > > > to the vending machine. > > > > If the vending machine does not speak CCTalk then there is no way to > > > apply it at all, in this case. MDB/ICP is the way you will have to go. > > > CCTalk was designed more along the lines of gaming systems and MDB was > > > designed for vending machines and the like. Not that you couldn't use > > > CCTalk in a vending machine, but MDB was standardized for use in them > > > (vending machines) long ago.- Ocultar texto de la cita - > > > > - Mostrar texto de la cita - > > > Oh James Beck, i think that you have reason. > > > My problem is how comunicate the pc embedded with vending machine with > > the protocol MDB... If the unique solution the "MDB --> USB adapter"? > > If you sum the price that a pcembedded+adapter ... for one for machine > > is very expensive no? it must of having another solution, no? > > > Thanks you! > > regards. > > Well, if you doing a one off machine, there will never be any economy of > scale. If I were doing a single machine/test station, I wouldn't balk > at paying the price for the adapter. If I were doing thousands of them > I would look at doing something more task specific and cheaper. You can > implement the protocol yourself with some kind of adapter for the PC and > a communications library, but that would be what the specification is > for.- Ocultar texto de la cita - > > - Mostrar texto de la cita -
Oh, I see that you understand me :) I need to create adapter for MDB to any port (serial?) the PC ... it is difficult? I know computer science, but the electronic... :( any idea? Thanks you! regards. An adaptor is not an easy thing to do, simply due to the fact you need to maintain the timing specifications of the MDB protocol. An adaptor that just recieves a command from the PC, re-formats it for MDB and then sends it on, waits for the response and forwards that to the PC will easily break the timing criteria of the protocol, considering that each char takes 1mS to transmit or receive. Concerning USB adaptors. Can be good providing they support, and implement the mark/space parity support correctly. However, you still have to provide low level coding to fudge the 9 bits via the mark/space parity. In addition you will be required to add timing delays to ensure the parity changes are sent over USB before transmitting the next data or parity change. We have had success with the CP2102 from silicon Labs. It is sure however, from experience, that supporting MDB over USB is a lot more painful than a standard serial port. Another alternative is to acquire an add-on serial port that natively supports 9 data bits at the hardware level. Not cheap, hard to find and expensive. As for the vending machine implementation, you have not said, but I conclude that YOUare building the vending machine and YOU therefore have control over the protocol to use. Unless by some specification requirement that you use MDB, I see no reason why you cannot use ccTalk. I believe the "protocol" is purely for internal machine use, aimed at connecting all peripherals to a host controller, namely your embedded PC. Any external communications is usually by some other communications link, modem, ethernet, wifi, etc. Why ccTalk? It's simple and most importantly can be easily supported by any PC serial port, USB adaptor etc that supports the standard 8bit char length. It could be any other protocol besides, that uses the 8bit data length as well. It's just that ccTalk is well documented, well supported and widely used. We produce products that support both MDB and ccTalk in addition to others. We much prefer ccTalk for its non requirement of the 9bit data format. regards PhilW
On 30 sep, 03:09, "PhilW" <p...@microcoin.com> wrote:
> <juanma.freela...@gmail.com> wrote in message > > news:73aaa712-5e75-4674-a2b2-3a62b78569a3@p25g2000hsf.googlegroups.com... > On 29 sep, 20:29, James Beck <j...@reallykillersystems.com> wrote: > > > > > > > In article <29c16500-d3a1-4d46-a7d4- > > 59492ef13...@w7g2000hsa.googlegroups.com>, juanma.freela...@gmail.com > > says... > > > > On 29 sep, 17:56, James Beck <j...@reallykillersystems.com> wrote: > > > > In article <3834d44e-355e-4d5f-af57-87e9ec4c0a97 > > > > @z72g2000hsb.googlegroups.com>, juanma.freela...@gmail.com says... > > > > > > On 29 sep, 16:33, James Beck <j...@reallykillersystems.com> wrote: > > > > > > In article <1da3a443-e530-487a-8cb7-e4166e206414 > > > > > > @i76g2000hsf.googlegroups.com>, juanma.pal...@gmail.com says... > > > > > > > > On 29 sep, 11:11, juanma.freela...@gmail.com wrote: > > > > > > > > On 29 sep, 03:32, "PhilW" <p...@microcoin.com> wrote: > > > > > > > > > > <juanma.freela...@gmail.com> wrote in message > > > > > > > > > >news:c4d5b1b0-ea81-446b-ba2a-4f7ebe2811c3@l64g2000hse.googlegroups.com... > > > > > > > > > > > Hi! > > > > > > > > > > > I'm sorry but I am not English and I speack English very > > > > > > > > > > bad. > > > > > > > > > > > My question is: How connect a PC Embedded to Vending > > > > > > > > > > Machine? I know > > > > > > > > > > that exist a protocol MDB that is used by vending machine, > > > > > > > > > > but this > > > > > > > > > > conector is different to pc conector (RS232, USB, i2c, > > > > > > > > > > etc). Can I > > > > > > > > > > connect a PC Embedded by MDB? How? > > > > > > > > > > > Anybody understand me? > > > > > > > > > > > Thanks you! > > > > > > > > > > We understand you. > > > > > > > > > > Read the spec to understand what is required to connect. > > > > > > > > > > However, even once you have done the hardware to be able to > > > > > > > > > connect to a > > > > > > > > > PC's RS232 port you will, more than likely run into the > > > > > > > > > problem of the 9bit > > > > > > > > > char format not being supported on a std PC serial port. > > > > > > > > > > You can fudge it using the mark/space parity control but it > > > > > > > > > is not very > > > > > > > > > nice. > > > > > > > > > > Why don't you use ccTalk instead?www.cctalk.org > > > > > > > > > > regards > > > > > > > > > PhilW > > > > > > > > > Thanks you. > > > > > > > > > I dont understand all, what is "ccTalk"?? > > > > > > > > > regards. > > > > > > > > Juanma.- Ocultar texto de la cita - > > > > > > > > > - Mostrar texto de la cita - > > > > > > > > I read a little about spec of "ccTalk", and this is other > > > > > > > protocol, > > > > > > > no? > > > > > > > > I need "to talk" with a vending machine. The standard of vending > > > > > > > machine is the MDB (i think). > > > > > > > > Are you understand me? > > > > > > > > Thanks you. > > > > > > > regards. > > > > > > > Here is a USB to MDB bridge > > > > > > :http://www.geocities.com/bonusdata/analyzer/mdb_interface/mdb_interface. > > > > > > htm > > > > > > (sorry for the spanning) > > > > > > > Here is the protocol :http://www.vending.org/technical/MDB_3.0.pdf > > > > > > >www.vending.orgiswhereyouneed to go for any info about MDC/ICP- > > > > > >Ocultar texto de la cita - > > > > > > > - Mostrar texto de la cita - > > > > > > Thanks you!! > > > > > > I know this all, but the "USB to MDB" is not a good solution for me, > > > > > should be others solutions... > > > > > > I am interesting in ccTal PhilW but i dont understand how apply this > > > > > to the vending machine. > > > > > If the vending machine does not speak CCTalk then there is no way to > > > > apply it at all, in this case. MDB/ICP is the way you will have to go. > > > > CCTalk was designed more along the lines of gaming systems and MDB was > > > > designed for vending machines and the like. Not that you couldn't use > > > > CCTalk in a vending machine, but MDB was standardized for use in them > > > > (vending machines) long ago.- Ocultar texto de la cita - > > > > > - Mostrar texto de la cita - > > > > Oh James Beck, i think that you have reason. > > > > My problem is how comunicate the pc embedded with vending machine with > > > the protocol MDB... If the unique solution the "MDB --> USB adapter"? > > > If you sum the price that a pcembedded+adapter ... for one for machine > > > is very expensive no? it must of having another solution, no? > > > > Thanks you! > > > regards. > > > Well, if you doing a one off machine, there will never be any economy of > > scale. If I were doing a single machine/test station, I wouldn't balk > > at paying the price for the adapter. If I were doing thousands of them > > I would look at doing something more task specific and cheaper. You can > > implement the protocol yourself with some kind of adapter for the PC and > > a communications library, but that would be what the specification is > > for.- Ocultar texto de la cita - > > > - Mostrar texto de la cita - > > Oh, I see that you understand me :) > > I need to create adapter for MDB to any port (serial?) the PC ... it > is difficult? I know computer science, but the electronic... :( any > idea? > > Thanks you! > regards. > > An adaptor is not an easy thing to do, simply due to the fact you need to > maintain the timing specifications of the MDB protocol. An adaptor that just > recieves a command from the PC, re-formats it for MDB and then sends it on, > waits for the response and forwards that to the PC will easily break the > timing criteria of the protocol, considering that each char takes 1mS to > transmit or receive. > > Concerning USB adaptors. Can be good providing they support, and implement > the mark/space parity support correctly. However, you still have to provide > low level coding to fudge the 9 bits via the mark/space parity. In addition > you will be required to add timing delays to ensure the parity changes are > sent over USB before transmitting the next data or parity change. We have > had success with the CP2102 from silicon Labs. It is sure however, from > experience, that supporting MDB over USB is a lot more painful than a > standard serial port. > > Another alternative is to acquire an add-on serial port that natively > supports 9 data bits at the hardware level. Not cheap, hard to find and > expensive. > > As for the vending machine implementation, you have not said, but I conclude > that YOUare building the vending machine and YOU therefore have control over > the protocol to use. Unless by some specification requirement that you use > MDB, I see no reason why you cannot use ccTalk. I believe the "protocol" is > purely for internal machine use, aimed at connecting all peripherals to a > host controller, namely your embedded PC. Any external communications is > usually by some other communications link, modem, ethernet, wifi, etc. Why > ccTalk? It's simple and most importantly can be easily supported by any PC > serial port, USB adaptor etc that supports the standard 8bit char length. It > could be any other protocol besides, that uses the 8bit data length as well. > It's just that ccTalk is well documented, well supported and widely used. > > We produce products that support both MDB and ccTalk in addition to others. > We much prefer ccTalk for its non requirement of the 9bit data format. > > regards > PhilW- Ocultar texto de la cita - > > - Mostrar texto de la cita -
Oh, no, I am not a building the vending machine and I haven't control over the protocol to use, it is the problem. I need use the protocol standard in the most vending machine, that is, MDB. Do you understand me PhilW? Sorry for my English. regards.
<juanma.freelance@gmail.com> wrote in message 
news:ef120646-80af-45a8-91c1-d53caeabeb53@59g2000hsb.googlegroups.com...
> On 30 sep, 03:09, "PhilW" <p...@microcoin.com> wrote: >> <juanma.freela...@gmail.com> wrote in message >> >> news:73aaa712-5e75-4674-a2b2-3a62b78569a3@p25g2000hsf.googlegroups.com... >> On 29 sep, 20:29, James Beck <j...@reallykillersystems.com> wrote: >> >> >> >> >> >> > In article <29c16500-d3a1-4d46-a7d4- >> > 59492ef13...@w7g2000hsa.googlegroups.com>, juanma.freela...@gmail.com >> > says... >> >> > > On 29 sep, 17:56, James Beck <j...@reallykillersystems.com> wrote: >> > > > In article <3834d44e-355e-4d5f-af57-87e9ec4c0a97 >> > > > @z72g2000hsb.googlegroups.com>, juanma.freela...@gmail.com says... >> >> > > > > On 29 sep, 16:33, James Beck <j...@reallykillersystems.com> >> > > > > wrote: >> > > > > > In article <1da3a443-e530-487a-8cb7-e4166e206414 >> > > > > > @i76g2000hsf.googlegroups.com>, juanma.pal...@gmail.com says... >> >> > > > > > > On 29 sep, 11:11, juanma.freela...@gmail.com wrote: >> > > > > > > > On 29 sep, 03:32, "PhilW" <p...@microcoin.com> wrote: >> >> > > > > > > > > <juanma.freela...@gmail.com> wrote in message >> >> > > > > > > > >news:c4d5b1b0-ea81-446b-ba2a-4f7ebe2811c3@l64g2000hse.googlegroups.com... >> >> > > > > > > > > > Hi! >> >> > > > > > > > > > I'm sorry but I am not English and I speack English >> > > > > > > > > > very >> > > > > > > > > > bad. >> >> > > > > > > > > > My question is: How connect a PC Embedded to Vending >> > > > > > > > > > Machine? I know >> > > > > > > > > > that exist a protocol MDB that is used by vending >> > > > > > > > > > machine, >> > > > > > > > > > but this >> > > > > > > > > > conector is different to pc conector (RS232, USB, i2c, >> > > > > > > > > > etc). Can I >> > > > > > > > > > connect a PC Embedded by MDB? How? >> >> > > > > > > > > > Anybody understand me? >> >> > > > > > > > > > Thanks you! >> >> > > > > > > > > We understand you. >> >> > > > > > > > > Read the spec to understand what is required to connect. >> >> > > > > > > > > However, even once you have done the hardware to be able >> > > > > > > > > to >> > > > > > > > > connect to a >> > > > > > > > > PC's RS232 port you will, more than likely run into the >> > > > > > > > > problem of the 9bit >> > > > > > > > > char format not being supported on a std PC serial port. >> >> > > > > > > > > You can fudge it using the mark/space parity control but >> > > > > > > > > it >> > > > > > > > > is not very >> > > > > > > > > nice. >> >> > > > > > > > > Why don't you use ccTalk instead?www.cctalk.org >> >> > > > > > > > > regards >> > > > > > > > > PhilW >> >> > > > > > > > Thanks you. >> >> > > > > > > > I dont understand all, what is "ccTalk"?? >> >> > > > > > > > regards. >> > > > > > > > Juanma.- Ocultar texto de la cita - >> >> > > > > > > > - Mostrar texto de la cita - >> >> > > > > > > I read a little about spec of "ccTalk", and this is other >> > > > > > > protocol, >> > > > > > > no? >> >> > > > > > > I need "to talk" with a vending machine. The standard of >> > > > > > > vending >> > > > > > > machine is the MDB (i think). >> >> > > > > > > Are you understand me? >> >> > > > > > > Thanks you. >> > > > > > > regards. >> >> > > > > > Here is a USB to MDB bridge >> > > > > > :http://www.geocities.com/bonusdata/analyzer/mdb_interface/mdb_interface. >> > > > > > htm >> > > > > > (sorry for the spanning) >> >> > > > > > Here is the protocol >> > > > > > :http://www.vending.org/technical/MDB_3.0.pdf >> >> > > > > >www.vending.orgiswhereyouneed to go for any info about MDC/ICP- >> > > > > >Ocultar texto de la cita - >> >> > > > > > - Mostrar texto de la cita - >> >> > > > > Thanks you!! >> >> > > > > I know this all, but the "USB to MDB" is not a good solution for >> > > > > me, >> > > > > should be others solutions... >> >> > > > > I am interesting in ccTal PhilW but i dont understand how apply >> > > > > this >> > > > > to the vending machine. >> >> > > > If the vending machine does not speak CCTalk then there is no way >> > > > to >> > > > apply it at all, in this case. MDB/ICP is the way you will have to >> > > > go. >> > > > CCTalk was designed more along the lines of gaming systems and MDB >> > > > was >> > > > designed for vending machines and the like. Not that you couldn't >> > > > use >> > > > CCTalk in a vending machine, but MDB was standardized for use in >> > > > them >> > > > (vending machines) long ago.- Ocultar texto de la cita - >> >> > > > - Mostrar texto de la cita - >> >> > > Oh James Beck, i think that you have reason. >> >> > > My problem is how comunicate the pc embedded with vending machine >> > > with >> > > the protocol MDB... If the unique solution the "MDB --> USB adapter"? >> > > If you sum the price that a pcembedded+adapter ... for one for >> > > machine >> > > is very expensive no? it must of having another solution, no? >> >> > > Thanks you! >> > > regards. >> >> > Well, if you doing a one off machine, there will never be any economy >> > of >> > scale. If I were doing a single machine/test station, I wouldn't balk >> > at paying the price for the adapter. If I were doing thousands of them >> > I would look at doing something more task specific and cheaper. You can >> > implement the protocol yourself with some kind of adapter for the PC >> > and >> > a communications library, but that would be what the specification is >> > for.- Ocultar texto de la cita - >> >> > - Mostrar texto de la cita - >> >> Oh, I see that you understand me :) >> >> I need to create adapter for MDB to any port (serial?) the PC ... it >> is difficult? I know computer science, but the electronic... :( any >> idea? >> >> Thanks you! >> regards. >> >> An adaptor is not an easy thing to do, simply due to the fact you need to >> maintain the timing specifications of the MDB protocol. An adaptor that >> just >> recieves a command from the PC, re-formats it for MDB and then sends it >> on, >> waits for the response and forwards that to the PC will easily break the >> timing criteria of the protocol, considering that each char takes 1mS to >> transmit or receive. >> >> Concerning USB adaptors. Can be good providing they support, and >> implement >> the mark/space parity support correctly. However, you still have to >> provide >> low level coding to fudge the 9 bits via the mark/space parity. In >> addition >> you will be required to add timing delays to ensure the parity changes >> are >> sent over USB before transmitting the next data or parity change. We have >> had success with the CP2102 from silicon Labs. It is sure however, from >> experience, that supporting MDB over USB is a lot more painful than a >> standard serial port. >> >> Another alternative is to acquire an add-on serial port that natively >> supports 9 data bits at the hardware level. Not cheap, hard to find and >> expensive. >> >> As for the vending machine implementation, you have not said, but I >> conclude >> that YOUare building the vending machine and YOU therefore have control >> over >> the protocol to use. Unless by some specification requirement that you >> use >> MDB, I see no reason why you cannot use ccTalk. I believe the "protocol" >> is >> purely for internal machine use, aimed at connecting all peripherals to a >> host controller, namely your embedded PC. Any external communications is >> usually by some other communications link, modem, ethernet, wifi, etc. >> Why >> ccTalk? It's simple and most importantly can be easily supported by any >> PC >> serial port, USB adaptor etc that supports the standard 8bit char length. >> It >> could be any other protocol besides, that uses the 8bit data length as >> well. >> It's just that ccTalk is well documented, well supported and widely used. >> >> We produce products that support both MDB and ccTalk in addition to >> others. >> We much prefer ccTalk for its non requirement of the 9bit data format. >> >> regards >> PhilW- Ocultar texto de la cita - >> >> - Mostrar texto de la cita - > > Oh, no, I am not a building the vending machine and I haven't control > over the protocol to use, it is the problem. I need use the protocol > standard in the most vending machine, that is, MDB. > > Do you understand me PhilW? Sorry for my English. > > regards.
Ok, then you have no choice but to write low level code to fudge the 9bit char by using the mark/space parity control. You do this by programming the UART 8bit with parity, that makes the 9 bits. The parity you program to be manually controlled using the mark/space controls to simulate the ninth bit. When you sent the first byte of the message, you first make parity to be Mark, this makes effective 9th bit set = address byte. Send the address byte. You then make parity to be Space for remainder of message = 9th bit clear. To receive a reply just set to space parity and look for parity error for end of message. Since this is a fudge you will be at risk to miss-interpreting a real parity error, but that is the consequences of not having full 9 bit support in hardware. Anyhow good luck. It can be done, I know because we support it. It's just not an ideal solution. Until you really know what you doing in it's implementation, stay away from virtual serial ports over USB because they do not act the same as a standard serial port. They move data in blocks and will not maintain the parity manipulation synchronously with the data bytes. They will need delays to allow the control commands to transfer before sending the data etc. This will slow down your effective data rate under MDB. Also you should make an investment in a good serial coms monitor tool, that can capture and timestamp every event on the link between the host and the device. It will pay for itself easily in the time you save discovering what is really happening in the transfer. We used a tool called "ViewComm Async" from www.greenleafsoft.com. Such a tool is worth it's weight in gold. regards PhilW
On 1 oct, 01:42, "PhilW" <p...@microcoin.com> wrote:
> <juanma.freela...@gmail.com> wrote in message > > news:ef120646-80af-45a8-91c1-d53caeabeb53@59g2000hsb.googlegroups.com... > > > > > > > On 30 sep, 03:09, "PhilW" <p...@microcoin.com> wrote: > >> <juanma.freela...@gmail.com> wrote in message > > >>news:73aaa712-5e75-4674-a2b2-3a62b78569a3@p25g2000hsf.googlegroups.com.=
..
> >> On 29 sep, 20:29, James Beck <j...@reallykillersystems.com> wrote: > > >> > In article <29c16500-d3a1-4d46-a7d4- > >> > 59492ef13...@w7g2000hsa.googlegroups.com>, juanma.freela...@gmail.co=
m
> >> > says... > > >> > > On 29 sep, 17:56, James Beck <j...@reallykillersystems.com> wrote: > >> > > > In article <3834d44e-355e-4d5f-af57-87e9ec4c0a97 > >> > > > @z72g2000hsb.googlegroups.com>, juanma.freela...@gmail.com says.=
..
> > >> > > > > On 29 sep, 16:33, James Beck <j...@reallykillersystems.com> > >> > > > > wrote: > >> > > > > > In article <1da3a443-e530-487a-8cb7-e4166e206414 > >> > > > > > @i76g2000hsf.googlegroups.com>, juanma.pal...@gmail.com says=
...
> > >> > > > > > > On 29 sep, 11:11, juanma.freela...@gmail.com wrote: > >> > > > > > > > On 29 sep, 03:32, "PhilW" <p...@microcoin.com> wrote: > > >> > > > > > > > > <juanma.freela...@gmail.com> wrote in message > > >> > > > > > > > >news:c4d5b1b0-ea81-446b-ba2a-4f7ebe2811c3@l64g2000hse.g=
ooglegroups.com...
> > >> > > > > > > > > > Hi! > > >> > > > > > > > > > I'm sorry but I am not English and I speack English > >> > > > > > > > > > very > >> > > > > > > > > > bad. > > >> > > > > > > > > > My question is: How connect a PC Embedded to Vending > >> > > > > > > > > > Machine? I know > >> > > > > > > > > > that exist a protocol MDB that is used by vending > >> > > > > > > > > > machine, > >> > > > > > > > > > but this > >> > > > > > > > > > conector is different to pc conector (RS232, USB, i2=
c,
> >> > > > > > > > > > etc). Can I > >> > > > > > > > > > connect a PC Embedded by MDB? How? > > >> > > > > > > > > > Anybody understand me? > > >> > > > > > > > > > Thanks you! > > >> > > > > > > > > We understand you. > > >> > > > > > > > > Read the spec to understand what is required to connec=
t.
> > >> > > > > > > > > However, even once you have done the hardware to be ab=
le
> >> > > > > > > > > to > >> > > > > > > > > connect to a > >> > > > > > > > > PC's RS232 port you will, more than likely run into th=
e
> >> > > > > > > > > problem of the 9bit > >> > > > > > > > > char format not being supported on a std PC serial por=
t.
> > >> > > > > > > > > You can fudge it using the mark/space parity control b=
ut
> >> > > > > > > > > it > >> > > > > > > > > is not very > >> > > > > > > > > nice. > > >> > > > > > > > > Why don't you use ccTalk instead?www.cctalk.org > > >> > > > > > > > > regards > >> > > > > > > > > PhilW > > >> > > > > > > > Thanks you. > > >> > > > > > > > I dont understand all, what is "ccTalk"?? > > >> > > > > > > > regards. > >> > > > > > > > Juanma.- Ocultar texto de la cita - > > >> > > > > > > > - Mostrar texto de la cita - > > >> > > > > > > I read a little about spec of "ccTalk", and this is other > >> > > > > > > protocol, > >> > > > > > > no? > > >> > > > > > > I need "to talk" with a vending machine. The standard of > >> > > > > > > vending > >> > > > > > > machine is the MDB (i think). > > >> > > > > > > Are you understand me? > > >> > > > > > > Thanks you. > >> > > > > > > regards. > > >> > > > > > Here is a USB to MDB bridge > >> > > > > > :http://www.geocities.com/bonusdata/analyzer/mdb_interface/m=
db_interface.
> >> > > > > > htm > >> > > > > > (sorry for the spanning) > > >> > > > > > Here is the protocol > >> > > > > > :http://www.vending.org/technical/MDB_3.0.pdf > > >> > > > > >www.vending.orgiswhereyouneedto go for any info about MDC/ICP=
-
> >> > > > > >Ocultar texto de la cita - > > >> > > > > > - Mostrar texto de la cita - > > >> > > > > Thanks you!! > > >> > > > > I know this all, but the "USB to MDB" is not a good solution f=
or
> >> > > > > me, > >> > > > > should be others solutions... > > >> > > > > I am interesting in ccTal PhilW but i dont understand how appl=
y
> >> > > > > this > >> > > > > to the vending machine. > > >> > > > If the vending machine does not speak CCTalk then there is no wa=
y
> >> > > > to > >> > > > apply it at all, in this case. MDB/ICP is the way you will have =
to
> >> > > > go. > >> > > > CCTalk was designed more along the lines of gaming systems and M=
DB
> >> > > > was > >> > > > designed for vending machines and the like. Not that you couldn'=
t
> >> > > > use > >> > > > CCTalk in a vending machine, but MDB was standardized for use in > >> > > > them > >> > > > (vending machines) long ago.- Ocultar texto de la cita - > > >> > > > - Mostrar texto de la cita - > > >> > > Oh James Beck, i think that you have reason. > > >> > > My problem is how comunicate the pc embedded with vending machine > >> > > with > >> > > the protocol MDB... If the unique solution the "MDB --> USB adapte=
r"?
> >> > > If you sum the price that a pcembedded+adapter ... for one for > >> > > machine > >> > > is very expensive no? it must of having another solution, no? > > >> > > Thanks you! > >> > > regards. > > >> > Well, if you doing a one off machine, there will never be any econom=
y
> >> > of > >> > scale. If I were doing a single machine/test station, I wouldn't bal=
k
> >> > at paying the price for the adapter. If I were doing thousands of th=
em
> >> > I would look at doing something more task specific and cheaper. You =
can
> >> > implement the protocol yourself with some kind of adapter for the PC > >> > and > >> > a communications library, but that would be what the specification i=
s
> >> > for.- Ocultar texto de la cita - > > >> > - Mostrar texto de la cita - > > >> Oh, I see that you understand me :) > > >> I need to create adapter for MDB to any port (serial?) the PC ... it > >> is difficult? I know computer science, but the electronic... :( any > >> idea? > > >> Thanks you! > >> regards. > > >> An adaptor is not an easy thing to do, simply due to the fact you need=
to
> >> maintain the timing specifications of the MDB protocol. An adaptor tha=
t
> >> just > >> recieves a command from the PC, re-formats it for MDB and then sends i=
t
> >> on, > >> waits for the response and forwards that to the PC will easily break t=
he
> >> timing criteria of the protocol, considering that each char takes 1mS =
to
> >> transmit or receive. > > >> Concerning USB adaptors. Can be good providing they support, and > >> implement > >> the mark/space parity support correctly. However, you still have to > >> provide > >> low level coding to fudge the 9 bits via the mark/space parity. In > >> addition > >> you will be required to add timing delays to ensure the parity changes > >> are > >> sent over USB before transmitting the next data or parity change. We h=
ave
> >> had success with the CP2102 from silicon Labs. It is sure however, fro=
m
> >> experience, that supporting MDB over USB is a lot more painful than a > >> standard serial port. > > >> Another alternative is to acquire an add-on serial port that natively > >> supports 9 data bits at the hardware level. Not cheap, hard to find an=
d
> >> expensive. > > >> As for the vending machine implementation, you have not said, but I > >> conclude > >> that YOUare building the vending machine and YOU therefore have contro=
l
> >> over > >> the protocol to use. Unless by some specification requirement that you > >> use > >> MDB, I see no reason why you cannot use ccTalk. I believe the "protoco=
l"
> >> is > >> purely for internal machine use, aimed at connecting all peripherals t=
o a
> >> host controller, namely your embedded PC. Any external communications =
is
> >> usually by some other communications link, modem, ethernet, wifi, etc. > >> Why > >> ccTalk? It's simple and most importantly can be easily supported by an=
y
> >> PC > >> serial port, USB adaptor etc that supports the standard 8bit char leng=
th.
> >> It > >> could be any other protocol besides, that uses the 8bit data length as > >> well. > >> It's just that ccTalk is well documented, well supported and widely us=
ed.
> > >> We produce products that support both MDB and ccTalk in addition to > >> others. > >> We much prefer ccTalk for its non requirement of the 9bit data format. > > >> regards > >> PhilW- Ocultar texto de la cita - > > >> - Mostrar texto de la cita - > > > Oh, no, I am not a building the vending machine and I haven't control > > over the protocol to use, it is the problem. I need use the protocol > > standard in the most vending machine, that is, MDB. > > > Do you understand me PhilW? Sorry for my English. > > > regards. > > Ok, then you have no choice but to write low level code to fudge the 9bit > char by using the mark/space parity control. > > You do this by programming the UART =A08bit with parity, that makes the 9 > bits. > The parity you program to be manually controlled using the mark/space > controls to simulate the ninth bit. > When you sent the first byte of the message, you first make parity to be > Mark, this makes effective 9th bit set =3D address byte. Send the address > byte. > You then make parity to be Space for remainder of message =3D 9th bit cle=
ar.
> > To receive a reply just set to space parity and look for parity error for > end of message. Since this is a fudge you will be at risk to > miss-interpreting a real parity error, but that is the consequences of no=
t
> having full 9 bit support in hardware. > > Anyhow good luck. It can be done, I know because we support it. It's just > not an ideal solution. Until you really know what you doing in it's > implementation, stay away from virtual serial ports over USB because they=
do
> not act the same as a standard serial port. They move data in blocks and > will not maintain the parity manipulation synchronously with the data byt=
es.
> They will need delays to allow the control commands to transfer before > sending the data etc. This will slow down your effective data rate under > MDB. > > Also you should make an investment in a good serial coms monitor tool, th=
at
> can capture and timestamp every event on the link between the host and th=
e
> device. It will pay for itself easily in the time you save discovering wh=
at
> is really happening in the transfer. We used a tool called "ViewComm Asyn=
c"
> fromwww.greenleafsoft.com. Such a tool is worth it's weight in gold. > > regards ... > > leer m=E1s =BB- Ocultar texto de la cita - > > - Mostrar texto de la cita -
Oh, I think that I understand you. But, I have a question. How connect MDB to Serial Port, for use the monitor tool?? Thanks you!! regards. Juan.
On Wed, 1 Oct 2008 09:42:46 +1000, "PhilW" <phil@microcoin.com> wrote:

> >Ok, then you have no choice but to write low level code to fudge the 9bit >char by using the mark/space parity control.
Sorry for jumping in here so far down in the thread, but to throw out another option for the OP: Add a microcontroller as the glue between the embedded PC and the MDB device. There are probably other chips but one family that I'm familiar with that could handle this easily is the Atmel AVR ATmega. These natively support 9-bit serial (in addition to the usual other formats) and, in addition, can filter on the 9th bit set (MDB address mode). Almost like they were made to support this protocol. Pick one with dual UARTS and talk to it serially, or get one with a USB peripheral and communicate with it that way. It would take a teeny bit of work but may be cleaner, in the end, than trying to dance with the parity bit. -- Rich Webb Norfolk, VA
<juanma.freelance@gmail.com> wrote in message 
news:ed142d1d-3df5-40ee-8eea-d698f3fbb7be@m3g2000hsc.googlegroups.com...
On 1 oct, 01:42, "PhilW" <p...@microcoin.com> wrote:
> <juanma.freela...@gmail.com> wrote in message > > news:ef120646-80af-45a8-91c1-d53caeabeb53@59g2000hsb.googlegroups.com... > > > > > > > On 30 sep, 03:09, "PhilW" <p...@microcoin.com> wrote: > >> <juanma.freela...@gmail.com> wrote in message > > >>news:73aaa712-5e75-4674-a2b2-3a62b78569a3@p25g2000hsf.googlegroups.com... > >> On 29 sep, 20:29, James Beck <j...@reallykillersystems.com> wrote: > > >> > In article <29c16500-d3a1-4d46-a7d4- > >> > 59492ef13...@w7g2000hsa.googlegroups.com>, juanma.freela...@gmail.com > >> > says... > > >> > > On 29 sep, 17:56, James Beck <j...@reallykillersystems.com> wrote: > >> > > > In article <3834d44e-355e-4d5f-af57-87e9ec4c0a97 > >> > > > @z72g2000hsb.googlegroups.com>, juanma.freela...@gmail.com > >> > > > says... > > >> > > > > On 29 sep, 16:33, James Beck <j...@reallykillersystems.com> > >> > > > > wrote: > >> > > > > > In article <1da3a443-e530-487a-8cb7-e4166e206414 > >> > > > > > @i76g2000hsf.googlegroups.com>, juanma.pal...@gmail.com > >> > > > > > says... > > >> > > > > > > On 29 sep, 11:11, juanma.freela...@gmail.com wrote: > >> > > > > > > > On 29 sep, 03:32, "PhilW" <p...@microcoin.com> wrote: > > >> > > > > > > > > <juanma.freela...@gmail.com> wrote in message > > >> > > > > > > > >news:c4d5b1b0-ea81-446b-ba2a-4f7ebe2811c3@l64g2000hse.googlegroups.com... > > >> > > > > > > > > > Hi! > > >> > > > > > > > > > I'm sorry but I am not English and I speack English > >> > > > > > > > > > very > >> > > > > > > > > > bad. > > >> > > > > > > > > > My question is: How connect a PC Embedded to Vending > >> > > > > > > > > > Machine? I know > >> > > > > > > > > > that exist a protocol MDB that is used by vending > >> > > > > > > > > > machine, > >> > > > > > > > > > but this > >> > > > > > > > > > conector is different to pc conector (RS232, USB, > >> > > > > > > > > > i2c, > >> > > > > > > > > > etc). Can I > >> > > > > > > > > > connect a PC Embedded by MDB? How? > > >> > > > > > > > > > Anybody understand me? > > >> > > > > > > > > > Thanks you! > > >> > > > > > > > > We understand you. > > >> > > > > > > > > Read the spec to understand what is required to > >> > > > > > > > > connect. > > >> > > > > > > > > However, even once you have done the hardware to be > >> > > > > > > > > able > >> > > > > > > > > to > >> > > > > > > > > connect to a > >> > > > > > > > > PC's RS232 port you will, more than likely run into the > >> > > > > > > > > problem of the 9bit > >> > > > > > > > > char format not being supported on a std PC serial > >> > > > > > > > > port. > > >> > > > > > > > > You can fudge it using the mark/space parity control > >> > > > > > > > > but > >> > > > > > > > > it > >> > > > > > > > > is not very > >> > > > > > > > > nice. > > >> > > > > > > > > Why don't you use ccTalk instead?www.cctalk.org > > >> > > > > > > > > regards > >> > > > > > > > > PhilW > > >> > > > > > > > Thanks you. > > >> > > > > > > > I dont understand all, what is "ccTalk"?? > > >> > > > > > > > regards. > >> > > > > > > > Juanma.- Ocultar texto de la cita - > > >> > > > > > > > - Mostrar texto de la cita - > > >> > > > > > > I read a little about spec of "ccTalk", and this is other > >> > > > > > > protocol, > >> > > > > > > no? > > >> > > > > > > I need "to talk" with a vending machine. The standard of > >> > > > > > > vending > >> > > > > > > machine is the MDB (i think). > > >> > > > > > > Are you understand me? > > >> > > > > > > Thanks you. > >> > > > > > > regards. > > >> > > > > > Here is a USB to MDB bridge > >> > > > > > :http://www.geocities.com/bonusdata/analyzer/mdb_interface/mdb_interface. > >> > > > > > htm > >> > > > > > (sorry for the spanning) > > >> > > > > > Here is the protocol > >> > > > > > :http://www.vending.org/technical/MDB_3.0.pdf > > >> > > > > >www.vending.orgiswhereyouneedto go for any info about MDC/ICP- > >> > > > > >Ocultar texto de la cita - > > >> > > > > > - Mostrar texto de la cita - > > >> > > > > Thanks you!! > > >> > > > > I know this all, but the "USB to MDB" is not a good solution > >> > > > > for > >> > > > > me, > >> > > > > should be others solutions... > > >> > > > > I am interesting in ccTal PhilW but i dont understand how apply > >> > > > > this > >> > > > > to the vending machine. > > >> > > > If the vending machine does not speak CCTalk then there is no way > >> > > > to > >> > > > apply it at all, in this case. MDB/ICP is the way you will have > >> > > > to > >> > > > go. > >> > > > CCTalk was designed more along the lines of gaming systems and > >> > > > MDB > >> > > > was > >> > > > designed for vending machines and the like. Not that you couldn't > >> > > > use > >> > > > CCTalk in a vending machine, but MDB was standardized for use in > >> > > > them > >> > > > (vending machines) long ago.- Ocultar texto de la cita - > > >> > > > - Mostrar texto de la cita - > > >> > > Oh James Beck, i think that you have reason. > > >> > > My problem is how comunicate the pc embedded with vending machine > >> > > with > >> > > the protocol MDB... If the unique solution the "MDB --> USB > >> > > adapter"? > >> > > If you sum the price that a pcembedded+adapter ... for one for > >> > > machine > >> > > is very expensive no? it must of having another solution, no? > > >> > > Thanks you! > >> > > regards. > > >> > Well, if you doing a one off machine, there will never be any economy > >> > of > >> > scale. If I were doing a single machine/test station, I wouldn't balk > >> > at paying the price for the adapter. If I were doing thousands of > >> > them > >> > I would look at doing something more task specific and cheaper. You > >> > can > >> > implement the protocol yourself with some kind of adapter for the PC > >> > and > >> > a communications library, but that would be what the specification is > >> > for.- Ocultar texto de la cita - > > >> > - Mostrar texto de la cita - > > >> Oh, I see that you understand me :) > > >> I need to create adapter for MDB to any port (serial?) the PC ... it > >> is difficult? I know computer science, but the electronic... :( any > >> idea? > > >> Thanks you! > >> regards. > > >> An adaptor is not an easy thing to do, simply due to the fact you need > >> to > >> maintain the timing specifications of the MDB protocol. An adaptor that > >> just > >> recieves a command from the PC, re-formats it for MDB and then sends it > >> on, > >> waits for the response and forwards that to the PC will easily break > >> the > >> timing criteria of the protocol, considering that each char takes 1mS > >> to > >> transmit or receive. > > >> Concerning USB adaptors. Can be good providing they support, and > >> implement > >> the mark/space parity support correctly. However, you still have to > >> provide > >> low level coding to fudge the 9 bits via the mark/space parity. In > >> addition > >> you will be required to add timing delays to ensure the parity changes > >> are > >> sent over USB before transmitting the next data or parity change. We > >> have > >> had success with the CP2102 from silicon Labs. It is sure however, from > >> experience, that supporting MDB over USB is a lot more painful than a > >> standard serial port. > > >> Another alternative is to acquire an add-on serial port that natively > >> supports 9 data bits at the hardware level. Not cheap, hard to find and > >> expensive. > > >> As for the vending machine implementation, you have not said, but I > >> conclude > >> that YOUare building the vending machine and YOU therefore have control > >> over > >> the protocol to use. Unless by some specification requirement that you > >> use > >> MDB, I see no reason why you cannot use ccTalk. I believe the > >> "protocol" > >> is > >> purely for internal machine use, aimed at connecting all peripherals to > >> a > >> host controller, namely your embedded PC. Any external communications > >> is > >> usually by some other communications link, modem, ethernet, wifi, etc. > >> Why > >> ccTalk? It's simple and most importantly can be easily supported by any > >> PC > >> serial port, USB adaptor etc that supports the standard 8bit char > >> length. > >> It > >> could be any other protocol besides, that uses the 8bit data length as > >> well. > >> It's just that ccTalk is well documented, well supported and widely > >> used. > > >> We produce products that support both MDB and ccTalk in addition to > >> others. > >> We much prefer ccTalk for its non requirement of the 9bit data format. > > >> regards > >> PhilW- Ocultar texto de la cita - > > >> - Mostrar texto de la cita - > > > Oh, no, I am not a building the vending machine and I haven't control > > over the protocol to use, it is the problem. I need use the protocol > > standard in the most vending machine, that is, MDB. > > > Do you understand me PhilW? Sorry for my English. > > > regards. > > Ok, then you have no choice but to write low level code to fudge the 9bit > char by using the mark/space parity control. > > You do this by programming the UART 8bit with parity, that makes the 9 > bits. > The parity you program to be manually controlled using the mark/space > controls to simulate the ninth bit. > When you sent the first byte of the message, you first make parity to be > Mark, this makes effective 9th bit set = address byte. Send the address > byte. > You then make parity to be Space for remainder of message = 9th bit clear. > > To receive a reply just set to space parity and look for parity error for > end of message. Since this is a fudge you will be at risk to > miss-interpreting a real parity error, but that is the consequences of not > having full 9 bit support in hardware. > > Anyhow good luck. It can be done, I know because we support it. It's just > not an ideal solution. Until you really know what you doing in it's > implementation, stay away from virtual serial ports over USB because they > do > not act the same as a standard serial port. They move data in blocks and > will not maintain the parity manipulation synchronously with the data > bytes. > They will need delays to allow the control commands to transfer before > sending the data etc. This will slow down your effective data rate under > MDB. > > Also you should make an investment in a good serial coms monitor tool, > that > can capture and timestamp every event on the link between the host and the > device. It will pay for itself easily in the time you save discovering > what > is really happening in the transfer. We used a tool called "ViewComm > Async" > fromwww.greenleafsoft.com. Such a tool is worth it's weight in gold. > > regards ... > > leer m&#4294967295;s &#4294967295;- Ocultar texto de la cita - > > - Mostrar texto de la cita -
Oh, I think that I understand you. But, I have a question. How connect MDB to Serial Port, for use the monitor tool?? Thanks you!! regards. Juan. Juan, I think you need to read the spec. There are to many details to deal with here. To connect to the PC you must build and interface circuit. How you do that is up to you. Sect 4 of the spec tells you all you need to know. It even gives a sample schematic. The bus is a multi drop bus, many slaves with one master. You still have not made clear which one you want to be. I know you have said you are not building the vending machine, but you also have not said what you want to be, Host or slave. Are you the host controller or are you one of the slave devices. I assume you do understand that the protocol is an internal machine protocol and that you do not talk to the machine from the outside using MDB? Anyhow, as for connecting to the PC. Assuming you are the host, the interface you build will give an output of RS232 that you can connect to the PC. The monitor you simply insert in between the interface and the PC. regards PhilW
"Rich Webb" <bbew.ar@mapson.nozirev.ten> wrote in message 
news:vlj5e4t6lqqprmagrakv9tp44joer11otm@4ax.com...
> On Wed, 1 Oct 2008 09:42:46 +1000, "PhilW" <phil@microcoin.com> wrote: > >> >>Ok, then you have no choice but to write low level code to fudge the 9bit >>char by using the mark/space parity control. > > Sorry for jumping in here so far down in the thread, but to throw out > another option for the OP: Add a microcontroller as the glue between the > embedded PC and the MDB device. > > There are probably other chips but one family that I'm familiar with > that could handle this easily is the Atmel AVR ATmega. These natively > support 9-bit serial (in addition to the usual other formats) and, in > addition, can filter on the 9th bit set (MDB address mode). Almost like > they were made to support this protocol. > > Pick one with dual UARTS and talk to it serially, or get one with a USB > peripheral and communicate with it that way. It would take a teeny bit > of work but may be cleaner, in the end, than trying to dance with the > parity bit. > > -- > Rich Webb Norfolk, VA
Hi Rich, If you have look back through some of the posts I mentioned why your suggestion is not really a viable solution. It has to do with the msg response time. In Sect 3 it says that a device, or host, must respond to a msg within 5mS (5 char times). Therefore if you place a translator in series you will probably blow that out of the water. By how much will depend on your implementation. If you simply receive the command into the translator, convert it and resend it to the device, your response time will be msg length(in chars @ 1mS each) * 2 + device response time at best. with a message up to 36 bytes in length will be 72mS + device response time. See what I mean. A better way would be to receive the msg from the host and convert on the fly, retransmitting 1 char behind. At least you may be able to reduce it down to 2mS + device response time. That only gives you a 3mS response time window in the device to meet spec. On top of that, in both the above cases, you will need to implement how you are going to talk to the PC and keep the msgs in synch without an address/msg end byte (9th bit). Am I making sense? regards PhilW
On 1 oct, 07:12, "PhilW" <p...@microcoin.com> wrote:
> <juanma.freela...@gmail.com> wrote in message > > news:ed142d1d-3df5-40ee-8eea-d698f3fbb7be@m3g2000hsc.googlegroups.com... > On 1 oct, 01:42, "PhilW" <p...@microcoin.com> wrote: > > > <juanma.freela...@gmail.com> wrote in message > > >news:ef120646-80af-45a8-91c1-d53caeabeb53@59g2000hsb.googlegroups.com... > > > > On 30 sep, 03:09, "PhilW" <p...@microcoin.com> wrote: > > >> <juanma.freela...@gmail.com> wrote in message > > > >>news:73aaa712-5e75-4674-a2b2-3a62b78569a3@p25g2000hsf.googlegroups.co=
m...
> > >> On 29 sep, 20:29, James Beck <j...@reallykillersystems.com> wrote: > > > >> > In article <29c16500-d3a1-4d46-a7d4- > > >> > 59492ef13...@w7g2000hsa.googlegroups.com>, juanma.freela...@gmail.=
com
> > >> > says... > > > >> > > On 29 sep, 17:56, James Beck <j...@reallykillersystems.com> wrot=
e:
> > >> > > > In article <3834d44e-355e-4d5f-af57-87e9ec4c0a97 > > >> > > > @z72g2000hsb.googlegroups.com>, juanma.freela...@gmail.com > > >> > > > says... > > > >> > > > > On 29 sep, 16:33, James Beck <j...@reallykillersystems.com> > > >> > > > > wrote: > > >> > > > > > In article <1da3a443-e530-487a-8cb7-e4166e206414 > > >> > > > > > @i76g2000hsf.googlegroups.com>, juanma.pal...@gmail.com > > >> > > > > > says... > > > >> > > > > > > On 29 sep, 11:11, juanma.freela...@gmail.com wrote: > > >> > > > > > > > On 29 sep, 03:32, "PhilW" <p...@microcoin.com> wrote: > > > >> > > > > > > > > <juanma.freela...@gmail.com> wrote in message > > > >> > > > > > > > >news:c4d5b1b0-ea81-446b-ba2a-4f7ebe2811c3@l64g2000hse=
.googlegroups.com...
> > > >> > > > > > > > > > Hi! > > > >> > > > > > > > > > I'm sorry but I am not English and I speack Englis=
h
> > >> > > > > > > > > > very > > >> > > > > > > > > > bad. > > > >> > > > > > > > > > My question is: How connect a PC Embedded to Vendi=
ng
> > >> > > > > > > > > > Machine? I know > > >> > > > > > > > > > that exist a protocol MDB that is used by vending > > >> > > > > > > > > > machine, > > >> > > > > > > > > > but this > > >> > > > > > > > > > conector is different to pc conector (RS232, USB, > > >> > > > > > > > > > i2c, > > >> > > > > > > > > > etc). Can I > > >> > > > > > > > > > connect a PC Embedded by MDB? How? > > > >> > > > > > > > > > Anybody understand me? > > > >> > > > > > > > > > Thanks you! > > > >> > > > > > > > > We understand you. > > > >> > > > > > > > > Read the spec to understand what is required to > > >> > > > > > > > > connect. > > > >> > > > > > > > > However, even once you have done the hardware to be > > >> > > > > > > > > able > > >> > > > > > > > > to > > >> > > > > > > > > connect to a > > >> > > > > > > > > PC's RS232 port you will, more than likely run into =
the
> > >> > > > > > > > > problem of the 9bit > > >> > > > > > > > > char format not being supported on a std PC serial > > >> > > > > > > > > port. > > > >> > > > > > > > > You can fudge it using the mark/space parity control > > >> > > > > > > > > but > > >> > > > > > > > > it > > >> > > > > > > > > is not very > > >> > > > > > > > > nice. > > > >> > > > > > > > > Why don't you use ccTalk instead?www.cctalk.org > > > >> > > > > > > > > regards > > >> > > > > > > > > PhilW > > > >> > > > > > > > Thanks you. > > > >> > > > > > > > I dont understand all, what is "ccTalk"?? > > > >> > > > > > > > regards. > > >> > > > > > > > Juanma.- Ocultar texto de la cita - > > > >> > > > > > > > - Mostrar texto de la cita - > > > >> > > > > > > I read a little about spec of "ccTalk", and this is othe=
r
> > >> > > > > > > protocol, > > >> > > > > > > no? > > > >> > > > > > > I need "to talk" with a vending machine. The standard of > > >> > > > > > > vending > > >> > > > > > > machine is the MDB (i think). > > > >> > > > > > > Are you understand me? > > > >> > > > > > > Thanks you. > > >> > > > > > > regards. > > > >> > > > > > Here is a USB to MDB bridge > > >> > > > > > :http://www.geocities.com/bonusdata/analyzer/mdb_interface=
/mdb_interface.
> > >> > > > > > htm > > >> > > > > > (sorry for the spanning) > > > >> > > > > > Here is the protocol > > >> > > > > > :http://www.vending.org/technical/MDB_3.0.pdf > > > >> > > > > >www.vending.orgiswhereyouneedtogo for any info about MDC/IC=
P-
> > >> > > > > >Ocultar texto de la cita - > > > >> > > > > > - Mostrar texto de la cita - > > > >> > > > > Thanks you!! > > > >> > > > > I know this all, but the "USB to MDB" is not a good solution > > >> > > > > for > > >> > > > > me, > > >> > > > > should be others solutions... > > > >> > > > > I am interesting in ccTal PhilW but i dont understand how ap=
ply
> > >> > > > > this > > >> > > > > to the vending machine. > > > >> > > > If the vending machine does not speak CCTalk then there is no =
way
> > >> > > > to > > >> > > > apply it at all, in this case. MDB/ICP is the way you will hav=
e
> > >> > > > to > > >> > > > go. > > >> > > > CCTalk was designed more along the lines of gaming systems and > > >> > > > MDB > > >> > > > was > > >> > > > designed for vending machines and the like. Not that you could=
n't
> > >> > > > use > > >> > > > CCTalk in a vending machine, but MDB was standardized for use =
in
> > >> > > > them > > >> > > > (vending machines) long ago.- Ocultar texto de la cita - > > > >> > > > - Mostrar texto de la cita - > > > >> > > Oh James Beck, i think that you have reason. > > > >> > > My problem is how comunicate the pc embedded with vending machin=
e
> > >> > > with > > >> > > the protocol MDB... If the unique solution the "MDB --> USB > > >> > > adapter"? > > >> > > If you sum the price that a pcembedded+adapter ... for one for > > >> > > machine > > >> > > is very expensive no? it must of having another solution, no? > > > >> > > Thanks you! > > >> > > regards. > > > >> > Well, if you doing a one off machine, there will never be any econ=
omy
> > >> > of > > >> > scale. If I were doing a single machine/test station, I wouldn't b=
alk
> > >> > at paying the price for the adapter. If I were doing thousands of > > >> > them > > >> > I would look at doing something more task specific and cheaper. Yo=
u
> > >> > can > > >> > implement the protocol yourself with some kind of adapter for the =
PC
> > >> > and > > >> > a communications library, but that would be what the specification=
is
> > >> > for.- Ocultar texto de la cita - > > > >> > - Mostrar texto de la cita - > > > >> Oh, I see that you understand me :) > > > >> I need to create adapter for MDB to any port (serial?) the PC ... it > > >> is difficult? I know computer science, but the electronic... :( any > > >> idea? > > > >> Thanks you! > > >> regards. > > > >> An adaptor is not an easy thing to do, simply due to the fact you ne=
ed
> > >> to > > >> maintain the timing specifications of the MDB protocol. An adaptor t=
hat
> > >> just > > >> recieves a command from the PC, re-formats it for MDB and then sends=
it
> > >> on, > > >> waits for the response and forwards that to the PC will easily break > > >> the > > >> timing criteria of the protocol, considering that each char takes 1m=
S
> > >> to > > >> transmit or receive. > > > >> Concerning USB adaptors. Can be good providing they support, and > > >> implement > > >> the mark/space parity support correctly. However, you still have to > > >> provide > > >> low level coding to fudge the 9 bits via the mark/space parity. In > > >> addition > > >> you will be required to add timing delays to ensure the parity chang=
es
> > >> are > > >> sent over USB before transmitting the next data or parity change. We > > >> have > > >> had success with the CP2102 from silicon Labs. It is sure however, f=
rom
> > >> experience, that supporting MDB over USB is a lot more painful than =
a
> > >> standard serial port. > > > >> Another alternative is to acquire an add-on serial port that nativel=
y
> > >> supports 9 data bits at the hardware level. Not cheap, hard to find =
and
> > >> expensive. > > > >> As for the vending machine implementation, you have not said, but I > > >> conclude > > >> that YOUare building the vending machine and YOU therefore have cont=
rol
> > >> over > > >> the protocol to use. Unless by some specification requirement that y=
ou
> > >> use > > >> MDB, I see no reason why you cannot use ccTalk. I believe the > > >> "protocol" > > >> is > > >> purely for internal machine use, aimed at connecting all peripherals=
to
> > >> a > > >> host controller, namely your embedded PC. Any external communication=
s
> > >> is > > >> usually by some other communications link, modem, ethernet, wifi, et=
c.
> > >> Why > > >> ccTalk? It's simple and most importantly can be easily supported by =
any
> > >> PC > > >> serial port, USB adaptor etc that supports the standard 8bit char > > >> length. > > >> It > > >> could be any other protocol besides, that uses the 8bit data length =
as
> > >> well. > > >> It's just that ccTalk is well documented, well supported and widely > > >> used. > > > >> We produce products that support both MDB and ccTalk in addition to > > >> others. > > >> We much prefer ccTalk for its non requirement of the 9bit data forma=
t.
> > > >> regards > > >> PhilW- Ocultar texto de la cita - > > > >> - Mostrar texto de la cita - > > > > Oh, no, I am not a building the vending machine and I haven't control > > > over the protocol to use, it is the problem. I need use the protocol > > > standard in the most vending machine, that is, MDB. > > > > Do you understand me PhilW? Sorry for my English. > > > > regards. > > > Ok, then you have no choice but to write low level code to fudge the 9b=
it
> > char by using the mark/space parity control. > > > You do this by programming the UART 8bit with parity, that makes the 9 > > bits. > > The parity you program to be manually controlled using the mark/space > > controls to simulate the ninth bit. > > When you sent the first byte of the message, you first make parity to b=
e
> > Mark, this makes effective 9th bit set =3D address byte. Send the addre=
ss
> > byte. > > You then make parity to be Space for remainder of message =3D 9th bit c=
lear.
> > > To receive a reply just set to space parity and look for parity error f=
or
> > end of message. Since this is a fudge you will be at risk to > > miss-interpreting a real parity error, but that is the consequences of =
not
> > having full 9 bit support in hardware. > > > Anyhow good luck. It can be done, I know because we support it. It's ju=
st
> > not an ideal solution. Until you really know what you doing in it's > > implementation, stay away from virtual serial ports over USB because th=
ey
> > do > > not act the same as a standard serial port. They move data in blocks an=
d
> > will not maintain the parity manipulation synchronously with the data > > bytes. > > They will need delays to allow the control commands to transfer before > > sending the data etc. This will slow down your effective data rate unde=
r
> > MDB. > > > Also you should make an investment in a good serial coms monitor tool, > > that > > can capture and timestamp every event on the link between the host and =
the
> > device. It will pay for itself easily in the time you save discovering > > what > > is really happening in the transfer. We used a tool called "ViewComm > > Async" > > fromwww.greenleafsoft.com. Such a tool is worth it's weight in gold. > > > regards ... > > > leer m=E1s =BB- Ocultar texto de la cita - > > > - Mostrar texto de la cita - > > Oh, I think that I understand you. > > But, I have a question. How connect MDB to Serial Port, for use the > monitor tool?? > > Thanks you!! > regards. > Juan. > > Juan, > I think you need to read the spec. There are to many details to deal with > here. > > To connect to the PC you must build and interface circuit. How you do tha=
t
> is up to you. > Sect 4 of the spec tells you all you need to know. It even gives a sample > schematic. > > The bus is a multi drop bus, many slaves with one master. > You still have not made clear which one you want to be. I know you have s=
aid
> you are not building the vending machine, but you also have not said what > you want to be, Host or slave. Are you the host controller or are you one=
of
> the slave devices. > I assume you do understand that the protocol is an internal machine proto=
col
> and that you do not talk to the machine from the outside using MDB? > > Anyhow, as for connecting to the PC. Assuming you are the host, the > interface you build will give an output of RS232 that you can connect to =
the
> PC. The monitor you simply insert in between the interface and the PC. > > regards > PhilW
Yes, I want that my pc embedded will be a Slave. I want that my pc embedded will be as a Communications Gateway (Section 8) for to receive all the information from the VMC. It is possible? regards. Juan.