Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Hardware & Devices
  4. Serial Int Question [modified]

Serial Int Question [modified]

Scheduled Pinned Locked Moved Hardware & Devices
question
23 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Luc Pattyn

    is this device providing SClk or accepting SClk ? is SData bidirectional, or do you need a one-way communication only ? if accepting SClk, uni-directional communication, and limited amount of data per second (say 100 upto 300 B/s) you could manage hooking it to some of the control lines of a serial port. But is sounds more like an I2C, an SPI or an SCI interface, and then you will not be able to attach it without some extra electronics. So you would have to find out more, and tell us or Google, before you can plan an interface strategy. :)

    Luc Pattyn [Forum Guidelines] [My Articles]


    this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


    N Offline
    N Offline
    NormDroid
    wrote on last edited by
    #8

    Luc Pattyn wrote:

    is this device providing SClk or accepting SClk ?

    Providing Clk

    Luc Pattyn wrote:

    is SData bidirectional, or do you need a one-way communication only ?

    One way It's a Coin Validator (Money Controls, formerly Coin Controls) Sentinal unit. It has a parallel interface (that works with a credit control unit) and a serial interface which has a strange port on it (similar to a uk telephone socket, but fractionly different. The manual for this is here http://www.arcade-inferno.com/cabinet/Sentinel+Tech+Manual+V0.pdf[^] Cheers.

    Roger Irrelevant "he's completely hatstand"

    L 1 Reply Last reply
    0
    • N NormDroid

      Ali, know of a good Sync/Async convertor?

      Roger Irrelevant "he's completely hatstand"

      L Offline
      L Offline
      LittleYellowBird
      wrote on last edited by
      #9

      Hi Roger, No I am afraid not, its the sort of thing I do all the time with a microprocessor - but I have never used an convertor. I even had a quick look for you at a couple of companies that might do one - but no joy. :sigh: I did find a USB convertor but I know nothing abaout it, link:- www.jovasolutions.com/hardware/tims0100_overview.htm Sorry, perhaps someone else can help, Good luck,

      Ali

      N 1 Reply Last reply
      0
      • N NormDroid

        Luc Pattyn wrote:

        is this device providing SClk or accepting SClk ?

        Providing Clk

        Luc Pattyn wrote:

        is SData bidirectional, or do you need a one-way communication only ?

        One way It's a Coin Validator (Money Controls, formerly Coin Controls) Sentinal unit. It has a parallel interface (that works with a credit control unit) and a serial interface which has a strange port on it (similar to a uk telephone socket, but fractionly different. The manual for this is here http://www.arcade-inferno.com/cabinet/Sentinel+Tech+Manual+V0.pdf[^] Cheers.

        Roger Irrelevant "he's completely hatstand"

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #10

        OK, I glimpsed through that manual, the interface part at least, and its "serial interface" is an I2C interface (they call it IIC). As such there are a couple of problems: - you need bidirectional lines for both SClk and SData; that would take the first diagram in paragraph 3.3 twice; and it would require two input and two output pins on the PC; that is exactly what is available as control pins on a serial port. - biggest worry is the PC (not) being able to succesfully receive data all the time; when the device speaks, it sends both SClk and SData at its own pace. The PC should feel every edge on those two inputs to establish good communication; PCs being busy doing all kinds of stuff, are not good at such real-time activities. So a true convertor (such as the Jova item) would be more than welcome; but then it seems too expensive. I would suggest you look for a cheaper convertor, either serial/I2C or USB/I2C (would be more valuable in the long run). :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


        N 1 Reply Last reply
        0
        • L LittleYellowBird

          Hi Roger, No I am afraid not, its the sort of thing I do all the time with a microprocessor - but I have never used an convertor. I even had a quick look for you at a couple of companies that might do one - but no joy. :sigh: I did find a USB convertor but I know nothing abaout it, link:- www.jovasolutions.com/hardware/tims0100_overview.htm Sorry, perhaps someone else can help, Good luck,

          Ali

          N Offline
          N Offline
          NormDroid
          wrote on last edited by
          #11

          Ali found this; http://en.wikipedia.org/wiki/I%C2%B2C[^], look at bottom of page for links to USB 2 I2C products. BTW, names Norm not Roger :)

          Roger Irrelevant "he's completely hatstand"

          L 1 Reply Last reply
          0
          • L Luc Pattyn

            OK, I glimpsed through that manual, the interface part at least, and its "serial interface" is an I2C interface (they call it IIC). As such there are a couple of problems: - you need bidirectional lines for both SClk and SData; that would take the first diagram in paragraph 3.3 twice; and it would require two input and two output pins on the PC; that is exactly what is available as control pins on a serial port. - biggest worry is the PC (not) being able to succesfully receive data all the time; when the device speaks, it sends both SClk and SData at its own pace. The PC should feel every edge on those two inputs to establish good communication; PCs being busy doing all kinds of stuff, are not good at such real-time activities. So a true convertor (such as the Jova item) would be more than welcome; but then it seems too expensive. I would suggest you look for a cheaper convertor, either serial/I2C or USB/I2C (would be more valuable in the long run). :)

            Luc Pattyn [Forum Guidelines] [My Articles]


            this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


            N Offline
            N Offline
            NormDroid
            wrote on last edited by
            #12

            Luc Thanks for all the information, I was way off mark thinking I could just attach this device straight into a serial port. Just for background information, I aquired the device from a Sega Mech Tech Aracde Machine (Circa 1989) the coin acceptor was connected onto the game board. I was hoping to reuse the coin acceptor after hooking it up and reading some manuals, I was guessing that the 'Serial Interface' was a true PC serial interface. Now I release this kind of device is plumbed into chip circuitry. I found a bit more into here: http://en.wikipedia.org/wiki/I%C2%B2C[^] Again thanks for you help.

            Roger Irrelevant "he's completely hatstand"

            L 1 Reply Last reply
            0
            • N NormDroid

              Luc Thanks for all the information, I was way off mark thinking I could just attach this device straight into a serial port. Just for background information, I aquired the device from a Sega Mech Tech Aracde Machine (Circa 1989) the coin acceptor was connected onto the game board. I was hoping to reuse the coin acceptor after hooking it up and reading some manuals, I was guessing that the 'Serial Interface' was a true PC serial interface. Now I release this kind of device is plumbed into chip circuitry. I found a bit more into here: http://en.wikipedia.org/wiki/I%C2%B2C[^] Again thanks for you help.

              Roger Irrelevant "he's completely hatstand"

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #13

              Hi, you're welcome. It is a common mistake to think that anything called "serial interface" would fit the serial port of a PC, which implements just one kind of serial interface (technically it is an RS232C). The Wikipedia article describes the interface of your coin acceptor (that is barring possible historical evolution in I2C itself). :)

              Luc Pattyn [Forum Guidelines] [My Articles]


              this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


              N 1 Reply Last reply
              0
              • L Luc Pattyn

                Hi, you're welcome. It is a common mistake to think that anything called "serial interface" would fit the serial port of a PC, which implements just one kind of serial interface (technically it is an RS232C). The Wikipedia article describes the interface of your coin acceptor (that is barring possible historical evolution in I2C itself). :)

                Luc Pattyn [Forum Guidelines] [My Articles]


                this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


                N Offline
                N Offline
                NormDroid
                wrote on last edited by
                #14

                Now it's down to finding a cheap USB 2 I2C convertor, the sucking the out the data. I suppose want I attempt is replacing the function of the Credit Control Board. The way I see it the Coin Validator is a dumb (black) box that sends out signals when a coin is placed into it. The Credit Control Board works out the coinage and totals and spits outs credits accordingly. So without a Credit Control Board, I left to hook up my own. All very interesting stuff when you get into the finer details :)

                Roger Irrelevant "he's completely hatstand"

                L 1 Reply Last reply
                0
                • N NormDroid

                  Now it's down to finding a cheap USB 2 I2C convertor, the sucking the out the data. I suppose want I attempt is replacing the function of the Credit Control Board. The way I see it the Coin Validator is a dumb (black) box that sends out signals when a coin is placed into it. The Credit Control Board works out the coinage and totals and spits outs credits accordingly. So without a Credit Control Board, I left to hook up my own. All very interesting stuff when you get into the finer details :)

                  Roger Irrelevant "he's completely hatstand"

                  L Offline
                  L Offline
                  Luc Pattyn
                  wrote on last edited by
                  #15

                  Hi, if you are in to both electronics and microcontroller software, then the easiest way would be to buy some prototype or demo board for a microcontroller having an on-board serial port (RS232C!) and four or more programmable I/O pins (or a real I2C, but that is not really necessary since you can dedicate the entire microcontroller to watching those two input pins). There are lots of those around, most of them cheap, and their development tools most often are free. Connecting the coin thing to it, and adding some embedded software would be al that is required to get a real PC peripheral; pretty soon after that PC's with RS232C will become obsolete, and you will need a USB-to-RS232C cable, but these currently are rather cheap. If your idea of software development is strictly PC-based, and you are unfamiliar with embedded systems, it would be a challenge to get things working without having the observability and debugging tools you have in say Visual Studio... The choice is yours. Good luck!

                  Luc Pattyn [Forum Guidelines] [My Articles]


                  this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


                  N 1 Reply Last reply
                  0
                  • L Luc Pattyn

                    Hi, if you are in to both electronics and microcontroller software, then the easiest way would be to buy some prototype or demo board for a microcontroller having an on-board serial port (RS232C!) and four or more programmable I/O pins (or a real I2C, but that is not really necessary since you can dedicate the entire microcontroller to watching those two input pins). There are lots of those around, most of them cheap, and their development tools most often are free. Connecting the coin thing to it, and adding some embedded software would be al that is required to get a real PC peripheral; pretty soon after that PC's with RS232C will become obsolete, and you will need a USB-to-RS232C cable, but these currently are rather cheap. If your idea of software development is strictly PC-based, and you are unfamiliar with embedded systems, it would be a challenge to get things working without having the observability and debugging tools you have in say Visual Studio... The choice is yours. Good luck!

                    Luc Pattyn [Forum Guidelines] [My Articles]


                    this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


                    N Offline
                    N Offline
                    NormDroid
                    wrote on last edited by
                    #16

                    Luc Pattyn wrote:

                    If your idea of software development is strictly PC-based, and you are unfamiliar with embedded systems, it would be a challenge to get things working without having the observability and debugging tools you have in say Visual Studio...

                    It is but I have used assembly in the past (wrote software for operating system many moons back), I'm not scared of a challange. The idea of a broad with programmable pins sound good, I'm I write in saying the software to program the chip is PICBASIC? Can you provide a link with an example of a board which would 'do' the job. Again Luc thanks for all your time you taken to answer questions. :beer:

                    Roger Irrelevant "he's completely hatstand"

                    L 1 Reply Last reply
                    0
                    • N NormDroid

                      Luc Pattyn wrote:

                      If your idea of software development is strictly PC-based, and you are unfamiliar with embedded systems, it would be a challenge to get things working without having the observability and debugging tools you have in say Visual Studio...

                      It is but I have used assembly in the past (wrote software for operating system many moons back), I'm not scared of a challange. The idea of a broad with programmable pins sound good, I'm I write in saying the software to program the chip is PICBASIC? Can you provide a link with an example of a board which would 'do' the job. Again Luc thanks for all your time you taken to answer questions. :beer:

                      Roger Irrelevant "he's completely hatstand"

                      L Offline
                      L Offline
                      Luc Pattyn
                      wrote on last edited by
                      #17

                      Hi, I am not up-to-date on what is available from whom in this area, Microchip sure would be a candidate. You have to be careful about choice of programming language; I would be inclined to go with either assembly or C (or a subset, an embedded C, whatever they call it). PICBASIC might be an interpreted thing, and as such I can not judge it's speed without investiogating it. It would be disappointing if they made it very powerful and somewhat slow, so much so that it no longer can watch a few I/O pins, I don't know. If you feel up to it, go for it; if you think you made your final choice and want my opinion on it, you'll know how to reach me. :)

                      Luc Pattyn [Forum Guidelines] [My Articles]


                      this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google


                      1 Reply Last reply
                      0
                      • N NormDroid

                        Ali found this; http://en.wikipedia.org/wiki/I%C2%B2C[^], look at bottom of page for links to USB 2 I2C products. BTW, names Norm not Roger :)

                        Roger Irrelevant "he's completely hatstand"

                        L Offline
                        L Offline
                        LittleYellowBird
                        wrote on last edited by
                        #18

                        norm .net wrote:

                        BTW, names Norm not Roger

                        :-O:-O:-O:-O Just looked down at the bottom of your post, in a hurry, saw Roger and typed it! :-O:-O:-O:-O Soz So Peter, I read the other part of the thread and it looks like you have discovered it is I2C which is a good move forward. I would do it with a micro myself Stanley - its sounds like you are leaning that way, give it a go, micros are fun Joe! Have a great weekend Colin, :-D Regards,

                        Ali

                        N 1 Reply Last reply
                        0
                        • L LittleYellowBird

                          norm .net wrote:

                          BTW, names Norm not Roger

                          :-O:-O:-O:-O Just looked down at the bottom of your post, in a hurry, saw Roger and typed it! :-O:-O:-O:-O Soz So Peter, I read the other part of the thread and it looks like you have discovered it is I2C which is a good move forward. I would do it with a micro myself Stanley - its sounds like you are leaning that way, give it a go, micros are fun Joe! Have a great weekend Colin, :-D Regards,

                          Ali

                          N Offline
                          N Offline
                          NormDroid
                          wrote on last edited by
                          #19

                          Thanks Margret ;)

                          Roger Irrelevant "he's completely hatstand"

                          L 2 Replies Last reply
                          0
                          • N NormDroid

                            Thanks Margret ;)

                            Roger Irrelevant "he's completely hatstand"

                            L Offline
                            L Offline
                            LittleYellowBird
                            wrote on last edited by
                            #20

                            :laugh:

                            Ali

                            1 Reply Last reply
                            0
                            • N NormDroid

                              I have a serial interface on a device with 6 pins: 1 NC 2 0v 3 +12v 4 SClk 5 SData 6 0v Now I want to wire this to a serial Port on a PC, I have wired the 12v and 0v to a molex, but I need to work out were to wire SClk and SData, I'm guessing (on previous experience) that I should be wiring SClk to DTR and SDATA to RX on the RS232. I'm I warm or completely cold. BTW: The 12v and 0v and input supply voltages. -- modified at 9:02 Thursday 9th August, 2007 -- modified at 9:07 Thursday 9th August, 2007

                              Roger Irrelevant "he's completely hatstand"

                              C Offline
                              C Offline
                              cp9876
                              wrote on last edited by
                              #21

                              Just reading this thread it appears that you want to interface to an I2C device. For simply writing to the device, it is pretty easy to do this using the PC parallel port. I have intefaces to many ICs that use this interface in this manner. It is even easier if you have an old PC running Win98, as there you could simply write to the parallel port using an OUT instruction. On OSs based on NT (i.e. Win2k and XP), you need a device driver. To give you an idea, here is a code snippet synchronously clocking n bits of data out of hte parallel port on a Win98 machine:

                              const int PORT = 0x378; // base address of LPT1 on

                              const char ENABLE = 1; // syn enable PC Pin # 2
                              const char CLOCK = 2; // syn clock PC Pin # 3
                              const char DATA = 4; // syn data PC Pin # 4

                              char state;

                              void OutputP(long data, int n, bool bSync)
                              {
                              // take enable low
                              state &= ~ENABLE;

                              outp(PORT, state);

                              long current_bit = pow(2,n-1);

                              for (int i = 0 ; i < n ; i++)
                              {
                              // set data bit
                              if (data & current_bit)
                              state |= DATA;
                              else
                              state &= ~DATA;
                              // output data bit
                              outp(PORT, state);

                               // clock it
                               state |= CLOCK;
                               outp(PORT, state);
                              
                               state &= ~CLOCK;
                               outp(PORT, state);
                              
                               current\_bit /= 2;
                               }
                              

                              // take enable high
                              state = ENABLE; // ensures all other lines are low
                              if (bSync)
                              state |= SYNC;
                              outp(PORT, state);
                              }

                              depending on the speed of your PC you may need some delays to slow down the clocking.


                              Peter "Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."

                              1 Reply Last reply
                              0
                              • N NormDroid

                                Thanks Margret ;)

                                Roger Irrelevant "he's completely hatstand"

                                L Offline
                                L Offline
                                LittleYellowBird
                                wrote on last edited by
                                #22

                                Hi Norm, I came across this today and as they say "I thought of you", its an I2C USB Interface! I bet not many women have said that to you! :-D http://www.elektor.com/default.lynkx?pointer=1-28-16120-16357-16368-26623 Anyway, I had to pass it on in case it might be handy ..... Cheers,

                                Ali

                                N 1 Reply Last reply
                                0
                                • L LittleYellowBird

                                  Hi Norm, I came across this today and as they say "I thought of you", its an I2C USB Interface! I bet not many women have said that to you! :-D http://www.elektor.com/default.lynkx?pointer=1-28-16120-16357-16368-26623 Anyway, I had to pass it on in case it might be handy ..... Cheers,

                                  Ali

                                  N Offline
                                  N Offline
                                  NormDroid
                                  wrote on last edited by
                                  #23

                                  Alison Pentland wrote:

                                  I came across this today and as they say "I thought of you", its an I2C USB Interface! I bet not many women have said that to you!

                                  Oh you're just one of millions ;) Had a look: articles date around 2004, there are newer ones, I'm just about buy a device under £20 USB->IC2, apparently these things are getting popular, whats needed is somebody to design a board and manufactor in China and bingo $$$. Sell for under £10 including an API:~ -> Norm <-

                                  Roger Irrelevant "he's completely hatstand"

                                  1 Reply Last reply
                                  0
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • World
                                  • Users
                                  • Groups