Can Simple_Serial Object do 9600 baud at 5Mhz clock?
william chan
Posts: 1,326
My Propeller is running at 5Mhz PLL1x.
When I try to send any string using the simple serial object, the cog hangs.
Any ideas?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
When I try to send any string using the simple serial object, the cog hangs.
Any ideas?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax Forums - If you're ready to learn, we're ready to help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
~Some men see things as they are and ask "why?"
I dream of things that never were and ask "why not?"~
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I am 1011, so be surprised!
Advertisement sponsored by dfletch:
Come and join us on the Propeller IRC channel for fast and easy help!
Channel: #propeller
Server: irc.freenode.net or freenode.net
If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
Ray
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
~Some men see things as they are and ask "why?"
I dream of things that never were and ask "why not?"~
Ray
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
~Some men see things as they are and ask "why?"
I dream of things that never were and ask "why not?"~
I just want to send some strings to my Serial LCD.
FullDuplex serial seems like an overkill and it takes up one extra cog.
Why is simple serial so slow?
Simple things are usually faster...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
obex.parallax.com/objects/356/
It has an LCD object I coded within that uses a slightly modified simple_serial.spin to run.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
~Some men see things as they are and ask "why?"
I dream of things that never were and ask "why not?"~
If I set RxPin to -1, will FullDuplexSerial still start another cog?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
~Some men see things as they are and ask "why?"
I dream of things that never were and ask "why not?"~
Looks like we need a "serial transmitting only bit bang assembly" object soon...
Would it be difficult to write such an object?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
I think Simple_Serial is slow because it uses spin.
Can it be easily converted to assembly?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
Are you saying that the 4 port driver will use less battery current than the FullDuplex driver?
If yes, it would certainly help my batteries.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
If you wanted that cog to reduce power when there is nothing to send you would have to change something. They easiest way I can think of is to use a spare pin to signal the tx cog and have the cog wait on that rather than poll the memory location.
Which line of the object code should I change?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
This code, reads the tx queue and checks that whether the head and tail of the queue are the same and if so jmps to transmit, i.e. if head and tail are the same then the tx queue is empty. So the pasm cog will spin here when there is nothing to transmit. You want to insert a waitpeq for a pin you pick. Then in the tx spin routine you want to set the pin to be an output pin and set it to 1 when you add something to the queue.
Then back in the transmit code you need to reset the pin when the tx queue is empty.
You need to be a bit careful in the order of setting/reseting the pin and adding/removing from tx queue since the spin and pasm cogs will be running in parallel.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my
There's no "B" wiring from cog to cog. INB / OUTB / DIRB don't connect to anything.
I pulled this from the I2CMonitoring stuff I did ...