Go to Post I'm looking forward to seeing it in action! That is one sweet looking gun. The look on his face has me a tad worried though.... - Zholl [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 26-01-2008, 15:01
Nathan's Avatar
Nathan Nathan is offline
Registered User
FRC #1501 (Team T.H.R.U.S.T.)
Team Role: Alumni
 
Join Date: Sep 2006
Rookie Year: 2007
Location: United States
Posts: 149
Nathan has a spectacular aura aboutNathan has a spectacular aura aboutNathan has a spectacular aura about
ReadSerialPortx Questions

When the function ReadSerialPortx is called does it actually read from the serial port, or does it read a byte from the input circular buffer?

If the ReadSerialPortx function does read from the buffer, I'm assuming the data from the serial ports is automatically stuffed into these buffers? As in, I don't need to write a routine to fill the buffers with data?

And finally, how large are the input and output ring buffers? I need to know how fast I need to retrieve data from them so overwrites don't occur.

TIA,
Nathan
__________________
Save money with PriceWombat, a shopping comparison and price tracking tool (that I made!).

Check out my hobby electronics business!

My former robotics team: Huntington County 4-H Robotics
  #2   Spotlight this post!  
Unread 27-01-2008, 22:19
mluckham's Avatar
mluckham mluckham is offline
Registered User
FRC #0758 (Sky Robotics)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Ontario, Canada
Posts: 116
mluckham will become famous soon enoughmluckham will become famous soon enough
Re: ReadSerialPortx Questions

The WPILIB manual states that it reads from the ring buffer. We use this function (in EasyC) - you don't need to do anything, other than to read the port ... no need to initialize it, just read it. If there is nothing in the buffer when you read it, you get 0 (null) character as a return value.

You will need to message Brad Miller for your detailed question about buffer sizes and the time required for incoming data to over-fill the buffer. You shouldn't have a problem with fast incoming data rates if you continually read the serial port in your While(1) loop - which can execute as many as 60,000 times per second in our experience.
  #3   Spotlight this post!  
Unread 29-01-2008, 21:25
Nathan's Avatar
Nathan Nathan is offline
Registered User
FRC #1501 (Team T.H.R.U.S.T.)
Team Role: Alumni
 
Join Date: Sep 2006
Rookie Year: 2007
Location: United States
Posts: 149
Nathan has a spectacular aura aboutNathan has a spectacular aura aboutNathan has a spectacular aura about
Re: ReadSerialPortx Questions

Thanks for the explanation mluckham.

Nathan
__________________
Save money with PriceWombat, a shopping comparison and price tracking tool (that I made!).

Check out my hobby electronics business!

My former robotics team: Huntington County 4-H Robotics
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
3 Questions!!! (2/5/04) Andy Grady General Forum 11 05-02-2004 21:14
3 Questions!!! (2/4/04) Andy Grady General Forum 8 04-02-2004 20:52
3 Questions!!! (2/3/04) Andy Grady General Forum 16 04-02-2004 11:50
3 Questions!!! (2/2/04) Andy Grady General Forum 18 02-02-2004 22:18
3 Questions!!! (1/13/04) Andy Grady General Forum 21 14-01-2004 10:03


All times are GMT -5. The time now is 19:11.

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