I have a Raspberry Pi embedded computer. I wanted to use the Pi to control a PIC Microcontroller (V0.5). Would anyone know of any helpful resources or can provide tips/info on how to send commands over an RJ11 into the Rx1 input similar to the way the 75 MHz Transmitter & Receiver works?
The Vex Wiki has this page, 6 Channel PPM Signal.
There are some other forum posts about the PPM Signals.
Quazar can point you to some more specifics…
I’ve been working on a project to use the serial port on a PIC or Cortex to communicate to an arduino via XBEE but it should work fine with a drict connection. I know the Raspberry Pi has a serial port. I was going to try to get code to work from the Pi as well, but hadn’t got to that yet. I’ve been meaning to post my examples for a while but haven’t got to taking pictures yet. I made a remote with a sparkfun joystick shield
plugged into my arduino Mega:
https://www.sparkfun.com/products/11061
A couple of XBees https://www.sparkfun.com/products/10414 & regulated breakout boards [https://www.sparkfun.com/products/11373 and I had as they say the rockin teen combo.
I’ll see if I can’t get some pics and post the thing in the next day or so. The code for the PIC is pretty simple and small as there is not a lot of room nor capabilities on a PIC compared to the Cortex.
Cheers Kb](https://www.sparkfun.com/products/11373 and I had as they say the rockin teen combo. )
It isn’t hard to generate such a signal - you just need a timer that can toggle a GPIO pin, and an interrupt handler to set new values to the timer every time it expires. I wrote some PIC code to generate this signal and posted it here.
The signal carries 6 channels of data (12 channels if you drive both Rx1 & Rx2), and is updated about 60 times per second. It is intended for analog data, so it isn’t exact; if you send a 137, it may be received as anything from 135-139, for instance. Also, the signal is strictly one-way, so the Pi can send data to the PIC, but not the other way around.
Having said all that, I’d strongly recommend going with serial as Kevin suggests. It has library support on all the relevant platforms, is two-way, and is exact (Pi sends 137, PIC receives 137).
Let us know which way you want to go, and we can give you some pointers to get you started.
Cheers,
- Dean
I’ve Posted my examples here:
https://vexforum.com/showthread.php?p=324297#post324297
I hope it is useful, Let us know if you get the Pi working with the PIC. I might be interested in that capability as well.
Cheers Kb
Thanks for your responses!
I’ll be going over serial as Kevin suggested. The Raspberry Pi does have a serial port (as part of the GPIO pins). So I’ll need to write my own protocol and parser to run on the PIC. I see that Kevin already has a program that does this so I’ll use that.
I don’t have the programming kit. Any suggestions on cheaper DIY programming kits? I’m a CS major and new to electronics but I can follow a basic high level guide and figure out the details.
a Little work on Google came up with two hits that look promising, but it is beyond my current knowledge how to build one from scratch.
Here’s the thread:
here’s the website with the finished product:
[http://www.crestoak.com/robotics/progcable/progcable.html
I have less time these days to mess around with projects like this.
Cheers Kb](http://www.crestoak.com/robotics/progcable/progcable.html)