Easiest way to save the Nano pins is to use a 74HC04 (or any other HC series buffer (inverting or not) with enough current source/sink for LED's depending on how you want to hook up the LED's) as an inverting buffer.
Use a current limiting resistor to limit LED's to 8mA each, then you will be within the spec of the chip even when using six LED's.
I wonder what the Vfd and minimum current is for the LED's they use - with that, we could calculate what the *real* safe current limit is for the pins; I suspect the 2mA / 4mA in the Altera data sheet is extremely conservative.
....
I'd like to do that so I don't have to re-enable the terminal everytime I load a new program.
...
Have you tried the PropTerminal (1 page back in this thread)? It is made for fast and easy switching between the IDE (PNUT.exe here) and the Terminal. Normally I have the Terminal window open over the PNUT text. To change the PASM code I minimize PropTerminal, which also closes the COM port. After compiling and loading the new code, just click on PropTerminal in the Taskbar and it appears again in foreground and opens also the COM port.
Have you tried the PropTerminal (1 page back in this thread)? It is made for fast and easy switching between the IDE (PNUT.exe here) and the Terminal. Normally I have the Terminal window open over the PNUT text. To change the PASM code I minimize PropTerminal, which also closes the COM port. After compiling and loading the new code, just click on PropTerminal in the Taskbar and it appears again in foreground and opens also the COM port.
Have you tried the PropTerminal (1 page back in this thread)? It is made for fast and easy switching between the IDE (PNUT.exe here) and the Terminal. Normally I have the Terminal window open over the PNUT text. To change the PASM code I minimize PropTerminal, which also closes the COM port. After compiling and loading the new code, just click on PropTerminal in the Taskbar and it appears again in foreground and opens also the COM port.
- DE0-NANO
- PropTerminal
- 2 channel Scope (60MHz BW)
- custom made PropPlug with additional 5V output - used to power the DE0-Nano
I have also made an adapter with a 10pin standard connector. I have a lot of modules for that from Prop1 which can be used also with Prop2. For example:
- Bluetooth module
- LCD (Nokia3310)
- 128kByte SPI-Ram
- 8 LEDs
I'm most interested in HEX code Yours terminal program show --
That spare me some clicks in Monitor to stop code I loaded and then write all that needs for show it in Monitor
It is why I asked If You have possibility to add
Log-sesion to file ---- menu.
For LEDs...
Use a superbright led (>8000mcd) and a 5K or 10K series resistor. Unless you are in a very bright environment, or the pulsing is too fast, you will easily see this. I never use anything but superbright leds and a minimum of 3k3 resistors, but as I said mostly 10K. You cannot damage anything with a 10K resistor and it will almost never affect whatever else you are driving with it.
DE0-Nano
Cluso's FT232 (my propplug) using a jumper cable from it to the power connector on the de0nano.
Windows 7
PropTerminal and Andy's sin/cos program.
The one I downloaded is referenced in the first post of this thread. I updated a day or 2 ago with a link to the post where Chip has been updating the latest pnut.exe. My pnut.exe created date shows as 4 Dec 2012 at 4:19pm. I had thought there should have been a later one than this.
Ariba: re your PropTerminal...
I presume to the xxx.obj is just a straight binary file like the PropTool outputs?
If so, would it be possible for you to modify this so that we can download a binary 'blob' to hub with an offset?
WHat I am preparing to do is create a P1 spin object that I can relocate to a fixed location in hub (say $4000 because I need it to be within the first 32KB due to P1 spin restrictions). Then I can download the P2 spin interpreter to the beginning of hub (as per normal) and just fix an offset into spin2 to start testing it out.
DOes anyone have any better ideas that might use something already done???
A while ago I posted the results of running fibo compiled with PropGCC on the P2. At the time I had to manually link in specially modified C support files because I hadn't yet taught propeller-elf-gcc to recognize the -mp2 option and use a P2-specific library and linker script. I've done that now and am able to run an unmodified version of fibo.c. Here is the result of running it on my DE2-115 board. The propgcc modifications are checked into Google Code under the "p2test" branch. You'll also need p2load to load the program into your DE0-Nano or DE2-115 FPGA board. Not very much of the low-level library is working yet. I'll be working on that next.
And one more thing, ebasic is now working so we have at least one version of Basic running on P2. Unfortunately, ebasic will only run on the DE2-115 board because it needs more than 32k of hub memory. In fact, propgcc by default will only run on the DE2-115 board because it assumes there is 128k of hub memory.
david-betzs-macbook-pro:ebasic dbetz$ p2load -v -s -h ebasic.bin -t
Trying /dev/cu.usbserial-A700fKXl
Found propeller version 32
Loading 'ebasic.bin' on port /dev/cu.usbserial-A700fKXl
.................................................
[ Entering terminal mode. Type ESC or Control-C to exit. ]
ebasic 0.001
10 for x=1 to 10
20 print x, x*x
30 next x
run
H:0 O:1 D:112 V:1 T:120
1 1
2 4
3 9
4 16
5 25
6 36
7 49
8 64
9 81
10 100
OK
My DE0 should show up this week so I can play along some. I couldn't justify the DE2 at this time for what I do. Hopefully by the time I need it, the real P2s will be available.
EDIT: Boo hoo......my NANO is stuck in the snow!!! We're bordering on blizzard conditions here for the next 24 hours or so. :frown:
Location Date Local Time Activity
Middleburg Heights, OH, United States
12/26/2012
2:40 P.M.
Emergency conditions beyond UPS' control.
I just wanted to say thanks for keeping your first post up-to-date with the latest information.
Because of your efforts, today I was able to easily find the right programming tool/device driver set, reprogram my DE2 board with the P2 code, build C programs using David's P2 GCC changes, and load/run the programs using David's p2load tool.
So again, thanks for your efforts.
--Steve
BTW ... and thanks to David for making 3 programming languages so far (beyond P2ASM) work on the P2 dev boards.
Thanks Steve. It also worked for me when I finally received my DE0-nano board. But none of this would be possible without Chip releasing the binaries, and everyone who has contributed various parts too.
I have used Andy's PropTerminal and David's P2load. Both work fine
Thanks Steve. It also worked for me when I finally received my DE0-nano board. But none of this would be possible without Chip releasing the binaries, and everyone who has contributed various parts too.
I have used Andy's PropTerminal and David's P2load. Both work fine
Yes, Chip's offering of the FPGA configuration files was amazing! Thanks very much Chip!!
I'm not sure if anyone has tried the propgcc "p2test" branch yet but I wanted to let you know that I've checked in a new version of gas that I believe implements all of the P2 instructions. If you decide to download propgcc sources to try this branch you should build using the jbuild2.sh script instead of jbuild.sh because the C++ compiler currently will not build with the -mp2 option. I'll be looking at that next.
This version of propgcc will compile the demos/fibo/p2 demo as well as the demos/ebasic demo if you use the Makefile.p2 makefile. I suspect it will build other demos as well but those are the only ones I've tested so far. The P2 library doesn't support SD card access yet because I don't have the SD card slot connected on my DE2-115 FPGA board.
If there is interest in trying this version of propgcc I can build a Windows version if that will help.
l would love to work with this. A windows build would help a lot.
Okay, I'll build one tonight. Just to be clear though, this will be a command-line version. SimpleIDE has not been updated to handle building P2 programs as far as I know.
Comments
Easiest way to save the Nano pins is to use a 74HC04 (or any other HC series buffer (inverting or not) with enough current source/sink for LED's depending on how you want to hook up the LED's) as an inverting buffer.
Use a current limiting resistor to limit LED's to 8mA each, then you will be within the spec of the chip even when using six LED's.
Terasic use 120R resistors to sinking correct on theirs LED's connected directly to FPGA
I wonder what the Vfd and minimum current is for the LED's they use - with that, we could calculate what the *real* safe current limit is for the pins; I suspect the 2mA / 4mA in the Altera data sheet is extremely conservative.
I seem to recall seeing that but can't find the post.
It looks like I could connect the second one on the Vss P26, P28, P30 spot on a DE0-Nano.
I wonder what the pin states are from the FPGA during programming and reset.
I'd like to do that so I don't have to re-enable the terminal everytime I load a new program.
I went ahead and ordered a 2nd prop plug from Digi-Key. I'm hoping maybe they play Santa and send me a DE2-115 by accident.
C.W.
Visit my blog, the most recent entries contain what you are looking for.
Works great, just make sure your lower com port numbered prop plug is the programming one.
The monitor reference in progress has serial setup info and connect pictures as well.
Thanks Doug, I knew I had seen it somewhere.
My second Prop Plug should get here Saturday.
C.W.
Have you tried the PropTerminal (1 page back in this thread)? It is made for fast and easy switching between the IDE (PNUT.exe here) and the Terminal. Normally I have the Terminal window open over the PNUT text. To change the PASM code I minimize PropTerminal, which also closes the COM port. After compiling and loading the new code, just click on PropTerminal in the Taskbar and it appears again in foreground and opens also the COM port.
Andy
I'll give it a try, thanks Andy.
I don't minimise PropTerminal window --- PNut compiles code anyway even if it don't find COMx port.
And as I use Yours File/Upload file menu in PropTerminal window --- No need for PNut to download it.
- DE0-NANO
- PropTerminal
- 2 channel Scope (60MHz BW)
- custom made PropPlug with additional 5V output - used to power the DE0-Nano
I have also made an adapter with a 10pin standard connector. I have a lot of modules for that from Prop1 which can be used also with Prop2. For example:
- Bluetooth module
- LCD (Nokia3310)
- 128kByte SPI-Ram
- 8 LEDs
Andy
Yeah that is another methode, but I think it needs a bit more clicks: Menu, Upload, Select File, Okay. Makes 4 clicks compared to one ;-)
Andy
Still more usable for me.
I'm most interested in HEX code Yours terminal program show --
That spare me some clicks in Monitor to stop code I loaded and then write all that needs for show it in Monitor
It is why I asked If You have possibility to add
Log-sesion to file ---- menu.
Use a superbright led (>8000mcd) and a 5K or 10K series resistor. Unless you are in a very bright environment, or the pulsing is too fast, you will easily see this. I never use anything but superbright leds and a minimum of 3k3 resistors, but as I said mostly 10K. You cannot damage anything with a 10K resistor and it will almost never affect whatever else you are driving with it.
DE0-Nano
Cluso's FT232 (my propplug) using a jumper cable from it to the power connector on the de0nano.
Windows 7
PropTerminal and Andy's sin/cos program.
I thought I had the latest, but it won't accept the single parameter version of REPD, says I need a comma.
For reference my copy of PNUT.exe is dated 2012-12-10 18:05
Thanks,
C.W.
I presume to the xxx.obj is just a straight binary file like the PropTool outputs?
If so, would it be possible for you to modify this so that we can download a binary 'blob' to hub with an offset?
WHat I am preparing to do is create a P1 spin object that I can relocate to a fixed location in hub (say $4000 because I need it to be within the first 32KB due to P1 spin restrictions). Then I can download the P2 spin interpreter to the beginning of hub (as per normal) and just fix an offset into spin2 to start testing it out.
DOes anyone have any better ideas that might use something already done???
My DE0 should show up this week so I can play along some. I couldn't justify the DE2 at this time for what I do. Hopefully by the time I need it, the real P2s will be available.
EDIT: Boo hoo......my NANO is stuck in the snow!!! We're bordering on blizzard conditions here for the next 24 hours or so. :frown:
Location Date Local Time Activity
Middleburg Heights, OH, United States
12/26/2012
2:40 P.M.
Emergency conditions beyond UPS' control.
12/26/2012
7:19 A.M.
Out For Delivery
I just wanted to say thanks for keeping your first post up-to-date with the latest information.
Because of your efforts, today I was able to easily find the right programming tool/device driver set, reprogram my DE2 board with the P2 code, build C programs using David's P2 GCC changes, and load/run the programs using David's p2load tool.
So again, thanks for your efforts.
--Steve
BTW ... and thanks to David for making 3 programming languages so far (beyond P2ASM) work on the P2 dev boards.
I have used Andy's PropTerminal and David's P2load. Both work fine
This version of propgcc will compile the demos/fibo/p2 demo as well as the demos/ebasic demo if you use the Makefile.p2 makefile. I suspect it will build other demos as well but those are the only ones I've tested so far. The P2 library doesn't support SD card access yet because I don't have the SD card slot connected on my DE2-115 FPGA board.
If there is interest in trying this version of propgcc I can build a Windows version if that will help.