Go to Post For our next exercise, we should define Beauty and Truth. :) - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 07-07-2007, 01:42
bglass bglass is offline
Registered User
AKA: Bryan
#1609 (S.W.A.R.M.)
Team Role: Leadership
 
Join Date: Feb 2005
Rookie Year: 2004
Location: St. Louis
Posts: 8
bglass is an unknown quantity at this point
Send a message via AIM to bglass
Re: RS232 (Serial) Communication To OI

Sounds good. Since the consensus seems to be that the microcontroller is the best way to go, I guess I'll have to look into that. If anybody has any suggestions on which to use (or how to get started), please let me know. Best wishes.
  #2   Spotlight this post!  
Unread 07-07-2007, 01:50
Unsung FIRST Hero
Greg Marra Greg Marra is offline
[automate(a) for a in tasks_to_do]
FRC #5507 (Robotic Eagles)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2005
Location: San Francisco, CA
Posts: 2,030
Greg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond repute
Re: RS232 (Serial) Communication To OI

Quote:
Originally Posted by bglass View Post
Sounds good. Since the consensus seems to be that the microcontroller is the best way to go, I guess I'll have to look into that. If anybody has any suggestions on which to use (or how to get started), please let me know. Best wishes.
Having used PIC 18F2455's in an introduction to mechatronics course, I would recommend them. They can be programmed by an inexpensive programmer and support USB communication in addition to RS232. You'll need to use another chip (A MAX232, or similar) to turn the serial from your serial port into the type of serial the PIC likes (there is a voltage difference).

The PIC is programmed in MPLAB, just like the FRC controller. For a bunch of documentation about how to get the PIC to do specific things, I send you to the website of the course I took. It's full of goodies!

But once you can send data to the PIC, you just need to set some digital output pins, some analog output pins, and make them do what the computer says. You could even listen to the feedback LED pins and send them back to the computer for two-way communication.
  #3   Spotlight this post!  
Unread 07-07-2007, 02:16
6600gt's Avatar
6600gt 6600gt is offline
Registered User
AKA: Lohit
FRC #0226 (Hammerhead)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Troy, MI
Posts: 221
6600gt is a jewel in the rough6600gt is a jewel in the rough6600gt is a jewel in the rough
Re: RS232 (Serial) Communication To OI

I am working on application that allows you to simulate all four joysticks(2 at any given time) through the program port on the RC. You need to connect the OI to run but thats all. Yes, there will be some interrupt and code overhead but unless you are pushing the processor to the limit it should work for most things. It also has other features. I am concentrating on the DataView and Camera right now but I will work on the Joystick if you require.

The pic and other hardware way is quite possible but also quite messy. PIC, D/A converter, MAX232, code and more code...
Do you know how to access the serial port on the PC using Java?

I have a pic of what it looks like:
Attached Thumbnails
Click image for larger version

Name:	Dashboard.jpg
Views:	70
Size:	134.8 KB
ID:	5616  

Last edited by 6600gt : 07-07-2007 at 02:29.
  #4   Spotlight this post!  
Unread 07-07-2007, 03:20
bglass bglass is offline
Registered User
AKA: Bryan
#1609 (S.W.A.R.M.)
Team Role: Leadership
 
Join Date: Feb 2005
Rookie Year: 2004
Location: St. Louis
Posts: 8
bglass is an unknown quantity at this point
Send a message via AIM to bglass
Re: RS232 (Serial) Communication To OI

Awesome. Thanks for the help everybody. As I have quite a bit of time left on my project, I think I'll probably try both methods (microcontroller and programming port) to see which works better (at least for my purposes). I think I have a pretty good basis (at least for the microcontroller based operation).

As far as the program goes...looks phenomenal so far. Communicating with serial port via Java isn't the most fun thing to do, but I can help you out with it. You're going to need the Java.Comm class (which isn't really hosted anymore). I have a copy that I managed to scrounge up from some of my older programming stuff. Shoot me a message and I'll send it over to you. It's got some decent documentation with it and I should still be able to help you some with it (it's been a while).

Thanks for the help everybody...I knew coming to ChiefDelphi would pay off...
  #5   Spotlight this post!  
Unread 07-07-2007, 04:04
6600gt's Avatar
6600gt 6600gt is offline
Registered User
AKA: Lohit
FRC #0226 (Hammerhead)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Troy, MI
Posts: 221
6600gt is a jewel in the rough6600gt is a jewel in the rough6600gt is a jewel in the rough
Re: RS232 (Serial) Communication To OI

Quote:
Originally Posted by bglass View Post
As far as the program goes...looks phenomenal so far. Communicating with serial port via Java isn't the most fun thing to do, but I can help you out with it. You're going to need the Java.Comm class (which isn't really hosted anymore).
Thanks, but I was just wondering. I am using the .NET serialport class so its easy to use.

The DataView(along with the graphing) has been field tested during the 2007 season. It saved my life, especially when I was trying to debug 3 different robots.

I was actually working on a similar project without a computer interface though. Did a lot of research but never put it into practice. I have done a lot of development on the PICs though.
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
Need Help With Maplab C programming on serial communication loveheb3 Programming 0 04-06-2007 21:24
Serial Communication Problems with LabVIEW FRC Toolkit Jon236 LabView and Data Acquisition 1 28-12-2006 11:57
Serial Communication in C++ Adam Shapiro Programming 8 21-01-2003 12:49
Serial Port Communication White Paper rbayer Programming 87 14-06-2002 16:10
serial communication using c++ Malakili Programming 31 01-05-2002 15:51


All times are GMT -5. The time now is 00:17.

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