Go Down

Topic: Servos jitter during software serial transmit (Read 10690 times) previous topic - next topic

oric_dan

#15
Jun 16, 2014, 09:28 pm Last Edit: Jun 16, 2014, 09:31 pm by oric_dan Reason: 1
Quote
....
Well just as with softwareSerial, there are software implementation of I2C and SPI and none are designed to operate as well or replace their hardware assisted versions.
....
Comparing software serial performance against hardware serial performance is a bridge too far in my book


This is why I abandoned the 328 chip in favor of the 1284 chip for most of my projects anymore - as the latter has 2 h.w. UARTs.

Software I2C or SPI are not really much of an issue, since the h.w. peripherals are built from the get-go to use unidirectional dataflow, master-slave operation, and are also designed from the get-go to use multiple nodes, up to 256 or so. Whereas in general, RS232 is dedicated between 2 nodes, and does none of the other.

OTOH, on one of my robots, I wanted to try having multiple "slave" boards on one RS232 channel, so I cooked up a master-slave addressing scheme, and wired all of the slave Tx pins together using a wired-"AND" diode ckt, and it works perfectly fine. [note - NOT the wired-OR ckt].

http://en.wikipedia.org/wiki/Wired_logic_connection

fungus



Wow!

So SoftwareSerial is essentially useless.


Well Paul, I for one agree with you 100%. Amazingly, SoftSerial has been rewritten now half a dozen times, and it's still just as bad as ever.


Yep. The amount of time and effort spent trying to get it to work is astounding. There's a gazillian threads here about "software serial doesn't work!"
[/quote]


Well just as with softwareSerial, there are software implementation of I2C and SPI


The "standard" SoftI2C library is shockingly bad as well. It doesn't even follow the I2C protocol.
Advanced Arduino

oric_dan

Someone needs to sit down, and write a seriously decent version of SoftSerial to run on the UNO. I thought about it, but have found in the past that the basic way of doing things around here is too ingrained, and also decided to design my own mega1284 board in UNO form-factor, which I now use on all of my projects, and so have a 2nd h.w. UART - plus of course, tons more Flash+RAM. Plus of course, half or more of the people seem to think SoftSerial works correctly, so if you lambast it, a lot of people come to its defense. Duh ????

I'm sure a version of SS could be written that would have little impact on use of the servo library, misc timing functions, etc, if it were to adhere to the following:

1. have only 1 s.w. UART, and use only 2 dedicated pins (D2,D3), rather than support multiple pins and higher baudrates.

2. be limited to maybe 9600 bps.

3. use an efficient ISR based on Timer2, and which only disables interrupts for a few 100-nsec.

I'm sure it can be done.

Robin2


Someone needs to sit down, and write a seriously decent version of SoftSerial to run on the UNO.


I have made an attempt - though it hardly qualifies as serious, I hope it is decent.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

danielorly

is there a way to use software serial & servo ??

Robin2


is there a way to use software serial & servo ??


Read the reply immediately before your question and follow the link.

There is also the ServoTimer2 library.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up