Go to Post Take care of what's there and you never need a replacement. - Rich Kressly [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 24-02-2004, 00:58
Ryan Cumings's Avatar
Ryan Cumings Ryan Cumings is offline
Programmer and University Rejected
#0134 (Team Discovery)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Pembroke, NH
Posts: 65
Ryan Cumings is an unknown quantity at this point
Send a message via AIM to Ryan Cumings
Wait4TXEmpty

Is it necessary to call Wait4TXEmpty() in ifi_utilities?
__________________
Suddenly being rejected from college feels right during the build season. Now I am a mentor.
  #2   Spotlight this post!  
Unread 24-02-2004, 01:12
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
Re: Wait4TXEmpty

There is a slight delay between the time when you put a byte in the Tx buffer and when that data is actually sent over the Tx pin. TXREG is just a holding register for data you want to sent over the Tx pin. The chip will load the data from TXREG into the transmit shift register once the stop bit from the previous byte is sent over the Tx pin. Once data from TXREG is loaded into the shift register, TXIF is set, signaling TXREG is ready to receive more data.

If you try to write another byte into TXREG before TXIF is set, that byte that used to be there will never be transmitted.

So if you have enough of a delay between writes to TXREG, you can get away with not calling Wait4TXEmpty(), but it's better to just call it.
  #3   Spotlight this post!  
Unread 24-02-2004, 08:21
Gene F's Avatar
Gene F Gene F is offline
FIRST Fanatic
AKA: Gene Falendysz
#0343 (Metal in Motion)
Team Role: Engineer
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Oconee County, SC
Posts: 218
Gene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to beholdGene F is a splendid one to behold
Send a message via AIM to Gene F
Re: Wait4TXEmpty

Following on with Jay's comments the real requirement is that the TXIF is set before writing the next character. If you are doing processing between characters it might be better to check TXIF before you send not wait for it to change after you send.
__________________
- Gene Falendysz
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


All times are GMT -5. The time now is 23:57.

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