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.

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.

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.

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.

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 Days, 16 Hours and 54 minutes to find out that one.

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

There are other methods to bridge, such as the 2CAN. Again, GDC… wait… kickoff soon…

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.

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.

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

It seems like something that should be supported.

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?

Could you post a link to the specific sensor in question?

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.

Here’s one example:

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.

I have one of the Arduino Duemilanove boards 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 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.


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.