Shop OBEX P1 Docs P2 Docs Learn Events
PC software to comunicate with propeller — Parallax Forums

PC software to comunicate with propeller

4x5n4x5n Posts: 745
edited 2012-06-02 19:55 in General Discussion
I've been working on a project that uses a propeller to develop film. The problem is that I need to be able to run various development cycles. My idea is to write a program that runs on the PC using perl/tk (not the best but I can get something working quickly and then port to c/c++ after I learn to write gui apps for X with c/c++) and then transfer the cycle info to the eeprom on the proto board I'm using. The 32K of space is a lot more then I need. The plan is to have a cog sit and spin looking for the serial data from the pc. My question is this. The connection to the proto board is done via usb but gets converted to rs232. Do I need to use a usb driver or treat the usb connection as serial? I've been looking at the available perl modules for both approaches and dealing with the serial module will definetely be easier. :-)

Any suggestions from those that have done something like this?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-06-01 22:08
    Just treat it as a serial port. I use Win32::SerialPort with Perl and USB serial, and it works fine. There's a similar module for Linux, if that's what you're using. BTW, I'm surprised you'd say that Perl/Tk is "not the best." It's my go-to GUI of choice for PC development.

    -Phil
  • 4x5n4x5n Posts: 745
    edited 2012-06-02 17:57
    Just treat it as a serial port. I use Win32::SerialPort with Perl and USB serial, and it works fine. There's a similar module for Linux, if that's what you're using. BTW, I'm surprised you'd say that Perl/Tk is "not the best." It's my go-to GUI of choice for PC development.

    -Phil

    Sounds like I'll be using the serial module. It really makes more sense then trying to deal with it as usb.

    I think my attitude towards perl is the result of spending ~15 years as a Unix sys admin. Early on in my career perl was described to me as "the swiss army chainsaw" of systems administration. Over the years I used it a lot as a single use type of solution. Or for doing maintenance type work from cron. Although I spent some time learning to use TK with perl (ie perl/tk) I didn't do much with it and it's been over ten years since I've done anything with it. Once done and working I'd like to rewrite the program as a compiled windows app though. :-) First I'll have to get some type of software development software for windows and learn how to program the window API. To be honest there's not much chance of that happening. :-)
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-06-02 19:33
    You could end up using something with QT for the GUI and then you'd have a multi-platform tool when you were done. There are QT bindings for Python and Perl and certainly library support for C++, choices,choices everywhere!!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-06-02 19:55
    4x5n wrote:
    Once done and working I'd like to rewrite the program as a compiled windows app though.
    The Scribbler and S2 GUIs are Windows .exe apps. D'ya know what they were written in? Perl/Tk! Notice I didn't say "compiled .exe apps," though. "Bundled" or "packaged" would be more apt terms, since the Perl run-time is also rolled into the .exe. But, nonetheless, performance doesn't seem to suffer as a result. It's just that such .exes do tend to be rather large.

    I will confess, however, that after programming in Spin, Perl syntax can get a bit annoying with its semicolons, braces, and sigils. Still, I know of no other language I'd rather program in for PC apps.

    -Phil
Sign In or Register to comment.