• AVR Freaks

LockedTX/RX on the same line (Smartcard)

Page: < 12 Showing page 2 of 2
Author
xfiles_2007
Junior Member
  • Total Posts : 93
  • Reward points : 0
  • Joined: 2016/04/21 05:19:37
  • Location: 0
  • Status: offline
Re: TX/RX on the same line (Smartcard) 2016/10/20 16:10:04 (permalink)
+1 (1)
ah ok thanks guys! ill try a dummy ready of each byte as i transmit and clear OERR on each sending.
 
lets see how it goes.
 
#21
abusername
New Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2016/09/05 20:43:14
  • Location: 0
  • Status: offline
Re: TX/RX on the same line (Smartcard) 2016/10/20 20:30:54 (permalink)
+1 (1)
Half-duplex... it's pretty easy with a bitbang implementation of a UART, just calling the Tx routine when putting out data, and residing in Rx at other times. There is hardware involved though, and my circuit had a diode in it to achieve what in the old days was termed 'multi-drop rs232'.
With hardware UART it should be just as easy (if not easier), but I would go for a diode and resistor (not just a resistor) to get the job done.
Depending on what you want to do, you can implement it to idle high or idle low (at TTL levels).
 
#22
xfiles_2007
Junior Member
  • Total Posts : 93
  • Reward points : 0
  • Joined: 2016/04/21 05:19:37
  • Location: 0
  • Status: offline
Re: TX/RX on the same line (Smartcard) 2016/10/21 06:04:31 (permalink)
0
hmm no luck when i put a dummy read byte after each transmit , then at the end a whole bunch of random bytes appear on the line...
 
- seems to be getting stuck in this loop area when trying to receive bytes (tx disabled)
 
while(!RCIF) /* set when register is not empty */
continue;
 
 
#23
xfiles_2007
Junior Member
  • Total Posts : 93
  • Reward points : 0
  • Joined: 2016/04/21 05:19:37
  • Location: 0
  • Status: offline
Re: TX/RX on the same line (Smartcard) 2016/10/21 06:41:45 (permalink)
+2 (2)
all good now! i was clearing/flushing (rx) the bytes too soon after a transmit.
 
thanks so much everyone!:)
#24
Page: < 12 Showing page 2 of 2
Jump to:
© 2021 APG vNext Commercial Version 4.5