Feedback on large P2 project?
Martin Hebel
Posts: 1,239
in Propeller 2
Hi All,
For those that don't know me, I'm Martin Hebel, Associate Professor teaching technology (not engineering/CS) at Southern Illinois University and owner of SelmaWare Solutions (StampPlot/MakerPlot/StampDAQ software) and an early user (pre-release) of P1 including a book chapter in the Propeller text and XBee text using it, author of XBee Object and BS2 Function Object for P1. In any case... It's been about 6 years since I did anything serious with a Propeller.
The P2 has me intrigued and a few of my students will be applying for a undergraduate assistanceship to do a large scale project with the P2. While I won't get into details now of the overall focus, here's what I know it will need to do:
- Output to HDMI monitor for active graphical information.
- Be able to collect data from USB communications device - This may be tough one, but want to accept data from RTL-SDR digitally broadcast data. I have access to Linux code for same use so should be able to port it over?
- Interface with I2C and multiple other input devices for monitoring environmental parameters.
- Possibly produce output frequency of modulated digital around 1Ghz?
I've look over the datasheets, seen USB included, HDMI out, lot of great stuff the P1 had of course.
I've ordered the P2-ES Accessory board adapters.
1. So, it looks like all this is do-able??
2. When it comes to Programming/Objects for HDMI, I2C, USB, etc - are these and examples available yet?
3. As to languages I have FlexGUI now (nice job), is one language/editor preferable over the other for this? Objects restricted to Spin? etc?
4. Are available objects needed for this available now or in near future?
The real work on this probably won't start until summer and they have 1 year funding (if approved), but I'm looking to plan things out now, so if things WILL become available soon, please keep that in mind if you have feedback!
Thank you Chip and all the developers here for your efforts on the P2!
-Martin Hebel
For those that don't know me, I'm Martin Hebel, Associate Professor teaching technology (not engineering/CS) at Southern Illinois University and owner of SelmaWare Solutions (StampPlot/MakerPlot/StampDAQ software) and an early user (pre-release) of P1 including a book chapter in the Propeller text and XBee text using it, author of XBee Object and BS2 Function Object for P1. In any case... It's been about 6 years since I did anything serious with a Propeller.
The P2 has me intrigued and a few of my students will be applying for a undergraduate assistanceship to do a large scale project with the P2. While I won't get into details now of the overall focus, here's what I know it will need to do:
- Output to HDMI monitor for active graphical information.
- Be able to collect data from USB communications device - This may be tough one, but want to accept data from RTL-SDR digitally broadcast data. I have access to Linux code for same use so should be able to port it over?
- Interface with I2C and multiple other input devices for monitoring environmental parameters.
- Possibly produce output frequency of modulated digital around 1Ghz?
I've look over the datasheets, seen USB included, HDMI out, lot of great stuff the P1 had of course.
I've ordered the P2-ES Accessory board adapters.
1. So, it looks like all this is do-able??
2. When it comes to Programming/Objects for HDMI, I2C, USB, etc - are these and examples available yet?
3. As to languages I have FlexGUI now (nice job), is one language/editor preferable over the other for this? Objects restricted to Spin? etc?
4. Are available objects needed for this available now or in near future?
The real work on this probably won't start until summer and they have 1 year funding (if approved), but I'm looking to plan things out now, so if things WILL become available soon, please keep that in mind if you have feedback!
Thank you Chip and all the developers here for your efforts on the P2!
-Martin Hebel
Comments
USB is provided at the lowest level and limited to full speed (12 MHz). If you want to use a USB 2.0 device, it has to work at full speed too.
garryj has an excellent 1-cog keyboard or mouse or k-m combo driver for USB.
There are a few HDMI examples around.
Check out propeller.parallax.com for a lot of info
FlexGui, the GUI for Fastspin is really nice. And, lets you include C and BASIC code in your Spin project.
I can't imagine how you could do 1 GHz digital with P2 at 250 MHz. There's probably some chip you could use to help with that though.
I'd try to see if it works with Raspberry Pi Zero and then connect that to P2.
I've done this for controlling HDMI output of piz already...
I saw that link you gave, but missed the "More Software and Examples" link from it! Thanks - looked too much like developers/testers work before that.
-Martin
It uses the P2 to record the exchange between a USB device and a PC.
Later, I'd play back the PC part to the device and was able to get things like HIDs talking...
I think I'd start with something like that for your USB device and try to figure out a simple initiation and data retrieval scheme...
BTW: Welcome back! I think you were at a Propeller Expo or two, right?
Sounds like there may be a new one soon...
I should have posted it here, but it's over here.
Many of us are running 250 without even noticing. That's a lot like running P1 at 100Mhz was. Pretty much no brainer. Above that, some considerations must be taken into account, testing, etc... I've not taken mine much over ~250, but others here have pushed it.
Maybe a lower frequency input to some circuit would make sense. What's the data rate? Maybe a 1Ghz carrier modulated by a P2 would work. Otherwise, yeah. That part of the project is likely to need a chip.
FastGUI is, for the time being, the goto dev tool. That may well remain true, given the excellent work Eric has done to allow mix and match languages to make programs. Impressive.
In general, Spin 2 on P2 is likely to run fast enough to be comparable to P1 PASM speeds when Chip gets his interpreter done. And right now, Eric has made a good look at Spin 2 available in FastGUI as a compiled option. Spin 2, in some form, is extremely likely to be available and robust by the time your students get going. And it's fast enough to make a lot of things easy, SPI, etc... can likely just be coded without needing PASM. There isn't a lot of library code yet. But, a lot more code can be compiled and ported easily than was ever possible on P1.
PASM got very seriously extended too. For people familiar, it's fun to program in and robust. Several of us are doing PASM only projects due to the availability of HUB program execute. In short, one can write big PASM programs now, and do so in a largely familiar way. (assuming any other assembly language experience)
On that note, Spin 2 will include the ability to in-line PASM. FastGUI offers that across it's languages today too. This should make some tasks considerably easier. No need to make an entirely separate COG program to get fast assembly language routines into your project. Now, those can be in-lined, making things like drivers, fast math, access to the P2 hardware features, a much leaner task. One can just focus on the small sets of instructions that matter and leave the bigger details and framework to Spin and friends. IMHO, this is a big gain.
There is some crazy-flexible video work being done in this thread...
https://forums.parallax.com/discussion/170601/all-pasm2-gurus-help-optimizing-a-text-driver-over-dvi/p1
FS-USB Mouse/Keyboard hosting is already working, I think that used boot-mode ?
My guess is RTL-SDR digitally broadcast data will use a Virtual Com port, so you need to check
a) What Baud rate those use
b) what sort of USB driver those expect (custom, CDC, HID or ?)
Or find the part number of the USB-UART bridge used.
FS-USB work to data has focused on 'get something working' to exercise the USB support silicon and prove it can actually work.
So far, that's modest data rates, and simplest host drivers, but it seems to be SysCLK MHz tolerant, using the NCO created 12MHz
HS-USB is not possible, and IIRC HID is simplest, but limits to 640kBaud sustained speeds. (64 bytes per ms)
i2c master is easy, and P2 can MUX across as many pins as you want
How 'good' does that need to be ? What FM specs do you need ? What exact MHz and license band ?
You are best interfacing to a device that is designed to generate 1GHz.
That could be something as simple as a SAW oscillator (aka classic remote controls) or a synthesiser)
There are many i2c programmable clock oscillators that can do 1GHz, and many RF Transceiver designs for remote controls
Potatohead, thanks for the info dump! Very valuable!
Chip, thanks and nice to be active again. I’m collecting some good info for my students proposal for funding. Fingers crossed!
Hey Ray, can you please share a link to this?
I have some nice RGB lit Keyboards I really would like to propellerize, but the company is not willing to share the documentation, so I will need to sniff it out of the data.
Mike
I don't know if it's the latest, but it's certainly for P123 FPGA board and will need fixing to work on Rev.B silicon...
However, what I would probably do is take the RTL-SDR device, pull the Realtek chip off the board, and connect the I and Q inputs directly to smartpins on the P2 and read the data that way. You can also connect the tuner chip (there are several possible in an RTL-SDR device) to the P2 over i2c to program the recieve frequency.
For those that don't know me, I'm Martin Hebel, Associate Professor teaching technology (not engineering/CS) at Southern Illinois University and owner of SelmaWare Solutions (StampPlot/MakerPlot/StampDAQ software) and an early user (pre-release) of P1 including a book chapter in the Propeller text and XBee text using it, author of XBee Object and BS2 Function Object for P1. In any case... It's been about 6 years since I did anything serious with a Propeller."
Hi Martin,
Yes we know you, your work on StampDAQ and Xbee was very well thought our and professionally presented and has helped many of us.
If you apply the same standard to P2 it will be greatly appreciated and we look forward to it.
FWIW I did 1920x1080 VGA 1-bit code about a year ago. Worked quite well and I changed the forground/background colors per line. I was showing characters and clock pics on the display. Only problem with these resolutions as you would know is the memory required, otherwise it's doable.
rogloh Ozprop has released a driver (beta) for composite/vga/hdmi. Sorry Roger
Hope you don’t mean me, Martin, for Forth Peter- wasn’t mine! Though have enjoyed using Forth years ago!
There was a Martin_H on the 6502 Forth forums and I thought it was you. My bad
USB3 may be best managed with a part like FT600, that has a 16b FIFO interface. - but I'm not clear if the clock rules that has can be met by P2.
For HS-USB, there are also medium levels MCUs with HS-USB Phy included, and those may assist P2.
Or, maybe something like this is good enough ?
"The USB3500 is a stand-alone Hi-Speed USB Physical Layer Transceiver (PHY). The USB3500 uses a UTMI+ interface to connect to an SOC or FPGA or custom ASIC. The USB3500 provides a flexible alternative to integrating the analog PHY block for new designs."
They didn't suggest any replacement, and I wasn't able to locate any USB3500-XXXX version, other than the "-ABZJ".
So recently it was (EOL), it isn't listed as such at any distributor's page.
https://microchip.com/mymicrochip/Reports.aspx
(excerpt):
https://microchip.com/mymicrochip/Data/JAON-05QLFX258/JAON-05QLFX258_Affected_CPN_03092020.pdf?TimeStamp=3/17/2020%206:42:12%20PM
On the page, there are 'similar devices' links...
https://www.microchip.com/wwwproducts/en/USB3500
I'm not sure where UTMI+/ULPI sit on the evolutionary line, but I do see 'UTMI+ Low Pin Interface (ULPI)'
so maybe USB3370 ?
+1 I would say this is much easier than trying to run the RTL-SDR over usb. Maybe it could do 250k sampling rate on a full speed USB port. I haven't tested that. Although I think the P2 could use an SDR accessory board. The P2 adcs have 40 dB of gain control built in.
The P2 will output useful RF signals at 1 GHz. As that is certainly not in the first Nyquist zone, you'll need a good bandpass filter. This TI paper looks like a good explanation of how it would work. ti.com/lit/an/slaa523a/slaa523a.pdf The P2's main PLL will add a noticeable amount of phase noise. This could be minimized by using as high a clock input as possible. I've tested 80 MHz and it seems to work fine. I would like to try 125MHz or more.