Shop OBEX P1 Docs P2 Docs Learn Events
Propeller II emulation for Idiots — Parallax Forums

Propeller II emulation for Idiots

rjo__rjo__ Posts: 2,114
edited 2012-12-21 07:33 in Propeller 1
Being a common inmate in this asylum, I thought that my brothers in ignorance might need a little encouragement.

This is not an inclusive list... just a reminder of what the rest of us are up agains... in terms of the nearly the indigestible mass of information that is passing right beneath our inquisitive noses:

Bill just posted http://forums.parallax.com/showthread.php?144599-Announcing-P2BEE-Propeller-2-Bytecode-Execution-Engine

And there are already 113 replies...that's a lot of replies to sort through.

Peter has started a thread... and an entire documentation website, which changes every five minutes http://forums.parallax.com/showthread.php?144432-The-unofficial-P2-documentation-project... 116 replies.

Cluso99 started http://forums.parallax.com/showthread.php?144199-Propeller-II-Emulation-of-the-P2-on-DE0-NANO-amp-DE2-115-FPGA-boards... 466 replies.

Then there is Bill's Propeller 2 Large Memory Model (LMM) thread http://forums.parallax.com/showthread.php?144478-LMM2-Propeller-2-LMM-experiments-(50-80-LMM2-MIPS-160MHz)n ...357 replies.

And the venerable Beau Schwabe and his http://forums.parallax.com/showthread.php?125543-Propeller-II-update-BLOG...1,867 replies.

I tried printing this stuff so I could read it with my morning dump... 5 replies per page... max. I wouldn't mind killing a tree, if I thought it would fit into my head.

For peeps like me, the experience of reading this stuff is something like listening to the Psalms when I was 5. I know it is all true. I know it makes perfect sense... just not to me.

And how do you know if you understand it... if you can't test it?

I ordered my DE0-nano, the minute David got his serial output working, and got it in a week before I could decide what slop I could buy to run Windows 7... turns out you can get a pretty good computer for about $150, not slop at all:) Still waiting for delivery.

While I'm waiting to report my inch by inch progress, I have a couple of questions.

I really don't want to hurt my Nano.

Can I supply the Nano, with my usual 3v regulators that I use for my Props? I see where to hook up... I'm just worried about the how. What is the current load?

Can I clip off all of the conflicting pins and plug my PropII into my QuickStart header and talk back and forth between the two without putting resistors in between?

Is it really true that all I need from Altera is that stand alone programmer?

Is Chip going to support the Cyclone V?

Where do you go for information about the DE0-Nano and DE2-115. Obviously, not to Altera's forum. I've noticed that Leon has a really simple question about the DE0 camera demo...(where is it?) and his question has been totally ignored on the Altera forum. And I can't find any sources for some of there other demo's either... such as the DE2-115 multi-camera security demo.

Rich

Comments

  • SapiehaSapieha Posts: 2,964
    edited 2012-12-15 22:05
    Hi Rich.

    NANO are powered from its Programing USB
    Most of demo's for NANO are on factory CD.
    All other info You need look for on Terasic page.


    I don't think You can directly Place NANO in QuickStart 40-pin's header
  • cgraceycgracey Posts: 14,155
    edited 2012-12-15 22:21
    Could one of you guys who's already using the DE0_Nano make a video on YouTube that walks people through how to set up the board and load the configuration image into it? Then, how to run the monitor and load a program into it using PNUT.EXE? Parallax could endeavor to do this, but one of you might like the challenge.
  • potatoheadpotatohead Posts: 10,261
    edited 2012-12-15 22:22
    Rich, (Seems my pictures didn't take, hold on a moment while I fix that)

    I've got a "Using the Monitor" document in progress. It goes through the basics of accessing the chip. It won't answer all your current questions, but does get you through the, "turned it on and it does what it is supposed to" basics.

    To get the Parallax stuff, download this: http://forums.parallax.com/attachment.php?attachmentid=97559&d=1354667885 It's the latest from Chip post #106 on the emulation thread you referenced.

    I find the terasIC site kind of painful. Yes, you only need the stand alone programmer. https://www.altera.com/download/software/prog-software

    And I recommend the one time access. Never could get an account registered. Weird.

    One thing that sucked me in for quite some time was the "USB Blaster" driver. It's nowhere to be found... until you install the stand alone programmer software, so do that straight away. It drops a drivers directory you can then use to get your USB driver. The driver for the DE2 board is called "USB Blaster", and I think the one for the NANO is different. Either way, the drivers are in there. Mine were at: C:\altera\12.1\qprogrammer\drivers

    Be sure and install 12.1 at least. The stuff they ship with the hardware is considerably older and won't work. Many of us got caught on that early on.

    Once the programmer software is installed, power up your NANO and connect the USB, then browse to the driver directory you need and complete that installation. Once you can connect that NANO and have the USB report working in Windows, you can continue. That's the hard stuff, IMHO.

    Take the package Chip produced and unzip it somewhere on your computer. Inside of it you will find Pnut 2 and some pictures that detail where to connect your Prop Plug. Get that all sorted.

    I recommend PUTTY for your terminal. http://putty.org Fetch that one too.

    You will need to identify which COM Port your Prop Plug is attached to, and likely change it. See my blog for a couple of how-to's on that. Here's a command line that takes you right to the device manager: "mmc devmgmt.msc"

    I used COM 9, BTW. Works great.

    Launch PUTTY and in the setup, configure it to talk on the COM port you've designated. Actually, you can use PUTTY right away to check in on the monitor even before setting up to actually program the P2 emulation. Pnut.exe needs COM 1 - 9. PUTTY doesn't. Your call there.

    Here's my PUTTY setup:

    (p2-putty.png)

    Once you've got all that sorted out, power up the NANO, launch PUTTY and hit the space bar to see this:

    (p2-mon.png)

    :)

    From there, launch Pnut and go about writing programs. Be sure and read the text that Pnut displays to you. Not everything you would expect is there.
    671 x 349 - 12K
    456 x 439 - 23K
  • SapiehaSapieha Posts: 2,964
    edited 2012-12-15 22:36
    Hi Rich.

    Here is alternative Terminal program.

    http://forums.parallax.com/showthread.php?144199-Propeller-II-Emulation-of-the-P2-on-DE0-NANO-amp-DE2-115-FPGA-boards&p=1150859&viewfull=1#post1150859


    In TEXT attachment You can find commands to control cursor and more to it.
    In Pic You will see if Monitor Run Ok
  • D.PD.P Posts: 790
    edited 2012-12-15 22:48
    For the minimum download you need this programmer:

    https://www.altera.com/download/software/prog-software

    And you need these USB drivers and that is all to program DEO-Nano with the image from Chip.
  • potatoheadpotatohead Posts: 10,261
    edited 2012-12-15 23:05
    Here is a draft of my in progress document: At this stage, it's complete enough to be helpful on a basic level. I'll update it regularly until it's complete.

    Link to blog post where document lives right now: http://forums.parallax.com/entry.php?1443-Using-The-P2-Monitor-Document-In-Progress

    I can start on a "getting started with FPGA P2 emulation document. I don't think the monitor one will take too much longer to be very complete.

    A video is interesting, but I'm not setup at home to do that. The work conference room is though, but I don't have a NANO.
  • Heater.Heater. Posts: 21,230
    edited 2012-12-16 00:42
    rjo__

    I think I have to bring to your attention the fact that to an Englishman the phrase "read it with my morning dump" will mean something much ruder and cruder than you had in mind.


  • rjo__rjo__ Posts: 2,114
    edited 2012-12-16 05:25
    Good Morning and Thanks.

    Sapiela, now that you mentiont it... USB "power limits" sort of answer my question about the current draw of the Prop2nano, and so it looks my standard power set-up will work.

    Chip, I'm set up for video and will post something here when the rest of my boxes arrive.

    Potatohead (is Doug Dingus.) Wow... that is really nice, clear, inviting,http://forums.parallax.com/entry.php?1443-Using-The-P2-Monitor-Document-In-Progress and and very timely. Can't wait for the code section. We need a repository for code snippets.
    I did manage to get an account at Terasic... but only by going back on a different day and then asking support for help. My credit card didn't work... but they do take paypal... you have to look for it. That worked (same credit card:)
    I'm thinking they have a really small staff of geniuses up there in Canada and that their market focus is not on individual sales. I have seen the comment
    that the engineers are all busy and simply don't have time to document anything... can't remember if that comment came from Altera or Terasic... is there a difference? My DE0 nano arrived with a web-cd that was two generations behind. Looks like a job opportunity for someone. The problem I have is that Altera seems to frequently shows demo's and then doesn't have any info about them anywhere...and don't have the courtesy to answer any questions about them. Even if the demo is not for distribution... it would be useful to know that. Why show a demo in the first place? Why have a forum?

    Heater... that's me:)

    THE PLAN:

    I have my Quickstart pin finder from PropellerPowered http://propellerpowered.com/shop/?page_id=43...and when I compare that to the Prop2 Nano pinouts from Chip, it certainly appears that I can just shave off a header to include only the first 8 pins and connect up the Quickstart (with a common ground) to the DE0-Nano... So the Prop2 pins 0-7 match up with Quickstart pins 0-7. Easy to remember:) That's the plan, but no risk of that happening until I have gone through Doug's material in a stepwise fashion, probably tomorrow, when my Windows computer is supposed to arrive.

    Thanks again.

    Rich
  • SapiehaSapieha Posts: 2,964
    edited 2012-12-16 05:33
    Hi rjo_

    In this link You can find My version of NANO-Base+.

    Look in SCH pdf -- You will find all inf

    http://forums.parallax.com/showthread.php?125543-Propeller-II-update-BLOG&p=1147326&viewfull=1#post1147326
  • rjo__rjo__ Posts: 2,114
    edited 2012-12-16 07:13
    Sapieha,

    I love the board. Heck, I like everything you do. When can I place an order?

    I am going to feed my Prop1 signal into my Prop-Nano board and if something blows up... I'm going to blame you:)

    Rich
  • SapiehaSapieha Posts: 2,964
    edited 2012-12-16 07:20
    Hi rjo_

    Send PM to Ken Gracey - Parallax. He said to me -- this week them will be clear.

    It is Parallax that made this PCB -- It is now theirs property.

    rjo__ wrote: »
    Sapieha,

    I love the board. Heck, I like everything you do. When can I place an order?

    I am going to feed my Prop1 signal into my Prop-Nano board and if something blows up... I'm going to blame you:)

    Rich
  • rjo__rjo__ Posts: 2,114
    edited 2012-12-16 07:23
    Sapieha,

    Great work. If I PM Ken, he is going to want to send me one for free:)
    Sounds like release should be soon. I can wait.... and there is plenty to do as it is.

    Thanks

    Rich
  • David BetzDavid Betz Posts: 14,516
    edited 2012-12-16 07:26
    Sapieha wrote: »
    Send massage to Ken Gracey - Parallax.

    I'm sure Ken would appreciate a massage at this point!! :-)
  • SapiehaSapieha Posts: 2,964
    edited 2012-12-16 08:05
    Hi Rich.

    It is not clear -- But have most info to start programing

    look at attachment.


    rjo__ wrote: »
    Sapieha,

    Great work. If I PM Ken, he is going to want to send me one for free:)
    Sounds like release should be soon. I can wait.... and there is plenty to do as it is.

    Thanks

    Rich
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-12-18 02:00
    David Betz wrote: »
    I'm sure Ken would appreciate a massage at this point!! :-)
    I am sure he would. But I think Chip is even more in need ;)

    Seems Sapieha has fixed his post. I used to chat quite often with him but have been so busy lately. Often his posts are misunderstood as writing in English is not his native language. He is much better chatting interactively because if you don't understand you can immediately say so. It is a pleasure to see him on the forums as he has so much to offer. Just bear with his English as it is often perceived the wrong way.
  • rjo__rjo__ Posts: 2,114
    edited 2012-12-18 08:38
    Good news... everything we idiots need to get started is referenced in this tiny thread:)

    Got all my boxes in... set up my computer, updated my computer, read through this thread a couple of times, downloaded everything...and went to bed.
    This AM... played with it for a bit and got it running, no problem... well, almost no problems.

    Most of my issues stemmed from the fact that I really don't know Windows...so, even finding stuff after I downloaded it was an adventure.
    My advice is to tell the installer to RUN whatever you are installing after it is installed. This will give you an icon for your running program down at the
    bottom of the screen... you can then click (or right click) on the icon and select "Pin to Window" or something like that.

    Don't do the full Web Edition download... took 4+ hours and at this point we idiots don't need it.

    I strongly recommend reading Doug's very nice PDF before doing anything(see above). I did, and I was glad that I did.
    Everyone seems to agree that the most frightening part of the entire process is getting the USB Blaster drivers installed.
    Just follow Doug's instructions... but when you get there don't actually try to find a specific driver, just select the drivers folder.

    That sounds confusing, but if you read Doug's book, it is will be clear.

    The only other issue has to do with setting up the Serial Monitor (I tried Putty first). The reason you want to do this, is that after you install your Propeller 2 on your Nano (or 115), it is set up to show you info over a serial line, created by
    plugging your Prop Plug into your NanoProp2. At that step you should have already cycled the power over the USB line and plugged your Prop plug into the header as clearly shown in the pictures from Chip's download(see above).

    You need a COM port setting for your serial terminal to talk to your Prop2. (COM1..COM2...etc). Doug's explanation for this comes from Windows XP and involves looking at the Port Settings in the Device Manager. In Windows 7,
    I couldn't figure out how to get this info. I could get at the Device Manager and the Port info... but the COM settings weren't there. A much simpler way is to start your Propeller Tool, and select "Identify Hardware." This gives you the
    Com port and if it doesn't find your Prop2, you have something hooked up wrong. Mine was on COM5... when I used this to setting to launch Putty... like magic... there was my ROM monitor waiting for me:)

    My interest isn't in writing languages or system level programming. I suspect that a lot of the new features are there for the purpose of enabling easier and better language and compiler development. At the user level, for relative novices, I suspect that
    there are also features to make our lives happier, when we talk to our Propellers at the P2asm level. For the average person, I expect P2asm to be easier to learn than PASM.... hard to believe, with all of the new instructions and flags all over the place, but I've seen just enough to imagine this might be true.

    I'm going to follow my hunches and will report back here.

    Chip: A video isn't necessary. And what shows up in one version of Windows looks different from the others. Might be more confusing than it is useful.

    Rich
  • potatoheadpotatohead Posts: 10,261
    edited 2012-12-18 08:46
    Rich,

    Thanks for the Windows 7 feedback. I'll have to add that part. My Propl system is an old XP machine I really love. I do have other machines, including a win 7 one. (avoiding Mac OS and Linux for now, just for time reasons)

    BTW, the document saw a nice update over the weekend. It's got a full session with the monitor now, and should give people a little bit to do with that fun toy. Working on the advanced examples and such now.

    Since it is a system monitor book, I'm pretty sure I'll include an old school hand assembly, input to monitor, run code example, just because. :) (that was the first way I ever did it)
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-12-18 13:07
    Thanks Rich and others. I will be getting my nano board Thursday evening :) So this thread will make it easy to get going.
    BTW Andy over on the other thread has written a terminal program for this purpose. Might be worth a good look.
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-12-20 21:42
    Jumping for joy !!! My DE0-NANO is working with P2 emulation. I tried Andy's code for sine and cosine waves and random and of course his PropTerminal to do the downloading - nice.

    The Monitor works great Chip & so does the emulation ;)
  • Martin HodgeMartin Hodge Posts: 1,246
    edited 2012-12-20 21:46
    I love the monitor. I wish will all chips had one.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-12-21 01:42
    And to think, just weeks ago, the naysayers were saying 'nay' to them monitor. "oh, no, Chip, not that, there's so much more important things to put in that ROM!"

    Trust in Chip!

    Now, I REALLY hope Santa brings me one of these!!

    Great work on the guide, Doug.....hope I get to use it soon!!
  • potatoheadpotatohead Posts: 10,261
    edited 2012-12-21 07:33
    Thanks! It's so funny! The workbench has in the corner, one Apple ][, which contains a monitor much like the one in the P2. (the P2 one is much better, BTW) My first assembly experience was using a monitor to enter bytes after hand assembling a program. I'm putting that in the monitor guide for P2, just because. That computer also had a little one line assembler, where you could just input a program directly, then drop back to BASIC and run it, or run it from the monitor, ignoring BASIC entirely.

    IMHO, having one is a great first step to getting oriented on a new computer, and the P2 is a little computer, more than a CPU, just less than a PC is. Thanks for the compliments. Hopefully, I'll get that thing nearly done over the holiday breaks!
Sign In or Register to comment.