Go to Post COMPETE like crazy for the 2 minutes you are on the field, COOPERATE like crazy all the rest of the time. When we play this way, we all win. - Chris Fultz [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-09-2007, 13:07
sciguy125 sciguy125 is offline
Electrical Engineer
AKA: Phil Baltar
FRC #1351
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Sunnyvale, CA
Posts: 519
sciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond repute
Send a message via AIM to sciguy125 Send a message via MSN to sciguy125 Send a message via Yahoo to sciguy125
data bus

Has anyone looking into trying to implement an external data bus for the RC? I've been thinking about it, but I've come up against some big limitations.

The first is that the digital I/Os are filtered. I think I figured that the regular ports would get ~10 bytes/ms with an 8bit wide parallel bus. Using the interrupt ports (with a higher pass filter) would require a serial bus because of their limited number. I figured that it'd get about the same data rate, but would also require control bytes. Essentially, no real gain, but with much more complexity.

The next options are the serial ports. The TTL port is out of the question because it would eat the camera's interface. This leaves the program port. My main concern is that it would eat the RC's main debugging port. Actually...what would happen if more than two devices are connected to this port? Say that the bus controller is on the same port (split cable), but has a command set that would have it ignore any traffic between the RC and a PC. Of course, the conflict resolution would be really nasty. There's also the option of passthrough; flag the bus traffic and pass anything else.

Sorry for the rambling, I just want to get ideas out.

Ideas/comments?
__________________

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE/S/P a-- e y-- r-- s:++ d+ h! X+++
t++ C+ P+ L++ E W++ w M-- V? PS+ PE+
5- R-- tv+ b+ DI+++ D- G
------END GEEK CODE BLOCK------
  #2   Spotlight this post!  
Unread 04-09-2007, 17:39
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
Re: data bus

Yeah, we played with 8 bit dual port ram. The idea was to have a small amount of parallel transfer buffering between various smart peripherals. Each would own a different address chunk and there would be a different dual port ram associated with each peripheral.

We never got it very reliable due to heavy RC filtering on the pins. I was going to go back and put some schmitt buffers to clean up the signal edges as I thought the slow rise/decay times that might be part of the problem... but never got back to it.
  #3   Spotlight this post!  
Unread 05-09-2007, 11:51
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: data bus

Always the biggest problem with parallel data transfer (and one of the major reasons it disappeared from printers) is that no matter what you do, all 8 signals do not arrive at the same time... and the smallest little change in the electromagnetic field surrounding and within the wires can change the time it takes for each signal to travel.

However, in your case, I think you can make the parallel work. What you'll have to do is make your parallel bus synchronous, not asynchronous. You might try having 9 lines run from one device to the other. 8 for data, one for sync. The 8 data lines can run to/from any old DigitalI/O pins, but run the sync line to a PORTB interrupt pin. All you'll have to do is make sure that you wait a microsecond or so (at least 5 nanoseconds per foot of transmission distance) then send your sync pulse. Or, you can write your byte and send the sync pulse all at the same time, then have your recieving device read they byte when the sync pulse goes low (again watiting at least 5 nanoseconds per foot).

If you don't want to play around with synchronous parallel (i wish you would though, sounds like a fun project!) I like your idea of putting a bus control module on the program port.... very interesting. You might make up some kind of command set to direct where the serial port on the controller connects to... kind of like a digitally controlled serial switch box. You'd just need a micro with a few UARTS to pass bytes around inside... i'm sure most low end DSPs and probably some higher end embedded processors would have the 3+ uarts you'd need (unless you want to bit bang, which is another option entirely).

Very cool ideas... keep us 'posted'!

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
  #4   Spotlight this post!  
Unread 06-09-2007, 10:22
John Gutmann John Gutmann is offline
I'm right here
AKA: sparksandtabs
FRC #0340 (GRR)
Team Role: Mechanical
 
Join Date: Feb 2005
Rookie Year: 2004
Location: rochester
Posts: 804
John Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant future
Send a message via AIM to John Gutmann Send a message via MSN to John Gutmann Send a message via Yahoo to John Gutmann
Re: data bus

I don't know how the robot controller is setup up on the inside, but try SPI. It is a VERY simple system.

-John
  #5   Spotlight this post!  
Unread 06-09-2007, 11:47
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: data bus

Quote:
Originally Posted by John Gutmann View Post
I don't know how the robot controller is setup up on the inside, but try SPI. It is a VERY simple system.
The Robot Controller's SPI hardware is already taken by the master-to-user processor link. It isn't available for outside use.
  #6   Spotlight this post!  
Unread 06-09-2007, 16:20
bear24rw's Avatar
bear24rw bear24rw is offline
Team 11 Programming Captain
AKA: Max T
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2005
Location: Flanders, NJ
Posts: 385
bear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to behold
Send a message via AIM to bear24rw
Re: data bus

I dont know what the minimum clock speed is for spi but you could probably just do it manually without using the hardware, you would just have to clock out your own bits.
  #7   Spotlight this post!  
Unread 06-09-2007, 19:02
sciguy125 sciguy125 is offline
Electrical Engineer
AKA: Phil Baltar
FRC #1351
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Sunnyvale, CA
Posts: 519
sciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond repute
Send a message via AIM to sciguy125 Send a message via MSN to sciguy125 Send a message via Yahoo to sciguy125
Re: data bus

Quote:
Originally Posted by bear24rw View Post
I dont know what the minimum clock speed is for spi but you could probably just do it manually without using the hardware, you would just have to clock out your own bits.
That's sort of the problem I've run into. The I/Os are so heavily filtered that I don't think I'll be able to get a reasonable data rate. I think this problem is a project killer.
__________________

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE/S/P a-- e y-- r-- s:++ d+ h! X+++
t++ C+ P+ L++ E W++ w M-- V? PS+ PE+
5- R-- tv+ b+ DI+++ D- G
------END GEEK CODE BLOCK------
  #8   Spotlight this post!  
Unread 06-09-2007, 19:30
Stuart's Avatar
Stuart Stuart is offline
#include coffee.h
FRC #1745 (P51- Mustangs)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Dallas, TX
Posts: 414
Stuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond repute
Send a message via AIM to Stuart
Re: data bus

Well Ill share what Ive been working on for a while. what you could do is use the on board TTL serial port to talk with another micro chip( I would suggest a propeller chip from parallax). then set up another serial port on that microchip(ie 2 serial ports on 1 chip)so you dont lose the camera . you could then use the rest of the io pins on the chip to do what ever data you want to do.



and yes I am being coy about this. While I cant say much at this time(its not ready yet) I can say that this is a problem that my team talked about at the end of last year, and think we might have a solution.
__________________
Proud mentor of Team #1745 the P-51 Mustangs

If at first it doesn't work, use a hammer.
If that doesn't work, use a bigger hammer.
  #9   Spotlight this post!  
Unread 06-09-2007, 19:36
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: data bus

Just how much data do you think you'll want to be passing between devices? The I/O is certainly fast enough for communicating with sensors and adjusting the motors based on the data. I'm assuming that part of the goal of using an external device is to preprocess information and give simple answers to the Robot Controller. If you're planning to read large amounts of data from the device, what benefit do you expect to get from using it?
  #10   Spotlight this post!  
Unread 06-09-2007, 20:39
sciguy125 sciguy125 is offline
Electrical Engineer
AKA: Phil Baltar
FRC #1351
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Sunnyvale, CA
Posts: 519
sciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond repute
Send a message via AIM to sciguy125 Send a message via MSN to sciguy125 Send a message via Yahoo to sciguy125
Re: data bus

I wasn't as concerned about how much data, but rather how fast I can get the data I want. (say encoders that need to be read at a known time) After thinking about it more, it's probably alright.

For a parallel bus, the data and address lines would probably have to be shared to minimize the number of I/Os it eats. This means that it takes two bus operations to read/write data. The ports have an RC constant of 6.8us. We'd probably have a settling time of ~25us for solid operation. So, access time is ~50us. That's an enternity in processor terms, but it might still work. How long is the access time for the analog ports?

A large amount of data may be a problem. However, a loop running in the background (triggered by a timer set to interrupt) could work on transfering data in a buffer. For anything that is time sensative, there could be a "do this now, I'm waiting" function.
__________________

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE/S/P a-- e y-- r-- s:++ d+ h! X+++
t++ C+ P+ L++ E W++ w M-- V? PS+ PE+
5- R-- tv+ b+ DI+++ D- G
------END GEEK CODE BLOCK------
  #11   Spotlight this post!  
Unread 06-09-2007, 20:53
JimWright949's Avatar
JimWright949 JimWright949 is offline
The Owen Day of Seattle
AKA: Jim Wright
FRC #4542 (Titanium Talons)
Team Role: Mentor
 
Join Date: Sep 2003
Rookie Year: 2003
Location: Redmond, WA
Posts: 94
JimWright949 is a splendid one to beholdJimWright949 is a splendid one to beholdJimWright949 is a splendid one to beholdJimWright949 is a splendid one to beholdJimWright949 is a splendid one to beholdJimWright949 is a splendid one to beholdJimWright949 is a splendid one to behold
Re: data bus

What you can do is use an Atmel AVR to convert the TTL serial port to a I2C bus (Two-wire Serial Interface), then use another Atmel AVR to convert I2C (Two-wire Serial Interface) to TTL for the camera. Then you can hang other things off of the I2C (Two-wire Serial Interface) bus. I use AVRs because there is very little overhead to programming them, about $5 of Radio shack parts.

The AVR can also be used to convert the serial port to an external SPI bus.

-Jim

Last edited by JimWright949 : 06-09-2007 at 21:02.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pic: Bus invasion!! anna~marie Chit-Chat 10 08-05-2006 15:02
Want to share a Bus? Norm M. Championship Event 1 20-03-2003 00:24
Negative Bus Greg General Forum 3 03-02-2003 07:33
Share a bus. Useless member Regional Competitions 0 13-01-2003 22:59


All times are GMT -5. The time now is 06:43.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi