Go to Post I think that is important to note that winning teams have won without bending the rules. GP allows you to go ask, investigate and take pictures. Learn from others when you have the chance. - Al Skierkiewicz [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 02-01-2010, 19:50
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
UART Serial on cRIO

Is there currently a way to use UART TTL Serial as a method for communications to/from sensors? It would be very helpful for some gyros/accelerometers, as well as many other applications. I didn't see anything on the digital sidecar or any of the modules.
  #2   Spotlight this post!  
Unread 02-01-2010, 19:55
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: UART Serial on cRIO

Quote:
Originally Posted by Geek 2.0 View Post
Is there currently a way to use UART TTL Serial as a method for communications to/from sensors? It would be very helpful for some gyros/accelerometers, as well as many other applications. I didn't see anything on the digital sidecar or any of the modules.
There is no TTL UART currently available. Your serial communication methods are a full voltage UART on the cRIO's head and TTL voltage SPI and I2C on the digital breakout.

You might be able to fake out the SPI driver to do your dirty work, but I haven't tried.
  #3   Spotlight this post!  
Unread 02-01-2010, 19:58
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: UART Serial on cRIO

Are we allowed to use the serial port on the cRIO? I vaguely remember hearing that we weren't allowed to use it. If we can, I would assume I could just use a MAX232 with it.
  #4   Spotlight this post!  
Unread 02-01-2010, 20:11
IceStorm IceStorm is offline
Mentor FRC 5046, FTC 8688
AKA: Chad
FRC #5046 (Jacked Up Jackets)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Michigan
Posts: 137
IceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of light
Send a message via AIM to IceStorm Send a message via Yahoo to IceStorm
Re: UART Serial on cRIO

One thing to keep in mind about the serial port on the crio is that if and when the GDC decides to allow us to use the Jaguars CAN interface that is how they intend to interface to it. The hardware beta teams were testing the use of CAN this year but no one will know until kickoff if it will be allowed or not.
  #5   Spotlight this post!  
Unread 02-01-2010, 20:47
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: UART Serial on cRIO

Yeah, I thought about that too. Maybe there's a way to use the serial ports from the empty module slots?

There's a SerialPort.h in the WPILib, but it looks like it's meant for that one serial port.

It just irks me how complex and expensive this system is yet it doesn't (easily) provide something so simple.
  #6   Spotlight this post!  
Unread 02-01-2010, 20:54
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: UART Serial on cRIO

Quote:
Originally Posted by Geek 2.0 View Post
Are we allowed to use the serial port on the cRIO? I vaguely remember hearing that we weren't allowed to use it. If we can, I would assume I could just use a MAX232 with it.
6 Days, 16 Hours and 54 minutes to find out that one.

Technically it was supported last year, but disallowed in the rules.

Quote:
Originally Posted by IceStorm
One thing to keep in mind about the serial port on the crio is that if and when the GDC decides to allow us to use the Jaguars CAN interface that is how they intend to interface to it. The hardware beta teams were testing the use of CAN this year but no one will know until kickoff if it will be allowed or not.
There are other methods to bridge, such as the 2CAN. Again, GDC... wait... kickoff soon...


Quote:
Maybe there's a way to use the serial ports from the empty module slots?
Those aren't serial ports as you would think of them. They are just a bunch of pins that go straight into the FPGA.
  #7   Spotlight this post!  
Unread 02-01-2010, 20:56
dmcguire3006 dmcguire3006 is offline
Registered User
FRC #3006 (West High FIRST Robotics)
Team Role: Teacher
 
Join Date: Dec 2008
Rookie Year: 2009
Location: Salt Lake City, UT
Posts: 21
dmcguire3006 is on a distinguished road
Re: UART Serial on cRIO

The cRIO serial port is advertised as a true RS-232, hence it already has the level shifting drivers built in. No need for MAX232.
http://decibel.ni.com/content/servle...structions.pdf
  #8   Spotlight this post!  
Unread 02-01-2010, 21:30
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: UART Serial on cRIO

Is there any other way to get it working? Maybe Soft Serial of sorts? (alliteration ftw)

It seems like something that should be supported.
  #9   Spotlight this post!  
Unread 02-01-2010, 21:50
dmcguire3006 dmcguire3006 is offline
Registered User
FRC #3006 (West High FIRST Robotics)
Team Role: Teacher
 
Join Date: Dec 2008
Rookie Year: 2009
Location: Salt Lake City, UT
Posts: 21
dmcguire3006 is on a distinguished road
Re: UART Serial on cRIO

This year Java supports a I2C Class for synchronous serial interface to sensors. There is also two I2C connectors on the Digital Sidecar. Any help?
http://www.andymark.biz/am-0266.html
  #10   Spotlight this post!  
Unread 02-01-2010, 21:58
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: UART Serial on cRIO

Could you post a link to the specific sensor in question?
  #11   Spotlight this post!  
Unread 02-01-2010, 22:34
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: UART Serial on cRIO

Quote:
Originally Posted by dmcguire3006 View Post
This year Java supports a I2C Class for synchronous serial interface to sensors. There is also two I2C connectors on the Digital Sidecar. Any help?
I always could use I2C, but my only problem with that is I would need to put an intermediate micro to collect the data and send it via I2C, or rather make it available, seeing as it would be the slave.

Quote:
Originally Posted by EricVanWyk View Post
Could you post a link to the specific sensor in question?
Here's one example:
http://www.sparkfun.com/commerce/pro...oducts_id=9510

The reason is because they designed it with a micro on board to collect and package the data. I wish they would have broken out the SDA and SCL lines as well so I could use I2C, but that's not the case.



Again, this is all theoretical at this point, I just saw that board and thought "wouldn't that be cool" and tried figuring out how I would interface it. I just like the idea of serial because it offers better accuracy with less interference than just an analog signal.
  #12   Spotlight this post!  
Unread 03-01-2010, 02:25
IceStorm IceStorm is offline
Mentor FRC 5046, FTC 8688
AKA: Chad
FRC #5046 (Jacked Up Jackets)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Michigan
Posts: 137
IceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of light
Send a message via AIM to IceStorm Send a message via Yahoo to IceStorm
Re: UART Serial on cRIO

Quote:
Originally Posted by Geek 2.0 View Post
I have one of the Arduino Duemilanove boards http://arduino.cc/en/Main/ArduinoBoardDuemilanove that i bought for playing around with awhile back and i'm pretty sure that the board i have is based off the same chip. On mine there are both serial and I2C ports. I have actually used the I2C ports on the board to interface with a memory chip in a Cat Genie solution cartridge and tell the chip there are more wash cycles left in the cartridge then there are.

If you look at the 2nd page of the schematics http://www.sparkfun.com/datasheets/S...-Razor-v13.pdf Pins 27 and 28 are the SCL and SCA pins used for I2C as well as being analog inputs. I'm not sure if these are used or not on the board for one of the many sensors or if you could some how hijack them and use them to send I2c back to the crio or not.

According to the Arduino website by using I2C: 4 (SDA) and 5 (SCL) is supported I2C (TWI) communication using the Wire library.
  #13   Spotlight this post!  
Unread 03-01-2010, 02:37
IceStorm IceStorm is offline
Mentor FRC 5046, FTC 8688
AKA: Chad
FRC #5046 (Jacked Up Jackets)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Michigan
Posts: 137
IceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of lightIceStorm is a glorious beacon of light
Send a message via AIM to IceStorm Send a message via Yahoo to IceStorm
Re: UART Serial on cRIO

Shoot...

I spent a bit more time looking at the board schematics somemore after i had already posted and it looks like they are actually using the I2C interface of the chip to talk to both the Triple Axis Accelerometer - ADXL345 and the Triple Axis Magnetometer - HMC5843 both of which are sold in breakout board form by sparkfun with I2C interfaces on the board. You might be able to just skip the board you referenced above and get the breakout boards for the individual components and just hook them up directly through I2C to the Crio.

Coming from a hobbyist not and EE and someone with a little but not a ton of hardware programming experience this is just a thought.
  #14   Spotlight this post!  
Unread 03-01-2010, 14:33
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: UART Serial on cRIO

Quote:
Originally Posted by IceStorm View Post
Shoot...

I spent a bit more time looking at the board schematics somemore after i had already posted and it looks like they are actually using the I2C interface of the chip to talk to both the Triple Axis Accelerometer - ADXL345 and the Triple Axis Magnetometer - HMC5843 both of which are sold in breakout board form by sparkfun with I2C interfaces on the board. You might be able to just skip the board you referenced above and get the breakout boards for the individual components and just hook them up directly through I2C to the Crio.

Coming from a hobbyist not and EE and someone with a little but not a ton of hardware programming experience this is just a thought.
Actually, I've been working a lot with I2C as of recent, and I know for a fact that you can use the I2C for communicating with the Magnetometer as well as transferring data to another slave. However, it seems like too much of a work-around to solder a wire directly to the pins to make it work, etc.

And you're right, they are using the same micro as the Duemillanove. I have one and I'm an avid Arduino user. Actually, keep your eyes open in the coming season... My team (107) might just be using a bunch of them, if I get things my way.
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
Reimaging the cRio Issues there are no cRio devices on the subnet Stuart FRC Control System 2 25-02-2009 23:41
cRIO configuration issue- serial connection to laptop Torbots 1197 FRC Control System 5 28-01-2009 22:28
DS tty serial and crio run speed Mr-Shutter FRC Control System 5 21-01-2009 12:39
serial edomus Technical Discussion 4 12-02-2004 15:09
Serial Shortening Gobiner Programming 6 14-02-2003 23:48


All times are GMT -5. The time now is 07:32.

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