Hello
Everyone
A couple questions for ya. First of all which of these statements executes faster. Everyone says use hardware USART, but I'm not sure if it would always be as fast. Here is two sets of code which executes fastest and most efficiently out of them. Is one actually better than another.
Number = 0
WHILE Number < 3
TXREG = Data[Number]
Number = Number + 1
WEND
''''''''''''''or'''''''''''''''''''
HSEROUT [Data[0],Data[1],Data[2]]
Next question, which is faster.
Number = 0
While Number < 3
'Code in here converst all three array variables so that they will be display properly
'whereas the HSEROUT statement bellow does it for you.
wend
Number = 0
WHILE Number < 3
TXREG = Data[Number]
Number = Number + 1
WEND
''''''''''''or''''''''''''''
HSEROUT [Hex2 Data[0],Hex2 Data[1],Hex2 Data[2]]
Final question, could someone give an example of when or why you would need to poll the TXIF: USART Transmit Interrupt Flag bit. Boring questions I know, but I am just trying to better understand the on board usart.
Thanks for looking
Shawn
Bookmarks