Multiple serial ports on propeller?
Whelzorn
Posts: 256
I'm trying to gather data from a device on a serial port, so I use FullDuplexSerialExtended.
Then I need to have the propeller alter that data, then send it out a different serial port to my computer. but in my code I've got the object definition (SER : "FullDuplexSerialExtended") but for obvious reasons I can't do a SER.start(1, 2, %0000, 115200) and a SER.start(3, 4, %0000, 115200), because then I can't select which port I want to read to/write from (and it probably wouldn't work anyway).
So how do I set up two separate serial ports using the same serial object?
thanks, Justin
Then I need to have the propeller alter that data, then send it out a different serial port to my computer. but in my code I've got the object definition (SER : "FullDuplexSerialExtended") but for obvious reasons I can't do a SER.start(1, 2, %0000, 115200) and a SER.start(3, 4, %0000, 115200), because then I can't select which port I want to read to/write from (and it probably wouldn't work anyway).
So how do I set up two separate serial ports using the same serial object?
thanks, Justin
Comments
or
Make sure the driver IS written for multiple instantiation (DAT section conformity) There is a tendency nowadays to frown upon this and request "singletons"....
Post Edited (deSilva) : 10/31/2007 12:28:02 AM GMT
Similarly, you reference all the methods with ser[noparse][[/noparse] 0 ]. or ser[noparse][[/noparse] 1 ].
I thought about attaching 2 VGA monitors to 1 Propeller, and create some simple demo, like a bouncing ball that travels from screen to screen.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian
uController.com - home of SpinStudio
PropNIC - Add ethernet ability to your Propeller!
SD card Adapter
To my greatest chagrain many persons here take it for granted that you define a dozen VAR cells and make a copy of the DAT... nevertouch working code... This was the first thing deSilva removed from his drivers ... Sigh...
How about using the mouse/keyboard connections for two keyboards. (it's the same circuit) and
two copies of the composite video driver (one for each monitor) for a little head-to-head gaming
from one prop. I wonder if after all that one would have enough resources for a game of battleship?
(Need more hours in the day....)
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.
— Calvin, of 'Calvin and Hobbes.