Is this project possible with just one Propeller Board
fishy116
Posts: 2
I am planning on using at the least the Propeller ASC+ https://www.parallax.com/product/32214 to do a project and I want to know if all of this is compatible with the Spin language.
* WIFI module
* LCD Display (maybe this one https://www.adafruit.com/product/1596)
* General I/O data inputs/outputs
* ADC input
* Write to external storage like SD card or other memory module
The main concerns that I have are that the display might use up all the available pins that I'll need for those other functions, and that Spin might not have libraries or code examples of displays and WIFI capabilities. If anyone could confirm that all of these functions are compatible with Spin or point me towards a direction where I could find out myself I'd really appreciate it.
* WIFI module
* LCD Display (maybe this one https://www.adafruit.com/product/1596)
* General I/O data inputs/outputs
* ADC input
* Write to external storage like SD card or other memory module
The main concerns that I have are that the display might use up all the available pins that I'll need for those other functions, and that Spin might not have libraries or code examples of displays and WIFI capabilities. If anyone could confirm that all of these functions are compatible with Spin or point me towards a direction where I could find out myself I'd really appreciate it.
Comments
That LCD is a 5.0" 40-pin TFT Display - 800x480 with Touchscreen, so your problem with P1, will be RAM, as well as pins. Even at 1 bit per pixel, that display is 48k and P1 is 32k
What do you need to display ?
How many do you intend to make ?
That may help simplify...
I intend to make one of them as a prototype.
The display only needs to show simple shapes and text as an informational display.
As I mentioned I'm only seeing if this is possible or if I'll need to interface it with a second micro-controller for additional features.
I did not know which version that board was as it just says Propeller. Sorry about the forum location, I'll know better next time.
Thanks for the feedback so far.
Should mention that P2 would be perfect for that project...
The P1 and spin could certainly handle the WIFI module, general I/O, ADC input, and external storage like SD card or other memory, but the small 32K memory would limit the video to a monochrome or very small color palette unless it could be done in a text/sprites manner.
As Rayman posted, the P2 would be great for this if you can get one, since it has a much larger 512K of ram and 64 I/O pins. Since you also need a WIFI module you might want to consider using a Propeller 1 module or board and a Raspberry Pi Zero W. The propeller would handle the ADC and digital I/O while the RPi handles the video and WIFI. The cost would very close to that of a P1 or P2 and WIFI module and provides video, wifi, bluetooth, SD, more memory and greater data processing power.
Lots of RAM, touchscreen interface, backlight driver, needs only 5 pins, and they have example code, though it's in C. If nothing else, that would get your test system going and let you concentrate on the other parts.
I’ve posted code for that one here.
As several have stated here before, the 32k limit of the propeller's RAM is going to be the biggest problem. The next problem would be getting the timing just right, as I think it would take some very complex code to drive these displays directly from any micro. I wouldn't even consider trying to drive the dot/clock type display with the p1 unless I had nothing but time to waste. I think it COULD be done with the P2, although I think you'd still bump into memory constraints REAL quick.
As Rayman recently recommended to me, the FTDI Eve2 might be a much better display choice, depending on what you want to do. It would take care of a LOT of the hard work, allowing the p1 to do what it's good at. They're kinda pricy though.
https://www.newhavendisplay.com/eve2-tft-modules-c-1_990_992.html
Depending on the number of I/Os and ADCs you need, you might be able to get away with using one of the controller drivers like this one.
https://www.adafruit.com/product/1590
You may also look at the modules I use since they CAN be driven by the p1 and take care of a lot of the support circuitry. A 5" display module like this is available if you are really going for some REAL basic gui functions.
https://www.sainsmart.com/collections/all-for-arduino/products/5-tft-lcd-for-arduino-due-mega2560-r3-raspberry-pi
I (back when I was Average Joe) tried using a P1 connected directly to a controller driven display and quickly determined more memory was necessary. I was able to build simple gui interfaces and other things but they were slow, very simple and somewhat clunky. If it wasn't for the built in P1 font, it would have been nearly IMPOSSIBLE!
This thread has a LOT of information about the controller driven displays and the p1, although it's a bit congested with debugging... and more of my stupidity than I'd like to admit to
https://forums.parallax.com/discussion/137266/propeller-gui-touchscreen-and-full-color-display/p1
Here was my first direct p1 to ssd1289 controller driven lcd hardware attempt... With one SigmaADC, I had 2 free propeller pins.
https://forums.parallax.com/discussion/comment/1075047/#Comment_1075047
As I said, I quickly decided 32k was not enough RAM, especially with almost 2/3 taken by the SD card driver. Over the years I've refined the hardware and am porting LOTS of P1 code over to the P2 and am somewhat documenting the progress in my thread here:
https://forums.parallax.com/discussion/169021/p2-touchscreen-memory
The display is going to be the tough one. There's a lot of ways to get a spin compatible 5" display. Without knowing a bit more about the application it's hard for me to say what the best choice would be.
The WX wifi module is one of my favorite recent purchases and is totally spin compatible
Kye's SD driver is great and all spin, and there's also a version of spin FSRW as well.
Sigma-ADC works pretty good and there are lots of spin drivers for ADCs in the obex.
I'd say doable. The more info about your app you are able to give, the more help the community will be able to give you.
https://www.aliexpress.com/item/32599693865.html?spm=a2g0o.productlist.0.0.2f20b49d1TmrHM&algo_pvid=621d2baf-970f-4aa0-a034-3ca3a6643485&algo_expid=621d2baf-970f-4aa0-a034-3ca3a6643485-8&btsid=0ab1aad2-0941-473a-9357-008201ab874a&ws_ab_test=searchweb0_0,searchweb201602_1,searchweb201603_53
with Tachyon.
If you do not need a full grafics buffer you can just draw and write to the display
which will keep the image for you. Not much RAM needed for this.
Is using the unused portion of a larger eeprom (like a 64kb)
a viable alternative for the P1? or does it need to be located
in ram?
The problem is the fonts?
Bill M.
Like I said, it really depends on what you want to do. The Propeller 1 has the ROM font, which is really quite handy and looks pretty nice. If you want other fonts, then they will need to be loaded into RAM. I guess you could read them directly from an external media but this would incur a performance hit. A larger EEPROM could be good for holding assets, although I prefer to keep them on SD cards.
One of MY biggest problems when building large projects (you may have other issues) is Kye's SD card driver takes about 2/3rds of HubRam. FSRW is a bit smaller but still uses a large percentage of HubRam. Kye's driver is nice because multiple, independent programs, can be chained together to simulate a program larger than 32k. I've used this quite a few times to get around the memory limits, since any project I've run out of memory on already uses an SD card.
MJB brought up a good point about the QSPI displays. There's also async serial displays that only use 2 pins... Lots of options!
But their interface documentation is very limited.
Hmm, for me (compiling with PropTool), it takes up almost exactly 25% of Hub. I also have a read-only version lying about that saves ~2K.