PDA

View Full Version : passing data between 2 plug-a-pods


dfitz
04-21-08, 06:19 AM
Hi there,

I've ran out of processing on one plug-a-pod, so I would like to use a second plug-a-pod to implement some really fast hardcore gyro filtering for 2 gyros (later probably 3 gyros) then transfer the data across to the other main board.

I want to be able to run the filtering very fast, and obtain a smoothed angular velocity estimate and send this to the other board to use. My requirements are that there will be 2 velocities that need to be sent, each in a range from 0->360 with 0.01 resolution (36000 data points reqd), and the faster the better. I'm thinking something along the lines of 120 hz.

I'm wanting to know what you guys think is the best way to get the data across. My thinking is perhaps using, pwm, serial, pe ports, or simply output/input an analog signal. Some issues are though that: i'm already using the rs232 for other comms, using pe6/7 for control to a camera, i have a h-bridge board that's using up 2 PWM channels. The analog ports won't be any good, as a lot of the filtering done on the filtering board of gyros coming into the plug-a-pod is to eliminate the system noise on the analog ports.

What so do you think will be the best way to pass the data between the boards?

thanks again,
Daniel

RMDumse
04-21-08, 09:34 AM
2 velocities that need to be sent, each in a range from 0->360 with 0.01 resolution (36000 data points reqd), and the faster the better. I'm thinking something along the lines of 120 hz.

...My thinking is perhaps using, pwm, serial, pe ports, or simply output/input an analog signal.

Well, I'd rule out analog, because it is 12-bit and your needs are 15+ bits to pass 1 out of 36000 parts.

So what about PWM? It is only 15-bit so there's still a little loss.

120Hz fortunately isn't that bad. At 115200 and 100Hz, I've passed a long sentence of printed data from a Pod to a PC. So I'd suggest serial if it wasn't in use already.

You could use the other two PWM's for a half parallel port, and maybe PE4,5 for handshaking lines, then do 4 transfers per number and have all 16-bits over. Which would mean 8 transers every 120 Hz.

But seriously, what about the CAN Bus? Sounds perfect. It can run 500 kHz, and you just put the data into the CAN tx registers, initiat transfer (think that's toggle a bit) and they (more or less magically) appear in one of the rx registers on the other side, with a verification handshake done in hardware.

Think CAN is the way I'd go.

dfitz
04-30-08, 05:23 AM
CAN! Excellent I hadn't even realised the plug-a-pod had CAN bus.

That's a great suggestion.

cheers (again).
Daniel