Page 1 of 1
ZX device as slave to Raspberry Pi
Posted: 15 April 2013, 11:52 AM
by GTBecker
I'm moving toward using a ZX-24n as a slave to a Pi, providing ADCs and more serial and GPIO, using SPI.
I've slaved a ZX-24n to a ZX-24n before and, excepting the inconvenience of not being able to download code to the slave via SPI, it works very well.
Is anyone else also mating a ZBasic device to a Pi?
Posted: 16 April 2013, 9:52 AM
by dlh
I have a Pi but haven't done anything with it, as yet, due to increased health problems.
There are some things where I'd like to use the Pi to supervise things which are easier to handle with a ZBasic chip so I'll be interested in anything you do.
Have you seen this page? I'll likely copy his physical interface.
Posted: 16 April 2013, 11:28 AM
by GTBecker
> ... Have you seen this page?
No link.
I have two Pi (that'd be Raspberry Tau?), one running as a 1TB NAS in the lab and one that serves the streams on my sig, a solar-powered and WiFi'd machine that's in an ammo box out on the seawall where the VLF antenna (and its seawater ground) works best.
I'll be adding a Motorola Oncore UT+ GPS for accurate (<1uS) stream timestamping, a pair of microphones/hydrophones/seismics or SID/solar/lunar/Jovian receivers and several watchdogs to make a versatile independent remote geophysics monitor. Using Ubiquity PicostationM2HP or BulletM2HP WiFi radios and gain antennas, it will be able to operate over a 50km path for very remote siting, still directly connected to the Internet. It consumes, at the moment, 8.2Watts total (Pi running at 1.1GHz) so there is some additional power available inside my 10W target.
The Pi has two UARTS but they use the same GPIO pins, oddly, so only one can be used at any moment, and it has no ADC - so a ZX-24x will fill those gaps, add some additional I/O and provide another hardware watchdog. [While very reliable in my testing so far, the Pi (running the Raspian Debian Linux variant) can still crash, as can any machine. It needs to be watched even beyond its own internal watchdog and rebooted when necessary.]
Since the GPS needs a serial port (1pps is via another path) and the Pi UART is already used (as a Linux console, Bluetoothed so the machine can be controlled at the remote site without opening the package), the -24x will also handle the GPS serial, and monitor power and temperature, illumination, etc. The Pi can talk to two SPI devices so the -24x will run as an SPI slave at 3.3v, using just six GPIO connector pins including power and ground.
It has its flaws but the Pi is nevertheless a very powerful little inexpensive machine with which this Linux user feels at home. With the addition of ZBasic for I/O processing, the sky is the limit. Or maybe a cloudy sky is...
Posted: 16 April 2013, 11:45 AM
by cerickson
There are a growing number of Arduino-Pi interfaces that look very promising:
http://wyolum.com/raspberry-pi-a-la-mode/
http://www.web4robot.com/
http://omer.me/2012/05/introducing-ponte/
http://www.cooking-hacks.com/index.php/ ... ion-bridge
http://elinux.org/RPi_Expansion_Boards
Put Zbasic on the Arduino board and you can have Zbasic do all of the real-world interfacing stuff, using Arduino shields and then communicate with the Raspberry Pi at a high level and let the RP do the interfacing with the rest of the world.
Posted: 16 April 2013, 12:31 PM
by dlh
GTBecker wrote:> ... Have you seen this page?
No link.
http://www.briandorey.com/post/ADC-Pi-R ... nline.aspx
Posted: 16 April 2013, 19:46 PM
by stevech
I have an RPi too. Fun little thing. But
The Pi has two UARTS but they use the same GPIO pins, oddly, so only one can be used at any moment, and it has no ADC - so a ZX-24x will fill those gaps, add some additional I/O and provide another hardware watchdog. [While very reliable in my testing so far, the Pi (running the Raspian Debian Linux variant) can still crash, as can any machine. It needs to be watched even beyond its own internal watchdog and rebooted when necessary.]
Linux has drivers for USB/Serial devices, so you can add serial ports that way.
Posted: 16 April 2013, 19:58 PM
by GTBecker
> ... you can add serial ports that way...
Drivers aren't the problem. How do you resolve the pinout problem so that both UARTS can be used simultaneously?
Oh, you mean USB/RS232 dongles? Yeah, but only two working USB host ports work reliably. Add a hub and you're in trouble, and the ports need to run at 1.1 speed for sound modules. USB glitching is another of the Pi's failings, presumably fixable via firmware - but not so far despite many complaints. Pissed-off USB users are a common theme in the forums.
Posted: 17 April 2013, 20:39 PM
by stevech
GTBecker wrote:> .
Oh, you mean USB/RS232 dongles? Yeah, but only two working USB host ports work reliably. Add a hub and you're in trouble, and the ports need to run at 1.1 speed for sound modules. USB glitching is another of the Pi's failings, presumably fixable via firmware - but not so far despite many complaints. Pissed-off USB users are a common theme in the forums.
Hmm. Didn't know that. I thought that a powered USB hub solved all. Well, I have some Ethernet to serial adapters!
Posted: 24 April 2013, 5:45 AM
by dlh
The just released BeagleBone Black ($45 including external 5V power supply) looks like a viable Pi alternative and can run Android 4.0 which might be attractive to those who have Basic4android. (I'm assuming B4A can be made to run on it.)
http://beagleboard.org/Products/BeagleBone%20Black
Posted: 24 April 2013, 8:40 AM
by GTBecker
dlh wrote:BeagleBone Black
Still no hardware floats, unfortunately; otherwise very capable.
Posted: 26 April 2013, 10:31 AM
by dlh
Erel Uziel, who created B4A, tells me that applications compiled with B4A should run on the BeagleBone Black under Android so I think I'll get one to play with.