Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I'd like to make a small "MCU" consisting of a camera, a mic, some LEDs, and probably a cheap ARM CPU. I'm calling this my "SMIC" (streaming media IC).

I'd like to connect this SMIC MCU to a Raspberry Pi, and then write software for the Pi that can communicate with the SMIC. This software should be able to power the camera on/off, power the microphone on/off, turn LEDs on/off, etc.

Is this even possible? If not, why?!? If so, how?!?

I assume that I'll need the following setup:

  1. A homegrown device driver installed on the Pi for communicating with the SMIC
  2. A homegrown device driver installed on the SMIC for communicating with the Pi
  3. Homegrown "user" software on the Pi for issuing commands to the SMIC
  4. When the user software wants to, say, turn a green LED on, it must communicate with the device driver somehow
  5. The device driver, then must somehow communicate with the GPIO pins

If anything I have assumed is incorrect, please correct/clarify for me!

Assuming I'm more or less on track, then my real question is:

How does the user software send the TURN_GREEN_LED_ON signal to the device driver, and how does the device driver relay that command on to the actual GPIO pins?

I guess I'm just having a tough time seeing the forest through the trees here. Thanks in advance.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Probably you should read something about microcontrollers communication methods. There are some standard mechanisms that are supported by almost any microcontroler (including RPi) and you are mentioning that you want to use some microcontroler on your board too. Those mechanisms are UART, SPI or I2C. It will be quire simple to establish communication using those. You will not need any special driver as kernel supports those kind of communication. Newertheless you will need some programs on both pi and your board to exchange data and commands.

share|improve this answer
    
Thanks @codewarrior (+1) - so to confirm: I can select one of these communication methods (UART, SPI, I2C, etc.), and then just have my programs communicate with each other over this method? If that's the case, I assume these methods provide an API of some sort? Thanks again! –  zharvey Dec 8 '12 at 22:19
    
Not really API but depending on method choosen there will be some support either kernel drivers for communication and/or some user space libraries that you could use. Those mechanisms are standard and are widelly used so you should not have problems with implementing those. RPi has also some GPIO pins dedicated for those types of communication. –  codewarrior Dec 9 '12 at 16:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.