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

Updated: the PropTerminal

AribaAriba Posts: 2,687
edited 2008-12-25 21:54 in Propeller 1
Hi all, after many nights of work, I will present you my Propeller Terminal.

The PropTerminal is not just another Terminal-program for a PC. It is specially made for the Propeller
in such a way, that it can emulate a keyboard, mouse and TV-Text-Display with the PC.
If you use a PropStick, or, like me, the Propeller chip direct on a breadboard, it can be
very handy to use this emulation instead of connecting the real PS2-devices and a TV or VGA-Monitor.
You only need the serial (USB) connection with P30 and P31 and have all other Pins free for other
purpose. It can be also very usefull to get a second Display for debugging, I used it for example
with POD to debug assembly code (see appended screenshots).
To easy include the Emulation in existing spin applications, I adapted the original drivers for
keyboard, mouse and text display in such a way that they communicate over the serial interface
with the terminal. You only have to replace the driver-objects in the OBJ section, and mostly
it will work. It is also possible to mix real and emulated devices, for example use PropTerminal
as keyboard and mouse, and a real TV as Display.

Because PropTerminal has to share the COM-Port with the Propeller Tool, I implemented a special mode
that allows fast switching between the two applications. Every time the PropTerminal is minimized
to the Taskbar, it closes the COM-Port and the Propeller Tool can download the new code. When
finished, you click on PropTerminal in the Taskbar, then the Window and the COM-Port opens again.

Other features of PropTerminal are:
- included loader for binary files
- displays the special propeller-font characters
- can also draw some simple graphics

What is not possible:
- keystate methode of keyboard object not yet supported (used often by games)
- no direct emulation of Graphics object, only Text
- not the original color palette

The actual PropTerminal is a Beta-version for Windows. I have tested it only on one single computer
with a swiss-german keyboard layout. So I don't know how good it is working on other computers,
OSes, keyboard-layouts etc.... Try it out and let me know your impressions.

Andy

Attached is now also the new version 0.4 of PropTerminal.
See posting on page 2 for the new features.

Post Edited (Ariba) : 10/20/2007 1:47:24 AM GMT
«134

Comments

  • BasilBasil Posts: 380
    edited 2007-05-10 01:40
    This is great! I was dreading having to write my own similar program for debugging.

    Will try it out as soon as I have my board finished [noparse]:)[/noparse] Looks good though!
  • mynet43mynet43 Posts: 644
    edited 2007-05-10 02:53
    I tried your demo routines. They all worked without a problem.

    The only suggestion is that you might want to include a keyboard cursor.

    Keep up the good work!
  • KaioKaio Posts: 253
    edited 2007-05-10 12:17
    Andy,

    looks very nice. It's a great work of a little tool which is easy in use. But if you'd have told me that you are working on this, I did not spend so much time to make POD usable over serial connection. smilewinkgrin.gif

    On your homepage you has mentioned that the color palette could be configurated in a PropTerminal.ini, but you don't have described the format for this. Please can you provide this information.

    I'd wish that you might want to support any kind of TV resolution, so the user could define his own size of screen. Currently your tool supports only a size of 40x13.
    Another nice feature would be if your tool could also emulate a VGA display and this in any kind of resolution. Then we could be develop programs for the Propeller only with a Prop board and a PC/notebook.

    Did you are interested to discuss possible features feel free to PM me. I like more to write in german too.

    Thomas

    Post Edited (Kaio) : 5/10/2007 12:29:31 PM GMT
  • simonlsimonl Posts: 866
    edited 2007-05-10 12:23
    WOW, this should be part of the Propeller IDE!

    Ariba: You've included the binary file loader - would you consider creating a standalone (command line?) exe that only does the loading? There are LOADS of us who've been asking for such a utility for AGES...

    Thanks for sharing smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon

    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif

    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
  • Gerry KeelyGerry Keely Posts: 75
    edited 2007-05-10 12:36
    You can run program from the commandline to download binaries. See "Readme.txt"



    Gerry
  • simonlsimonl Posts: 866
    edited 2007-05-10 12:51
    Hi Gerry,

    Yeah, read that too, but it seems that it uses the PropIDE to achieve it. Ariba's notes suggest that it might be possible to do it completely standalone though smile.gif

    The reason I, and others, would like this functionality is so we can deliver firmware updates (in binary) without the end-user needing to install the IDE.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon

    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif

    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
  • BaggersBaggers Posts: 3,019
    edited 2007-05-10 13:56
    Hi Ariba,
    Nice App [noparse]:)[/noparse]
    I was wanting to do some deving without a tv out, ie on my laptop and since it doesn't have AV in, it's a tad awkward, but this is great, thanks for the neat app.
    I'm sure lots of others will use it too.
    And putting them all onto one cog, perfect [noparse]:)[/noparse]
    I look forward to any advances you make on it.

    Baggers.
  • AribaAriba Posts: 2,687
    edited 2007-05-10 22:33
    I'm glad to hear that it works well.

    @mynet43
    The next version will have a Text Cursor, switchable on and off in the menu.

    @Kaio
    I does not know, that you work on a serial version of POD, (I will send you a PM in the next days because of my next project..).
    To get a INI-file, click on Save Settings in the menu. The created file is PropTerminal.ini and there you will find the RGB values for each of the 8 colors in the palette (format is $GGBBRR). You can also change the size of the Terminal window to others then 40x13 by changing the parameters cols= and rows= !
    I don't have used VGA until now, is there a difference between TV_Text and VGA_Text (exept the size of 32x15)?
    I think I have to add also a 'Load Settings' in the menu, to switch easy between different sizes, and colors.

    @simonl
    PropTerminal.exe can be used as download-tool without the IDE (Propeller Tool). But currently it loads the binary only into the RAM, I think to use it as update-tool you will write in the EEPROM. To download a file in the RAM, call this:
    PropTerminal.exe filename.binary -L COMnr
    
    



    Andy
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-05-10 22:44
    simonl said...
    WOW, this should be part of the Propeller IDE!

    Something akin to this is in development, he has just been pulled away by other more pressing issues recently.

    Andy, he says your method of COM port negotiation is very clever.

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

    Parallax, Inc.
  • KaioKaio Posts: 253
    edited 2007-05-11 09:27
    Andy,

    I have played yesterday with POD and your PropTerminal and have found how I can create the PropTerminal.ini. I have also found that you support any kind of TV resolution. Anyway thanks for your explanation about this.

    The usage of PropTerminal for POD is for a user more comfortable than the Basic Stamp Debug Window which I have tried to use before, also while the Debug Window does not support colors.

    Thereby I have found that PropTerminal does not work properly with Ctrl-character sequences, e.g. when I have tried Ctrl-H I got $2C8 instead $268. But Ctrl-Fkey works fine.
    Ariba said...

    I don't have used VGA until now, is there a difference between TV_Text and VGA_Text (exept the size of 32x15)?
    I think the text mode of VGA, except HiRes text, could be emulated in the same manner as TV mode. The others VGA drivers uses a bitmap to display. This would require another concept of communication and large effort to realize it. I don't know if these effort would be warrantable.

    I have also tried your background watch which I have found on your homepage. This is the tools I was looking for to observe variables in realtime in my spin code. Many thanks for sharing. jumpin.gif

    I'm glad to hear from you in PM and be excited about your project.

    Thomas
  • simonlsimonl Posts: 866
    edited 2007-05-11 11:22
    Ariba: Thanks for the info. Do you have any plans to get the download to programme EEPROM?

    Paul: Yeah, Ken indicated he'd be working on a standalone loader early last year. I guess I'm just getting a little frustrated at the extended wait :-(

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon

    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif

    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-05-11 17:32
    Jeff, the programmer, is impatient to·get it done as well. But he is the product owner of the entire Stamp line and there have been some QA issues that he·has had to deal with. Making sure manufacturing is running smoothly always takes precedance over development.

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

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 5/11/2007 6:13:46 PM GMT
  • AribaAriba Posts: 2,687
    edited 2007-05-11 19:20
    Paul Baker said...

    Something akin to this is in development, he has just been pulled away by other more pressing issues recently.
    Andy, he says your method of COM port negotiation is very clever.
    Thanks to him for the compliment [noparse]:)[/noparse]
    Can you say me what exactly is in development? A Terminal window as part of the IDE or a standalone Downloader or both?
    This will have some influence to my future plans with PropTerminal.
    Kaio said...

    Thereby I have found that PropTerminal does not work properly with Ctrl-character sequences, e.g. when I have tried Ctrl-H I got $2C8 instead $268. But Ctrl-Fkey works fine.
    Thomas,
    You're right this is a bug. I will change this in the next version. I let Windows do the translation from VirtualKeycodes to Ascii, but if Control is pressed it seams to produce other codes (the F-Keys have no ASCII value, so I have programmed the translation for that by myself).

    @simonl
    Yes I will add download to EEPROM in the next version (I have extended the code today for that, but I can't test it, I have to order a EEPROM first!). I have plans to include some fuctionality that PropTerminal can be used as a Installer/Updater with User-Interaction. But I think if this will be used for commercial products, it can't be totaly free (gratis).

    Andy
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-05-11 20:49
    Andy,

    He is working on a terminal (sorry I missed the fact your program can do stand alone downloads, this feature isn't currently in development). He is working on the underpinnings of an extensible (by us) interface that is integrated with the PropTool but also availible in a stand alone configuration. Originally it will only support a terminal functionality, but there are plans to incorporate various graphics modules. Part of why it is taking so long is that he has thought about everything that can be occuring even making sure that if a user program switched clock frequencies the system will still work.

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

    Parallax, Inc.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-05-12 02:29
    This is likely a newbie question, but (since I'm new) what is the setup for the left-hand image of the
    Parallax Digital Storage Scope reading? Would that be the USB scope offered by Parallax?
    The output looks extremely useful for some of my projects.

    Oldbitcollector

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-05-12 02:33
    It's an application I released, and is availible here: http://forums.parallax.com/showthread.php?p=606048

    Since it is an application and not an object, it doesn't have a home yet. At least until I create a couple more and we can justify making a dedicated place for it.

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

    Parallax, Inc.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-05-12 02:41
    Wow.. I'm blown away.. Thanks for posting this, perhaps it should be added to the "Good Thread Index"

    Oldbitcollector

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2007-05-16 00:38
    added to index
  • codemonkeycodemonkey Posts: 38
    edited 2007-05-20 17:29
    This looks like a really, really·cool tool, if i could get it to work (i suspect hdw issue [noparse][[/noparse]isn't it always a hdw problem?]). So, my first try was on a dell latitude (xp pro·up-to-date) to a prop usb thingie (as com4)·and while proptool works just fine, propterm gets a checksum error. So, i loaded eeprom with proptool and then with propterm up hit the reset button (on a bare proto board i.e. no mouse, kbd, etc) hoping to get a message, then nothing happened. So, i motored on over to a compaq (xp home up-to-date) and tried the same thing with almost the same result. I did get the checksum err, but then resetting the protoboard produced the attached message (it should read "starting"). Everything in propterm is at the default. After a number of attempts i finally got it to verify ram, but always am receiving the wrong "text". I then messed with the baud rate in pc_text but it didn't seem to have much effect. Any ideas?·TIA roll.gif
    298 x 220 - 7K
  • AribaAriba Posts: 2,687
    edited 2007-05-20 18:41
    Hello codemonkey

    There are some problems with the Loader of PropTerminal. I work on that, and I hope I have found the solution.
    If you want, you can download a preliminary version of PropTerminal.exe from the next release, and give me some feedback about the loader. This file is only temporary on my website, I will delete it in some days.

    http://www.insonix.ch/propeller/prop_term.html

    On this website you can always find the newest version. The next official version comes in circa one week.

    But if you load the code with the Propeller Tool and then switch to PropTerminal, it should also work with the version that you have. It seems there is a problem with the baudrate. Have you set the right clock frequency in the top-spin file? For a ProtoBoard with 5 MHz Crystal, you can use for example this settings:
    CON
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
    


    Have you tried the demos in the PropTerminal.zip ? You can minimize PropTerminal, then upload a spin code with F10 in the PropellerTool, and switch back to PropTerminal. There is no need to load it in the eeprom.

    Andy
  • codemonkeycodemonkey Posts: 38
    edited 2007-05-20 19:12
    Ariba,
    Demos? blush.gif·Ok, next time i look there before driving.

    However, Re my problem and the new·v .291 -- First the good news: Putting in the constants did wonders, i now get back "starting" like i should.
    Then the not-so-good news: Downloading binary now always gives "Checksum Error".

    I saved into eeprom only because i couldn't bring back the propterm window fast enough to see my initial message.

    If you want, i'll keep checking fairly frequently and trying new versions as i find them, then let you know. I would like to get this working off the laptop as sometimes TVs are not always handy.



    ·
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-05-20 21:10
    Andy,

    Finally got some time this afternoon to play "in depth" with Propterminal spin objects.
    I'm extremely impressed!! I've adapted a copy of FemtoBASIC to work with it.

    Attached is a copy of Femtobasic for Propterminal. I created this with a friend in mind
    who wants to get started with a bare Protoboard. This should also be handy for
    robotics projects. I've added just a few Propterminal specific commands to play
    to some of the graphics controls.

    Oldbitcollector

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!

    Post Edited (Oldbitcollector) : 5/21/2007 2:35:13 AM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2007-05-21 02:38
    Interesting note:

    When I use Propterm on my PC, when I minimize, and bring it back up, it resets the Propeller.
    This doesn't happen on my laptop.

    Oldbitcollector

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The comments and code above are proof that a million monkeys with a million propeller chips *could* write Shakespeare!
  • M. K. BorriM. K. Borri Posts: 279
    edited 2007-05-21 02:40
    That's got to do with the serial port more than the type of PC... is either of your ports a usb-to-serial dealie?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://forums.parallax.com/showthread.php?p=650217

    meow, i have my own topic now? (sorta)
  • AribaAriba Posts: 2,687
    edited 2007-05-21 04:45
    Hello Oldbitcollector

    I'm glad to hear, that you like PropTerminal. I will try your adaption of FemtoBasic.

    See at the end of the readme file, for the reset problem.
    If the Auto Mode is set in the Options menu of PropTerminal, then the Port will be closed at minimize and this generates a reset. If you uncheck the AutoMode, you can minimize without a reset, but the Port remains open. In non-automode you can press the Pause-key to close the Port and give it free for the PropellerTool to load a new code.

    If you use the internal binary-Loader of PropTerminal this problem does not occur (you don't need the automode anyway). But this Loader works not on all PCs. Have you tested the Loader on your PC and Laptop?

    @codemonkey
    This are really "not-so-good-news". It seems to be a timing problem, but it's hard to find, because it not happens on my PC. I think about another solution...

    Andy
  • SpinBoySpinBoy Posts: 4
    edited 2007-05-21 09:33
    jumpin.gif This looks really cool, can't wait to check it out. Thanks, I will soon be uploading some of my creations soon. Currently using a proot board to control a small robot I am putting together. I will be posting pics soon. I am using the Ping and QTI sensor for obsitcale detecion and avoidance and a the 20x4 line lcd by Parallax. This thing reports sensor status in real time to the lcd while doing all sorts of other stuff, all that and 5 cogs still free. Wow, I love the Propeller chip!

    yeah.gifyeah.gif
  • codemonkeycodemonkey Posts: 38
    edited 2007-05-21 13:42
    Ariba,
    I've heard the timing could be funky to deal with, but if you think simple baudrate changes·might help it, just give me a way to set the rate for propterm and i'll try it at a bunch of settings. I've grown quite fond of·this thing (certainly beats the heck out of setting leds) and what little things i can to help, i'll do.
  • StefanL38StefanL38 Posts: 2,292
    edited 2007-05-21 13:57
    Improvement-Idea:
    how about using the DAT-Section of the SPIN-File instead or parallel to the disassembler
    if the commands between dissasembler and sourcecode fit it should be possible
    even with comments in between
  • AribaAriba Posts: 2,687
    edited 2007-05-21 15:10
    @codemonkey
    It's not the baudrate, it has something to do with the (Windows internal) TimeOut-settings of the Com-Port. I think, I will isolate the Loader, and provide several versions on my wesite. Then you can say me version x works, version y not on PC 1 and so on.
    Am I right, that the Loader of PropTerminal 0.2 works on the your compac with XP-home?

    @StefanL38
    I think you post this better in the POD thread. But the idea is good, I work on a debugger with exactly this approach [noparse];)[/noparse]

    http://forums.parallax.com/showthread.php?p=639020


    Andy
  • codemonkeycodemonkey Posts: 38
    edited 2007-05-21 15:52
    Andy,
    Correct, pt 0.2 didn't work the first 2 times, but then after that it worked every time with the cpq xp-home (it's an amd 3200 or something like that). I didn't try to reboot to see if it repeated behavior, will check that anyway. I'll check on your web page for extra versions when i get home (in about 4 hours or so).
Sign In or Register to comment.