Shop OBEX P1 Docs P2 Docs Learn Events
Updated: the PropTerminal - Page 3 — Parallax Forums

Updated: the PropTerminal

13

Comments

  • Paul MPaul M Posts: 95
    edited 2008-03-08 20:20
    Andy

    Thanks for the modified .exe which I have just downloaded - I can't try it until I get back to he office on Monday

    I'll let you know how I get on

    Paul
  • heaterheater Posts: 3,370
    edited 2008-03-09 18:48
    Ariba,

    Silly me. It was too early in the morning when I looked at your schematic mod. I concentrated very hard for a long time until I totlly misunderstood it [noparse]:)[/noparse]

    I made the mod and it works just fine except minimizing propterminal and the maximizing it again seems to reset the propeller which is a shame as I don't have an EEPROM so I I have to boot the prop RAM again. Wouldn't this resetting also be a problem even with EEPROM for appicatins that one would rather not have interupted?

    Suggestion: How about some kind of indication in the menu bar that comms is enabled or not?

    Many thanks to you. This great.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-03-09 19:05
    Ariba, the prop terminal works great on my custom Pentium D HP PC running XP Pro·& Xubuntu 7.10 (i don't have prop terminal running on the linux side, issues with installing wine).·The 0.4 ver is very stable and the program is fast as i nearly had a GUI with mouse clickability nearly implemented on it. I wonder if there is a way to implement a full scren VGA mode where the prop "thinks" its outputting to a VGA screen rather than the data stream of character/basic graphics/color information. I'm not at all familiar with C language or VB, and it may not even be possible to pass a VGA screens worth of data through the USB and still have the PC comunicate the mouse/keyboard data back to the prop, not to mention the H/VSYNC's.

    Now that i think of it, one would have to write a custom VGA driver for the prop to output a "raw screen" to your propterminal where it then gets passed to a custom driver of your own to translate the "raw screen" to the actual screen that's passed to windows/graphics card·for display.

    A full screen VGA emulator mode may be easy or near impossible, I really have no idea how this could/would be done. If this is something trivial, then it would be a VERY awesome feature indeed! An idea i'm sure you've already thought of..hop.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
  • AribaAriba Posts: 2,687
    edited 2008-03-10 03:30
    RinksCustoms

    I think this is not doable. I don't know what size you mean with "VGA full screen", but also if it is only 640*480 with 256 colors, you get over 300 kByte data to transfer. With 115.2 kBaud the screen will be updated all 30 seconds !
    And a custom driver in the Prop needs also this Memory.


    heater

    Yes the Reset occures also with an EEPROM. The problem is that the DTR line is controlled by COM-Open and COM-Close automatically in a way that produces a reset. I only found a solution with the FT232 USB to Serial Chip, but not wit a normal RS232 ports or other converters.
    But this Reset happens only if you set the Auto-Mode for Open and Close the COM on Minimize and Restore. You can disable this Auto-mode and then the COM stays open, also if you minimize PropTerminal. In this case, to Upload new code from the IDE, you can press the Pause key to Open and Close the COM port.

    Andy
  • Paul MPaul M Posts: 95
    edited 2008-03-10 13:06
    Andy

    RTS works perfectly as reset line. I have tried out the demos etc - very nice app - it will come in very useful

    Thanks,

    Paul
  • deSilvadeSilva Posts: 2,967
    edited 2008-03-10 13:27
    To my great chagrain, Parallax is not aware how mush harm and frustration it causes in the world by NOT bundling each Propeller with Andy's Propterminal, his PASD, and deSilva's "Programming the Parallax Propeller using Machine Language"....
  • heaterheater Posts: 3,370
    edited 2008-03-11 23:02
    Ariba:

    What are the limitatins on propterminal text file upload ?

    I have managed to transfer some small test text files into a simple spin program that just echos all the text back to the screen.

    I was planning on transfering images of my CP/M floppy disks, in Motorola S record format, down to the prop for writing into an SD card. These files are a little over 3 megabytes in size. When I try to do this the propterminal hangs up and it's menu bar goes blank.

    A couple of times propterminal has crashed when in the file selection box.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • AribaAriba Posts: 2,687
    edited 2008-03-12 00:58
    heater

    Yes this Text Upload is only practical for short Files. I have uploaded files with < 20kBytes.
    The white Menubar shows, that I do not test Windows messages while uploading, this is a little bug.

    I made some experiments with File transfer to SD card via PropTerminal, but come to the conclusion, that it is to slow. Your 3 Megabyte disk-images need 5 minutes to transfer with 115.2 kBaud. It is much faster to plug the SD card in a Cardreader, and then back to the Propeller SD socket.

    Andy
  • heaterheater Posts: 3,370
    edited 2008-03-12 05:24
    Ariba

    Five minutes or fifty would be fine for me. My original estimates were based on working at only 9600 baud!
    I don't anticipate wanting to download complete disk images very often. More importantly I don't have an card reader and am unlikely to have one soon.

    Bear in mind that I don't have any FAT file system on my SD cards. I did not want to waste any RAM by including the FAT object, besides this is a CP/M system I'm building so I already have perfectly good file system [noparse]:)[/noparse]

    If I had a card reader I would need to write raw disk images to the SD card from it. A task that is probably easily done in Linux with the "dd" command. I have no idea how to do this under Windows which sadly is all I have here for the foreseeable future.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • AribaAriba Posts: 2,687
    edited 2008-03-12 09:35
    heater

    I've made some test with the file upload and had to change the timing a bit. Now I have succesfully transfered a 1MByte file to the SD card with PropTerminal (in more then 15 minutes).
    The modified version is attached, together with a demonstration spin file.

    The File transfer is initiated by the spin code with a special command sequence, and also the filenames are defined in spin!
    You have to change the Path and filename at the begin of the code (try first a short file).
    PropTerminal opens the file and transfer 16 byte blocks, triggered by the Propeller. Don't press keys until finished.
    You can upload binary or text files.

    Andy
  • heaterheater Posts: 3,370
    edited 2008-03-12 13:24
    Ariba

    Gosh, you are quick!

    Seems to work nicely. I commented out the SD card writing from file2sd.spin as I don't want to upset my SD card just yet.
    Then downloaded a CP/M disk image, just over one megabyte, twice both times running to completion.

    What is the "slow text" option you have added ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • AribaAriba Posts: 2,687
    edited 2008-03-12 19:10
    It was so quick because I had it implemented in version 0.4 but not documented. I only had to change the timing (fsrw was to fast at cluster borders).

    SlowText was added for Text upload to Forth, it inserts a 1ms Delay after every transfered character, else Forth fails on receive.

    Andy
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-03-12 20:19
    That is just awesome! This sounds like another good PropDOS companion.
    I'll try it myself tonight and add it to the list.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-12 22:10
    Ariba said...
    RinksCustoms

    I think this is not doable. I don't know what size you mean with "VGA full screen", but also if it is only 640*480 with 256 colors, you get over 300 kByte data to transfer. With 115.2 kBaud the screen will be updated all 30 seconds !
    And a custom driver in the Prop needs also this Memory.


    heater

    Yes the Reset occures also with an EEPROM. The problem is that the DTR line is controlled by COM-Open and COM-Close automatically in a way that produces a reset. I only found a solution with the FT232 USB to Serial Chip, but not wit a normal RS232 ports or other converters.
    But this Reset happens only if you set the Auto-Mode for Open and Close the COM on Minimize and Restore. You can disable this Auto-mode and then the COM stays open, also if you minimize PropTerminal. In this case, to Upload new code from the IDE, you can press the Pause key to Open and Close the COM port.

    Andy

    It should be possible to do for a tv though. For a 16x12 tile display where the tiles are 16x16 and using a 2 bit colour mode there are 98304 bits in a screen or 2,949,120 bits/sec for a 30fps displasy. Should be just possible as it is possible to do 3MB/s serial.

    For anyone who may be using crossover, it starts but can't find any com ports so if you want to use it on a mac you will need to use parallels or something else.
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-15 06:57
    I managed to get PropTerminal working on a mac using Crossover and the PropPlugsmile.gif. Than I closed the program and started it again and it stopped working :-(

    Anyone got a suggestion? The light on the PropPlug will come on occasionally but nothing appears on the screen and the upload file function gives a timeout after the blue light flashes a bit.
  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-03-16 02:00
    OK, it seems that any time you close propTerminal, program the propeller using propTerminal or stop (pause) the serial connection it goes beserk. It displays some garbage on the screen and then completely stops working(the program still works, just the display stops working). However, the reset command works once you have it up and running.

    For those interested. You need to make a shortcut to your serial device so that crossover can find it. To get propTerminal to start working you need to first open propTerminal, set it up for the right com port and then program the prop with the python loader. After all that propTerminal should worksmile.gif. If you want more details just ask.
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-03-16 17:22
    deSilva said...
    To my great chagrain, Parallax is not aware how mush harm and frustration it causes in the world by NOT bundling each Propeller with Andy's Propterminal, his PASD, and deSilva's "Programming the Parallax Propeller using Machine Language"....
    yeah. My ed kits didn't have Mike Green in them either.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-03-16 19:00
    You PropDOS users should appreciate this..

    I took the liberty of expanding Andy's "File2SD" program a bit.

    This version has an interactive screen using AiGenericText on the propeller side that
    allows you to specify the destination name of the file, then it opens a file selection
    window on the PropTerminal side. After downloading the file, it reboots the
    Propeller side.

    It is intended to make the utility a little more friendly with PropDOS users.

    {Thank you Andy for another great tool! Not having to move my SD card
    from the Prop to the PC and back will reduce wear and tear on everything!}


    OBC

    rename file with .zip extension

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)


  • ErNaErNa Posts: 1,751
    edited 2008-03-17 21:47
    Is there a way to have a flow control? I sometimes overrun the terminal and would like to work, i.e. with xon/xoff
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-17 22:11
    Sure, but you have to add the software flow control to the driver.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • AribaAriba Posts: 2,687
    edited 2008-03-18 00:01
    ErNa

    It would be possible. But it's so easy to include a short delay in a Loop that sends a lot of data to the Terminal, that I do not plan to implement this. The driver on both sides will get much more complicated, and I will keep it as simple as possible.

    Andy
  • CalebCaleb Posts: 18
    edited 2008-03-18 06:37
    Hi, Ariba;
    Thanks for your files and comment. when I run some of your files, I expected debug like window open in our monitor, but I could make it happen though the spin files looks compiled without problem.

    I tried some of demo files like "PC_interface_Demo.spin", but again no debug like window happened....as like in basic stamp. Did I miss something? I am really beginner in Propeller, and have little experience with basic stamp. Would you guide me how I can use your PropTerminal as like debug in stamp? Can you show me how I can put the code and syntex in my program to display the constant or valuable or register values in the debug like window?

    Any comments will be appreciated.
    Thanks,
    Caleb
  • AribaAriba Posts: 2,687
    edited 2008-03-18 09:17
    Hi Caleb

    Start the Propeller Tool (IDE) and load for example the 'PC_Interface_Demo.spin'. Then start 'PropTerminal.exe' and minimize the PropTerminal Window, so that it is only on the Taskbar. Then Press F10 to compile and upload the code to the Propeller, and then Restore PropTerminal with a Click to the Taskbar. When the Window opens, also the COM port is connected, and you should see the Output from the Propeller.
    To upload code again, you have to minimize PropTerminal before, this closes the COM and give it free for the PropellerTool.

    Andy
  • mcstarmcstar Posts: 144
    edited 2008-03-18 22:11
    I'm seeing "bugs" or at least unexpected behavior when trying to use Shift + and Ctrl + various keys on the keyboard. Can someone post an example of how the ctrl and shift keys can be used? It appears that the kstat == $100 or $200 is supposed to indicate Shift and Ctrl respectively and it's added to the key value, but I'm also seeing that when shift is pressed, it alters the lower two bytes as well by $20, $30 or more. Am I just using this incorrectly?

    Example :
    repeat
    ·if term.gotKey
    · curKey := term.Key
    ··if curKey > 0
    ·· term.hex(curKey,8)

    outputs 00000061 for 'a', but 00000141 for shift+'a'
    yet, ctrl+'a' gives me 00000261 <-- seems correct

    Just FYI, I'm using a prop plug USB with PropTerminal 0.4.1 on Vista.
  • AribaAriba Posts: 2,687
    edited 2008-03-19 04:06
    The coding scheme of the Keys follows the rules of 'Keyboard.spin', because PC_Keyboard.spin' is intended to be a replacement for that. The low byte is the ASCII code (mostly): 'a' is $61 and with Shift you get 'A' what is $41. The high byte indicates an additional pressed Control and/or Shift Key: 0 nothing, 1 Shift, 2 Control, 3 both.
    You can isolate the ASCII code with: curKey := term.Key & $FF
    Some Keys, like Backspace or Escape, have a little different code than normal, see at the end of 'Keyboard.spin' for all the codes.

    Andy
  • mcstarmcstar Posts: 144
    edited 2008-03-19 16:30
    Thanks for the response Ariba. I'm an idiot,blush.gif I get it now. Shift+ a == "A" which is $41. Typing·just an a without the shift == $63 or "a". I must have been in a programmer's fog or something when I got hung up on that. BTW Ariba, your prop-terminal is awesome!

    Post Edited (mcstar) : 3/19/2008 4:36:13 PM GMT
  • ErNaErNa Posts: 1,751
    edited 2008-03-20 14:00
    I'm still searching for a simple kind of flow control. Fixed wait time is not appropriate, for I refresh a screen on changed variables and plot intensively. The following mechanism could work: I send a known number of bytes to the terminal, that fits into the input buffer of the operating system. Then I invoke a special command: ready? and go on with my program, doing different tasks. As long as I do not get a result "ready!" from the terminal, I do not generate any more output. The "ready!"-signal could be an Esc-Sequence, or something like "F13", so the answer can not be a "normal" data stream.
  • AribaAriba Posts: 2,687
    edited 2008-03-20 20:09
    OK ErNa
    Version 0.48 includes the new Grafic command GetPixel. You send the command like other Grafic commands, PropTerminal respondes with a $FF if the Pixel at that point is set, or with $FE if no Pixel is set. A Demo is included in the ZIP, it shows that scanning a lot of pixels is not really fast.

    I hope you can use this for your flow control:
    The Ready? command is for example: 5,9,0,0 (get pix at position 0,0)
    The Ready! is $FE or $FF.
    The input buffer size is set to 1024 bytes. So you can send up to 1020 bytes, and then the GetPixel command.

    Viele Gr
  • mcstarmcstar Posts: 144
    edited 2008-03-21 15:28
    Speaking of Gets.... is there anyway to get the current propterminal cursor location from the prop?· I know you can locate, but I'd like to see the opposite method as well.·Very often, I have the need to move the curor to some location on the screen to output a bit of text or status of some kind, but then I'd like to return it to where it was before I moved it. Without a way to get the cursor location I have no way of knowing where it was before I set it.· Something like the abs routines for the mouse would be nice. The alternative is to try to track the position by setting some local row and col vars, but this alternative is very kludgy and seems to be difficult to keep in synch. Basically, you have to remember to call it whenver you do anything that moves the cursor·including out, str etc.· Got any other ideas??

    BTW, I see that you have row and col vars in the code, but they are never used.· Was the the original intent?
    Thanks
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-12-10 19:30
    This is one of my favorite Propeller utilities, and since moving to Ubuntu has been sorely missed.

    Saw a reference to this thread today and thought maybe I could find a way to get this to work.
    Here's the solution for Ubuntu (possibly other linux as well)

    Here's my solution, alter this as required for your setup.
    (IANALE: I am not a linux expert)

    1) My Prop plugs into my usb on /dev/ttyUSB0 (confirmed with BST)

    2) I have four serial /dev's listed as /dev/ttyS0 -- /dev/ttyS3 (COM 1-4)
    this information was found with this command: ls -la /dev/ttyS*

    3) I have Wine installed, use the Open with "Wine Windows Program Loader" to launch

    4) I used the following create a new port (COM 5) and map it to /dev/ttyUSB0
    sudo ln -s /dev/ttyUSB0 /dev/ttyS4
    Running the command from step 2 now shows the symbolic link.

    5) Change the settings in Propterminal to Com port 5 and save the settings.

    It works.. [noparse]:)[/noparse]

    Edit: Propterminal does NOT interfere with BST while running and does not
    reset the Propeller. You can keep it running and upload new code. (I love linux!)

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS

    Post Edited (Oldbitcollector) : 12/10/2008 7:36:59 PM GMT
Sign In or Register to comment.