Linking a Spinneret to a Quickstart- Suggestions please?
Rforbes
Posts: 281
Hi all,
I'm running into some trouble and could use your suggestions.
I'd like to run my objects on a Spinneret, but once I have the HTTPServer object loaded up, I'm finding that I don't have enough memory to also add my own objects. I'm exceeding the 32k by about 3k.
So, I was thinking of having the Spinneret communicate with a Quickstart board. By doing this, I should be able to put my objects on the Quickstart, and be able to send the information back and forth between the Spinneret.
Is there a simple way to do this? All I can think of is to use fullduplexserial on the spinneret and quickstart. I've not tried to do this yet... would it work? Or is there a better way to do what I need?
Thanks in advance,
Robert
I'm running into some trouble and could use your suggestions.
I'd like to run my objects on a Spinneret, but once I have the HTTPServer object loaded up, I'm finding that I don't have enough memory to also add my own objects. I'm exceeding the 32k by about 3k.
So, I was thinking of having the Spinneret communicate with a Quickstart board. By doing this, I should be able to put my objects on the Quickstart, and be able to send the information back and forth between the Spinneret.
Is there a simple way to do this? All I can think of is to use fullduplexserial on the spinneret and quickstart. I've not tried to do this yet... would it work? Or is there a better way to do what I need?
Thanks in advance,
Robert
Comments
There is also HTTPServerBase.spin and HTTPServerMinimal.spin which have a smaller footprint but do not contain all the web server objects.
Do you need a web server?
I think I need the full HTTPServer version. I'm trying to set up a project that uses Xbee's to turn on and off leds. The spinneret needs to talk to my base xbee, which will grab data from the remote xbee's. The web browser page doesn't have to be anything fancy, in fact something like your tutorial is fine. But my xbee object is too large and I can't minimize the code any better than it is.
I'm just now starting to dig into your objects so I'm not sure exactly how they all work. Would the HTTPServerMinimal allow me to do what I need? I have no idea how to store a web page without an SD card to stick it in.
If one or two pages are required and the pages are not too busy with fancy images and graphics then yes HTTPServerMinimal would work. Move the HTML to EEPROM.
I often run out of memory when using graphics in a program so I sometimes use a second Prop as a graphics slave.
If you want to have both a debug line and a Prop to Prop line, a 4 port serial object would help save on cogs and memory.
I think Tracy Allen's version is currently the best 4 port object.
I'm now stuck again, but I'm going to keep going at it before I throw more questions up here. Hate asking for help when I haven't done everything I can to help myself.
Duane- Ah, great!! I think I'm still going to use a quickstart with the propeller eventually, so that's a perfect object to work with. Thanks!
Don't spin your wheels too long. If you need help, ask.
I've been reading through forum posts and looking at all the various objects- some show use of pull downs and some don't specify. I'm unclear as to whether they are needed in all circumstances, or just at very high speed comms?
In my application, the spinneret and quickstart will be wired up less than two inches from each other, both running off the same 3.3V power supply.
Thanks in advance!
Robert
Tracy Allen's four port serial driver is the best behaved serial driver I've tried. It checks for framing errors which most of the other serial drivers don't.
I like the extended fullduplexserial because of the methods with Timeouts (ie RxDecTime) and it's a little smaller than Tracy's object which is pretty important in my app.
Also, I only have TWO available pins to use for communicating between the spinneret and quickstart. As it stands, I'll be using pins 26/24 on the spinneret for rx/tx and pins 27/26 on the quickstart. Sadly, I have no room to stick pull up/down resistors in my circuit without redoing most of my protoboard. So was hoping to hear that I can do it without implementing them. I "think" I can, but I really don't want to say "Ah Smile!" When I hook it up let the blue smoke roll out.
Don't get me wrong- Tracy's object seems to be really great. But I think it might be overkill for my little ole project. I don't really need "fast" comms, just "simple" comms in both software and hardware. 19200 would be plenty fast enough for me.
Tracy explained a little about framing errors to me here. Some of the serial objects don't check for a stop bit so if the communication line is in the wrong state it will be read as a bunch of zeros.
I don't think it would be hard to add a method one serial object uses to a different serial object. If you start to run low on cogs and you're using more than one instance of a serial object, it might be worth switching to a four port driver.
If you need a certain method added to a four port object and you're having a hard time making the change yourself, just ask for some help and one of us would probably be able to help you make the desired change.
The listener is looking for a start bit (low). Which allows the receive to sync and sample the next 8 bits and the stop bit (high). When the listener senses a low on the line, the listener knows the first data bit of 8, bit 0, is X bit ticks away. Where X is a function of the baud rate and system clock. Same goes for bits 1-7 and the stop bit. The bits are all evenly spaced and X bit ticks hits the center of, or close to, the next incoming bit.
After sending the stop bit (high) and without pullups, the transmitter would have to drive the Tx line high. Otherwise the receiver might detect a low and try to receive 8 bits plus one stop bit.
I'm pretty sure pullups are required for the default implementation of Full Duplex Serial. You can surly test it to be sure.
Thanks, guys. Both of you just made a few light bulbs come on.
Robert