Page 1 of 1

USB vs. UART communication

Posted: Sat Aug 31, 2019 7:42 pm
by olzeke51
Hey Y'all,
okay, USB has a technical limit of 15 feet, to meet good data/timing specs.
I am 25' away from my computer/terminal and I don't have enough extension cables OR an electronic extender.
Future goal will be about 95+ feet away.
'
I want/need to get data to/from the ARMstamp [or other USB micro-controller products] connected to a
PC/terminal app.
'
Basicchip - is there a way to 'redirect' the "printf(..)" function to a serial port - especially on the USB-centric
devices?? . . I am trying to save having to write a 'printFF.bas' subroutine !!!!
What say you??
Thanks, Gary Olzeke51

Re: USB vs. UART communication

Posted: Sat Aug 31, 2019 8:10 pm
by olzeke51
Okay folks, did some more research.....
Basicchip has provided the SPRINTF function that will do the heavy lifting.
from the example in the Help file::
. "str = SPRINTF("%c%c a string a....."
.
so now you can do a TXD(x) on each character of the "str"
I had just been using the 'printf' function ;)
.
Thanks for thinking ahead there, Basicchip :D
'
"case closed" as a PI would say...

Re: USB vs. UART communication

Posted: Sat Aug 31, 2019 11:26 pm
by basicchip
When you get to 95 feet, simple TTL might not cut it, too noisy.

But RS-485 differential transceivers would handle it and more.

Re: USB vs. UART communication

Posted: Wed Aug 05, 2020 6:55 pm
by olzeke51
uhh,
Is there a way to get input on the USB channel as if it was a serial uart?? similar to RXD(x)
'
CASE: LPC54005 dev board: wanted to use the USB connected to a PC as terminal
printf will work for outgoing, I assume I need to use DEBUGIN stuff$ ..then parse it(if I have just numbers)
but also wanted the ability to do 'blobs' {read - binary} bigger than 256 bytes [like a file ?? ?Intel hex?
'
Any words of wisdom/experience for us, BasicChip?
Thanks for consideration,
Gary Olzeke51

Re: USB vs. UART communication

Posted: Wed Aug 05, 2020 7:04 pm
by basicchip
works like the ARMstamp, RXD(0) gets input from the USB serial port when it is the debug port.

Re: USB vs. UART communication

Posted: Thu Aug 06, 2020 2:59 pm
by basicchip
The serial interface is defined as a byte 0..255 interface or -1 when no byte is available

Yes you can send any byte to the ARM, but BASICtools does some filtering on input characters. You should use TclTerm or something similar to send binary bytes.