Shop OBEX P1 Docs P2 Docs Learn Events
SX/B 2.0 Compiler Installation — Parallax Forums

SX/B 2.0 Compiler Installation

Bill ChennaultBill Chennault Posts: 1,198
edited 2009-03-12 02:59 in General Discussion
All--

I am doing something wrong in the SX/B 2.0 Beta·compiler installation. Will you please guide me?

I installed the unzipped files to C:\Program Files\Parallax Inc\SX-Key v3.2.92\Compilers\SXB, overwriting the previous files. The IDE still calls up the old Help file. (This is my sole indication that the IDE does not see the new compiler, since the IDE is not using the new SX 2.0 pdf help file.)

Any guidance would be appreciated!

--Bill

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.

Comments

  • PJMontyPJMonty Posts: 983
    edited 2009-03-10 23:24
    Bill,

    Click on Help->About. When the "About" dialog appears, click on the text that says "IDE Ver." Each click will display the version number of the next component in the IDE. The 2nd click should show you the version number of SX/B that you are running.

    Thanks,
    PeterM
  • JonnyMacJonnyMac Posts: 9,214
    edited 2009-03-10 23:32
    Bill,

    We're still in Beta -- the 2.0 Help file hasn't been released yet (still adjusting with the slew of changes that have come up lately). Get the "What's New" doc from the sticky thread and drop it on your desktop for reference.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2009-03-10 23:40
    PeterM and JonnyMac--

    Thanks!

    PeterM, I believe Ugha told me the same thing and I forgot it. Thank you so much for telling me.

    JonnyMac, the Help file is not released yet? Gee. Why can't you hit a target that changes almost EVERY HOUR? [noparse]:)[/noparse]

    I downloaded the "What's New" document last night. Needless to say, I have not read it, yet.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2009-03-10 23:59
    JonnyMac and PeterM--

    PeterM: Perfect! Thank you!

    JonnyMac, I pinned the "What's New" file to the deskstop.

    I am having an issue with my SERIN instruction (code converted from a working Stamp model), but I need to play with it some more before asking questions . . . other than how do I figure out the appropriate·baud for the SX48 running at 20mhz? (9600 would be fine. Faster would be better, but not if it is problematic during development with my eb501. My impression is that the baud numbers are based on the FREQ number, but I still don't know anything about the actual numbers.)

    Thank you both.

    --Bill



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • JonnyMacJonnyMac Posts: 9,214
    edited 2009-03-11 00:58
    The great thing about SX/B is that you don't have to "figure out" the baud stuff like you do with PBASIC 2.x -- you simply set it, like this

    Baud            CON     "T9600"
    


    You'll want to define a function shell for SERIN -- this is what I do:

    RX_BYTE         FUNC    1, 0
    


    Here's the code for that function:

    FUNC RX_BYTE
      SERIN RX, Baud, __PARAM1
      ENDFUNC
    


    Finally, here's how you put it to use:

    Main:
      cmd = RX_BYTE
    


    If you happen to specify a baud rate that is too fast for the clock speed of your project the compiler will complain. Have fun with the SX -- with SX/B it really rocks.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2009-03-11 01:06
    JonnyMac--

    That certainly looks simple. I know I will spend some time actually implementing it in my application, but that is where learning leads to experience.

    Thanks!

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • JonnyMacJonnyMac Posts: 9,214
    edited 2009-03-11 01:10
    BTW... if you're doing inline serial (with SERIN and SEROUT) you'll easily be able to do 230_400 baud serial if you want. Using an external device, however, means you you may want to use some sort of flow control. If you can't do that and you're using tame baud rates (like 9600) then you can easily buffer do buffered serial using an ISR-based UART (I've posted my version of this several times).
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2009-03-11 01:33
    JonnyMac--

    My application is very simple. I had it up and running using a Stamp. All I want to do is get·an SX48 (instead of a BS2px24) talking to an eb501. In turn, the eb501 talks to a Class I dongle on a USB hub which VB6.0 sees as a serial port. A Logitech game pad is interfaced to a VB GUI. The goal is to get the game port to communicate with the SX48 like I had it doing with a Stamp.

    I know little or nothing about SX/B, but am eager to learn. In your example, I do not know where "RX" (SERIN·RX,·Baud,·__PARAM1)·comes from. My level of ignorance is close to absolute at this point. Is "RX" predefined somewhere by the compiler or is it a constant or variable that I define programmatically? If I remember PBasic correctly, the position of the parameter tells me it is the SX input bit that I must define.

    Once I accomplish the above, I will go out to the shop, crank up the mill and build my Bluetooth lawnmower, which will be run by an SX48 receiving commands via a game pad through a VB GUI. Easy. [noparse]:)[/noparse]

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • CJCJ Posts: 470
    edited 2009-03-11 01:43
    RX is the pin alias

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Parallax Forums - If you're ready to learn, we're ready to help.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2009-03-11 01:49
    CJ--

    Thanks!

    (Duh. I am still not used to that vernacular. But, I knew it "in my head" which is often in circles.)

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • JonnyMacJonnyMac Posts: 9,214
    edited 2009-03-11 01:59
    Bill: I posted a full serial demo in this thread: http://forums.parallax.com/showthread.php?p=790640. This uses RX and TX buffers so you don't have to be sitting on RX_BYTE when a serial byte arrives, and when you're transmitting (up to eight bytes) you can dump them into the TX buffer and get back to doing other things.

    Sorry about overlooking the RX definition.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2009-03-11 02:07
    JonnyMac--
    Sorry about overlooking the RX definition.
    A person even slightly more experienced than myself would have known exactly what you were talking about. And, after all, this is a forum, not a text book!·burger.gif· I have proofed a few text books in my time.

    --Dean Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • JonnyMacJonnyMac Posts: 9,214
    edited 2009-03-11 02:21
    It won't take long to get used to SX/B, especially since you've succeeded with PBASIC. You will find, though, that the use of VPs (virtual peripherals) opens up many possibilities that aren't available with the Stamp and are a whole lotta fun!
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2009-03-11 13:54
    JonnyMac and CJ and PeterM--

    My Logitech game pad is driving a VB GUI that talks to Bluetooth which is read by the SX48 that now controls leds. HB-25s on my existing machine are a short step away.

    Thanks!

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • JonnyMacJonnyMac Posts: 9,214
    edited 2009-03-11 22:58
    If you posted your PBASIC program more than one of use would chime in with specific conversion code -- but then, that might be robbing you of the fun of working through it yourself!
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2009-03-12 02:59
    JonnyMac--
    If you posted your PBASIC program more than one of use would chime in with specific conversion code -- but then, that might be robbing you of the fun of working through it yourself!
    I know you and others would. And, at my age, all the help I can get is very much appreciated! All the PBasic code did was to use two joysticks to turn on some LEDs; from the neutral position all the way forward, the code turned on·one of the LEDs. From the neutral position all the way backward, the code turned on the other LED. This was just a demonstration to me that I could just as easily--or almost as easily--control HB-25s as LEDs with the joysticks.) It is only several lines long. However, I will definitely post it tomorrow and value any comments I may receive as to style, SX/B neat commands, etc.

    Remember, my VB GUI/game pad/Bluetooth environment only turned on LEDs. I thought that controlling HB-25s would be a simple extension of controlling LEDs. It actually would be if I used the joysticks. But, I decided to save the two joysticks for arm use and utilize the buttons to control my HB-25s. Thus, the problem. I have thought about it all night and still do not know if I should make the VB code specific to my application, or to fix the SX/B code so that it accepts a command to turn on or off a device and ignores all other following commands that are the same. In other words, 50 commands to turn on a device would have no affect after it was turned on the first time. This would prevent the device--using my currect defective code--from "blinking" because it is (for some program logic reason that I have not figured out) turning on the device and then immediately turning it off. This must be a simple, truly ignorant issue. I just can't see it.

    One thing I do not understand is the __PARAM arguments. I have searched--perhaps, inadequately--in the documentation that exists and have not found an explanation. At this time, I ASSUME these arguments are self-apparent to those that have been involved in SX/B since early days and is, therefore, obvious to them, but not to me.

    --Bill

    ps (Wonder why every "Enter" is a carriage return plus TWO linefeeds on my machine?) In the meantime, yes, I am having a LOT of fun!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
Sign In or Register to comment.