Forums

Wow 460800 Bd via USB to serial adaptor works!

Started by Jan Panteltje May 23, 2012
Wow 460800 Bd via USB to serial adaptor works!

Wanted to add a par port to my laptop, or at least some I/O pins.
At 460800 Bd you can send a byte in 2.17 uS.

That means if I want to test I2C chips via USB to RS232 adaptor,
and use only one state flip per bit, something that requires 4 bytes RS232
per I2C bit processing, for example:
SDA high
  SCL high
  SCL low
SDA low

makes 10.8 uS / I2C bit.
That is close enough to the 100 kHz I2C spec.
To send an I2C byte that way takes 86.4 uS,
makes about 11 kB / second.

I2C is not normally sensitive to interruptions due to OS task switching,
so this should work 100 % OK.

So now program a PIC 18F14K22 as I2C interface, just in and out pins.
Can be used for many other things too.

Oh, I already did that, but need to modify for 460900 Bd.
Actually you can use the output to program a PIC too via serial protocol.
Is not very fast though.

Testing I2C this way is nice, need to test temperature, pressure, compass sensors now.
Measure it works before going embedded.

But this also means that for little bits of data, like reading compass and pressure etc,
you can use a cheap Linux based Android with USB to serial adaptor to address passive
board with sensors?

Question can Android do that? Can I get a command line and program those in C?

Ha! and a free display.

Maybe it is the temperature here, global warming, 
OR all embedded will be replaced by Androids.
:-)

Hey I scoped this, the math seems right.

Androids go for < 100 Euro these days, embedded boards with I/O header for I2C and powerful
processor are > 100 Euro, who needs strawberries and Olimexes?

I better stop here, I can feel earth moving.

I wrote:
Corection!

Wow 460800 Bd via USB to serial adaptor works!

Wanted to add a par port to my laptop, or at least some I/O pins.
At 460800 Bd you can send a byte in 2.17 uS.

But a byte in 17,36 us
Desillusion :-)

But could send  / read one data byte and use the PIC i2c interface...


That means if I want to test I2C chips via USB to RS232 adaptor,
and use only one state flip per bit, something that requires 4 bytes RS232
per I2C bit processing, for example:
SDA high
  SCL high
  SCL low
SDA low

makes 69 uS / I2C bit.
is close enough to the 100 kHz I2C spec.
To send an I2C byte that way takes 556 uS,
makes about 1.1 kB / second.

And the rest is correct.

Android for my flight computah,
Have to think about that :-)

Before ordering some silly ARM embedded board with 80 MHz clock.
Just checked about 275 embedded boards on ebay.
oops.




>I2C is not normally sensitive to interruptions due to OS task switching, >so this should work 100 % OK. > >So now program a PIC 18F14K22 as I2C interface, just in and out pins. >Can be used for many other things too. > >Oh, I already did that, but need to modify for 460900 Bd. >Actually you can use the output to program a PIC too via serial protocol. >Is not very fast though. > >Testing I2C this way is nice, need to test temperature, pressure, compass sensors now. >Measure it works before going embedded. > >But this also means that for little bits of data, like reading compass and pressure etc, >you can use a cheap Linux based Android with USB to serial adaptor to address passive >board with sensors? > >Question can Android do that? Can I get a command line and program those in C? > >Ha! and a free display. > >Maybe it is the temperature here, global warming, >OR all embedded will be replaced by Androids. >:-) > >Hey I scoped this, the math seems right. > >Androids go for < 100 Euro these days, embedded boards with I/O header for I2C and powerful >processor are > 100 Euro, who needs strawberries and Olimexes? > >I better stop here, I can feel earth moving. > >