w_t
Posts: 19
Joined: Mon Dec 22, 2014 11:22 am

Several modules simultaneously on GIPIO

Sat Jun 06, 2015 5:06 pm

Hello,
how can I use multiple modules type, Accelerometer, GPS, ultrasound, using the usual pin GIPIO.

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Several modules simultaneously on GIPIO

Sat Jun 06, 2015 5:34 pm

Just Do It!

What makes you think there is (or might be) a problem?

Simply be thoughtful and assign a different GPIO pin to each module or function, and take care to reflect those choices in your program or script.

w_t
Posts: 19
Joined: Mon Dec 22, 2014 11:22 am

Re: Several modules simultaneously on GIPIO

Sat Jun 06, 2015 7:22 pm

So you're saying that I can use the new PIN as SCL and SDA in GIPIO where they are?

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Several modules simultaneously on GIPIO

Sat Jun 06, 2015 7:47 pm

w_t wrote:So you're saying that I can use the new PIN as SCL and SDA in GIPIO where they are?
CLK, MISO, MOSI & CS0 is one SPI bus, CLK, MISO, MOSI & CS1 is the other SPI bus. So you can run two SPI devices.

With I2C SCL, SDA is an addressable bus system each device gets a unique device address (some devices have A0, A1, A2 pins to control their bus address). So connecting more than one device to the bus is simple.

If you need more than two SPI devices you either have to drive your own CS pin or you have to bit-bang the whole protocol on four pins.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Ritchie
Posts: 5
Joined: Tue Jun 02, 2015 11:08 am

Re: Several modules simultaneously on GIPIO

Wed Jun 10, 2015 9:57 am

Hello,
I have bought and tested a Velleman VM205 oscilloscope + logic analyzer add-on card.
It works fine for what I need it for.
I also have an ADAFRUIT 2.8" touchscreen for my Raspberry PI
I've tested this too and it works fine once you setup the Graphic interface to send the screensignal to the TFT in the correct(ed) resolution.
Now I want to combine both SPI devices on the same SPI-bus.
How do I do this please ? The spec's for the VM205 kit are here: http://www.velleman.eu ; search for: VM205
The intention is to make a full portable oscilloscope with these 2 .
The Velleman scope-kit only uses these pins : SPI_MOSI , SPI_MISO , SPI_SCLK , SPI_CE0 , GND , 3.3V , 5V
Many thanks for your help in advance !!! Ritchie

User avatar
mikronauts
Posts: 2783
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: Several modules simultaneously on GIPIO

Thu Jun 11, 2015 1:47 pm

You cannot combine a third party SPI LCD with another third party card that uses the same SPI port.

- fbtft assumes that it is the only one using that SPI port
- the scope module would make the same assumption

It will not work.
Ritchie wrote:Hello,
I have bought and tested a Velleman VM205 oscilloscope + logic analyzer add-on card.
It works fine for what I need it for.
I also have an ADAFRUIT 2.8" touchscreen for my Raspberry PI
I've tested this too and it works fine once you setup the Graphic interface to send the screensignal to the TFT in the correct(ed) resolution.
Now I want to combine both SPI devices on the same SPI-bus.
How do I do this please ? The spec's for the VM205 kit are here: http://www.velleman.eu ; search for: VM205
The intention is to make a full portable oscilloscope with these 2 .
The Velleman scope-kit only uses these pins : SPI_MOSI , SPI_MISO , SPI_SCLK , SPI_CE0 , GND , 3.3V , 5V
Many thanks for your help in advance !!! Ritchie
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

Ritchie
Posts: 5
Joined: Tue Jun 02, 2015 11:08 am

Re: Several modules simultaneously on GIPIO

Thu Jul 16, 2015 7:00 am

Hello Mikronauts,
Thanks for the reply.
Maybe it is possible using a PIRACK board to plug in both "extention" boards ?
Do you know this board ?
Have a nice day.
Ritchie
mikronauts wrote:You cannot combine a third party SPI LCD with another third party card that uses the same SPI port.

- fbtft assumes that it is the only one using that SPI port
- the scope module would make the same assumption

It will not work.
Ritchie wrote:Hello,
I have bought and tested a Velleman VM205 oscilloscope + logic analyzer add-on card.
It works fine for what I need it for.
I also have an ADAFRUIT 2.8" touchscreen for my Raspberry PI
I've tested this too and it works fine once you setup the Graphic interface to send the screensignal to the TFT in the correct(ed) resolution.
Now I want to combine both SPI devices on the same SPI-bus.
How do I do this please ? The spec's for the VM205 kit are here: http://www.velleman.eu ; search for: VM205
The intention is to make a full portable oscilloscope with these 2 .
The Velleman scope-kit only uses these pins : SPI_MOSI , SPI_MISO , SPI_SCLK , SPI_CE0 , GND , 3.3V , 5V
Many thanks for your help in advance !!! Ritchie

User avatar
joan
Posts: 14935
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Several modules simultaneously on GIPIO

Thu Jul 16, 2015 7:54 am

Both your devices use the main SPI peripheral. There may be two devices connected to that SPI bus, but to do so they must be assigned different slave select gpios.

I.e. if one uses SPI_CE0 the other must use SPI_CE1.

Only you can tell if that is achieveable with the kit you have bought.

Return to “General discussion”