Simpler Development systems, one notch up from Self Hosted - the new Pi400
jmg
Posts: 15,173
in Propeller 2
For those talking about simpler development systems, there is a new form factor RaspPi - all enclosed in a compact keyboard case - and all connectors in a nice line along the rear edge.
https://www.adafruit.com/raspberrypi400
https://www.raspberrypi.org/products/raspberry-pi-400/?resellerType=home
1.8GHz quad-core ARM Cortex-A72 CPU with 4GB of DDR4 RAM.
VideoCore VI graphics (OpenGL ES 3.1, Vulkan) and 4kp60 HEVC decode provide the ability to run a 4k monitor at 60FPS or 2x 4k monitors at 30FPS through the two micro HDMI ports.
Ethernet port provides true Gigabit Ethernet support and there's
2 USB 3.0 and 1 USB 2.0 ports
USB-C supports 5V, 3A Power In
Raspberry Pi 40 pin connector is present on the back of the keyboard for HAT support.
The form factor and case are also interesting, unclear yet if the case / keyboard overlay is available an an order item, or if the PCB from this is also a separate item ?
https://www.adafruit.com/raspberrypi400
https://www.raspberrypi.org/products/raspberry-pi-400/?resellerType=home
1.8GHz quad-core ARM Cortex-A72 CPU with 4GB of DDR4 RAM.
VideoCore VI graphics (OpenGL ES 3.1, Vulkan) and 4kp60 HEVC decode provide the ability to run a 4k monitor at 60FPS or 2x 4k monitors at 30FPS through the two micro HDMI ports.
Ethernet port provides true Gigabit Ethernet support and there's
2 USB 3.0 and 1 USB 2.0 ports
USB-C supports 5V, 3A Power In
Raspberry Pi 40 pin connector is present on the back of the keyboard for HAT support.
The form factor and case are also interesting, unclear yet if the case / keyboard overlay is available an an order item, or if the PCB from this is also a separate item ?
Comments
Ethernet probably a waste with wifi.
But, when it comes down to it, it's basically a cheap PC. That is great, of course.
But, there's also something great about the reliability and speed of a microcontroller...
And, it's the simplicity of the code and not a dependency on huge libraries to get things done...
I'd guess Catalina would work as well, but don't know for sure.
Looks promising for sure.
Their new compute module 4 looks interesting too and now even supports PCIe (at 1x) for possible NVME drives.
Look at the nice 40 pin connector on the back!
Frankly, the first thing I would do is make a nice pro board that plugs right in. Buffer it, fuse it, do what it takes to allow for mistakes and start making projects on it.
An option could be legacy audio and video on that connector. Maybe allow for both.
For me personally, I can get one, load up my dev stuff on it and go! Having a Parallax pro board plug right in would be sweet.
Ben Eaters 6502 computer? Same deal. Seems like an excellent, very hackable, friendly front end for a lot of interesting things.
I think it will do very, very well.
Form matters to a lot of people. This is a great form, and very few misses. I love my analog audio and for that matter, video. It isn't there. No biggie. Can always build a Pi into the same form and put it there, right? Given people have options, this just isn't a big deal.
Again, what I love most is the sweet form factor, an OS that is not a PITA, open tools, and respectable I/O suitable for a lot of purposes.
Total win.
I am getting one.
I agree. Perfect for developing P1/P2 code. Will be placing an order tomorrow.
Indeed, I think it is too.
Did anyone in the US find a reasonable source?
https://www.canakit.com/raspberry-pi-400.html
I prefer my tablet and separate mechanical Bluetooth (CK62) keyboard.
That's doubtful. Watch a teardown video as to how it's constructed.
Downloaded and installed PropellerIDE, plugged my PAB-WX USB cable in to the RPi, and downloaded a led blinker program, and got a blinking led. Tried a few more programs which also worked. Speed wise it seemed to be about the same as my laptop.
-Phil
It's funny how the 80's era that I and no doubt many others here experienced was a great time to get into computing. Prices had dropped sufficiently such that home computers had become affordable enough to be accessible to more people, though it still wasn't especially "cheap". I recall prices in the $500-800 AUD ballpark for a reasonable Z80 system in the mid 80's, so maybe ~$1.5k-2.5k in today's money? Back then we were information starved (all I really had were a couple of printed manuals and some magazine articles etc), but the best things was you could totally learn it from the ground up, probably starting in BASIC then moving to more advanced things including assembly code, Pascal, C and other languages etc while also understanding how the CPU hardware/system worked at the same time.
These days things are the opposite, hardware is dirt cheap, processors almost impossibly more complicated and online information is abundant. Think of the total complexity of the ARM SoC on the RasPi. Great feature set and amazingly cheap but how the hell does anyone new really learn that thing? It's just another Linux PC underneath. You need a team of experienced embedded SW engineers reading thousand page ARM manuals to figure it out and make it all work from scratch, so much of it now depends completely on prior existing code such as Linux kernel and drivers etc. Somewhat ironically it was developed to try to get more people into computing as desired by it's founder Eben Upton, and while it has been successful there in many ways (eg. you could outfit many classrooms with lots of machines for very little cost) I still wonder how many beginners would think to attempt the bare metal stuff in order to really learn it, without getting discouraged away from it. I'd praise anyone with the drive and perseverance for doing so.
This is where the P1 and P2 and other simpler micro-controllers in general can still shine for education. They are somewhat more complex than an 80's era Z80 of course but at least given some time and information there is still a chance for someone starting out to fully understand what it can do on their own, and then more importantly, how it actually works. The P1V codebase is a great resource there as well for those who want to take things even further.
The Z80 is a good chip for reference.
The z80 needed a clock generator chip(s), memory (RAM and EPROM - UV erasable then), and peripheral chips to make it do anything! So there was the bus you needed to understand so you could interface peripheral chips - nothing inside the micro chips back then!
Once you understood how to connect to the micro's bus, or if you were lucky enough to buy an existing board, you needed to understand the registers within the peripheral(s) you were going to connect and use. For example, the common PIO (parallel i/o chip), the serial SCC (serial async and/or sync), and possibly a video chip (6845) plus the character generator ROM. Of course EPROM (2708-2732 back then) and Static RAM (2102 1Kx1 and later 2114 1kx4) or DRAM (Z80 supported 16Kx1 upwards if I recall properly as my designs all used static).
Sure, you could get to the bare bones of the boot code. I think CPM source code was released too. There was a lot of fun in getting the boards to do basic things back then.
The P1 and P2 remove the whole bus concept and complexity. Peripherals in the most part are done with software, and mostly that software is available to look at and modify. It is easy to drive I/O pins with the P1 and P2. Its' architecture makes it easy to program, without the need to understand interrupts, and even tho we have them on P2, they are not necessary for most jobs, and when they are they are likely within their own cog/core which doesn't affect most user code.
Now, don't get me wrong. The P1 and P2 are not typical micros. They are sooo much simpler than the others! Much easier to understand, and master!
But the basics of reading and writing I/O pins is waay simpler than initialising a PIO chip.
The P2 smart async UART is sooo much simpler than the SCC, and even the P1 UART while just using the FDX object was waay simpler than the SCC.
And driving a video is much simpler too.
With the P1 and P2, the user can actually get down into the pasm code easily. I don't think the Z80 assembler really compares to the P1/P2 instruction simplicity. Of course there are some extra P2 instructions that make the exercise more difficult.
Not really? On a Z80 system you'd have to have some video ASIC do it. Something like a V9938 just needs some RAM wired up and a few registers written and then it just does it. Not too different from including a video object on a Propeller. I think the adjective you're looking for is "more flexible". A video ASIC is hardwired to render some tiles, maybe some sprites, maybe there's a bitmap mode. On a Propeller you can do literally anything you want.
Nowadays there are so many options and so many standards that it is really amazing that operating systems can make it all work together, even if it is a bit clunky. I long to go back to the real simple and well known hardware. That's what the Propeller Demoboard was to me, and at the same time an awesome upgrade from the Basic Stamp.
Overclocked to 2.3 GHz is fast enough to use it for near everything you want from a computer.
Using SSD via USB3 as a main storage.
And now I have an idea: the Pi 400 has a 40pin GPIO connector on its back. This can be used to connect a P2 board like an "interface" or "cartridge" of 8-bit systems. Now I have a i2s DAC connected there.
What it can do? Of course, enables to play with P2. But then it can be audio/video input/output for RPi. Receiving and sending i2s streams should be possible with P2 without much problems. This gives a lot of possibilities. While P2 is slower than RPi's ARM, its instruction list is much more powerful. What Ahle2 did in about 300 lines of very elegant P1 asm (SIDCog) I recreated on RPi using 2x more instruction in much more chaotic way and it uses over 30% of Pi3 core at near full (960 kHz) SID speed.
I don't know if and what quality analog video input is possible with P2, but maybe something like VHS recorder can be possible?
With 27 GPIO pins available on RPi maybe it can be also used as a "hyperram" and "filesystem driver" for P2? You can also switch off X and the new v3d driver which can give unrestricted direct access to RPis framebuffer and its video scaler, so such RPi can be a "video card" too.
Maybe the better idea is to connect RPi zero to P2. Zero is cheap; it can run a Spin compiler and it still can be a framebuffer/RAM/filesystem driver for P2, all of this under $10.
There is a bare metal environment for RPi called Ultibo. The problem: it is still not available for Pi4 series. It is intended to work on Windows host, but I have it installed on the RPi3 and using some tricks I can develop (Ultibo on Linux) and test/use (pure bare metal) on the same RPi without SD swapping.
If the Spin compiler can be ported to Ultibo (if it is C, and not C++, it can) the rest of IDE can be written for it. So: P2 board+RPi Zero together can be OS-free(!) self-hosting system.
Early Pi’s had quite modest HW fifo’s.
What I did was:
(1) an audio driver for Ultibo - I ported it from my Propeller 1 audio driver. The limiting factors were PLL/input frequency and FIFO depth. While using PLLD, set by the firmware to 500 MHz, I had to divide this by 2 or the PWM didn't work. So the PWM gets 250 MHz as input frequency, which, divided by 256 gives something about 960 kHz. The audio driver then makes noise shaping and converts 16-bit samples to 8-bit samples @ ~960 kHz. These samples are fed to PWM FIFO. The FIFO it too shallow! To make clickless sound at 960 kHz I had to tweak config.txt, overclocking the core and RAM subsystems (the CPU doesn't need to be overclocked)
Here is the driver: https://github.com/pik33/SimpleAudio
(2) testing i2s as a communication device between RPi3s. Up to 5 Mbps worked using simple breadboard type wires as a connection, maybe more can be possible with a rpoper cables, but then I decided to use ethernet for this project.
The hardware didn't change a lot between models, but then in RPi4 family they added 2 more PWMs, raised PLLD to 750 MHz and doubled FIFO depth. This of course allowed sound quality to be better on RPi4 audio jack. And then they removed audio jack in RPi400 Bluetooth and HDMI audio is pure Smile for synthesisers and games, the latency is way too high. The solution is I2S audio, which works good and with minimal latency.
I also have a bare metal (Ultibo) camera driver for RPi. I didn't test it on Zero yet but if it works, may be a cheapest camera solution for P2.
There is still no Ultibo for RPi4 family. There is Circle C++ bare metal envirinment, which I didn't test yet as it needs for me (re)learning C++.
We can always connect an USB audio dongle or (better) i2s DAC. They started to selling these now.
As I have a DAC, I connected it to RPi400. The attached picture shows how it looks like A Spectrum with an interface connected
Maybe a mod can be done to add an audio jack.