Announcement

Collapse
No announcement yet.

Controlling RTS and other IO

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Controlling RTS and other IO

    Is there any sample code that demonstrates how to turn RTS on and Off
    and how to use other IO?

    ------------------

  • #2
    Check out the OPEN COM section of the reference guide.
    That pretty much explains everything.


    ------------------
    There are no atheists in a fox hole or the morning of a math test.
    If my flag offends you, I'll help you pack.

    Comment


    • #3
      The OPEN COM section describes how to open with certain params set. What I am looking to do is to
      turn the RTS line on or off without opening and closing the com continuously.

      Also, I see many references to the PB Communications library. What is the name of the
      file? I have downloaded several that *might* be it but not certain.

      Thanks
      Tim

      ------------------

      Comment


      • #4
        You simply need to set/clear bit 1 (zero based) of the UART's modem control register (set=RTS LOW, clear=RTS HIGH). It should be possible for you to adapt some of the COMMUNIT.BAS code that comes with PB/DOS 3.5 to this task...


        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


        • #5
          Lance,

          Thanks for your response to my question. For one final one, I have printed
          out both PDF files and have gone through them fairly extensively
          to gain a general understanging of PB and see what built in commands are avaialble.
          I do not recall seeing anywhere these options to clear, set high low etc.
          Can you give me an aproximate location in either manual where I
          would find this?

          Thanks
          Tim

          ------------------

          Comment


          • #6
            This is not done by individual PowerBASIC commands, but by the process
            we like to refer to as "programming". Please see the example code in the
            COMMUNIT.BAS file that comes with PB/DOS.

            ------------------
            Tom Hanlin
            PowerBASIC Staff

            Comment


            • #7
              Tom,

              Thanks for the direction. I am from the land of VB and so some of this is new/different
              for me. Obviously you had to *see* it somewhere to *know* to use those command sets.

              Any good books you could recommend to help familiarize myself with this form of basic?

              Thanks
              Tim


              ------------------

              Comment


              • #8
                The books that come with PB/DOS are pretty comprehensive. Suggesting other reading material is a little difficult without knowing your "level of skill". IOW, for complete newbies to programming, the Learning Basic book by Don Inman is a good start, but the supplied manuals should cover much the same ground (and more!).

                Personally, I recommend reading through the manuals a couple of times - that helped me a LOT.

                Next, try studying some of the code supplied with PB/DOS, and what has posted on these forums here (and in the Source Code forum, and SRCCODE archive forum), PLUS what you can find in the downloads section at http://www.powerbasic.com/files/pub/pbdos

                Other good sites for information and source code can be found in the LINK section at http://www.powerbasic.com/support/links/ and at http://www.basicguru.com

                I hope this helps!



                ------------------
                Lance
                PowerBASIC Support
                mailto:[email protected][email protected]</A>
                Lance
                mailto:[email protected]

                Comment


                • #9
                  Lance,
                  Are the manuals you are speaking of the 2 supplied in PDF format
                  or are there others as well?
                  Tmi

                  ------------------

                  Comment


                  • #10
                    Those are the ones, Tim. You can also order these in printed form, if you like.

                    ------------------
                    Tom Hanlin
                    PowerBASIC Staff

                    Comment

                    Working...
                    X