Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Teensy 3.0 OctoWS2811 with WIZ812 Ethernet

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    2

    Teensy 3.0 OctoWS2811 with WIZ812 Ethernet

    Hi all,

    I'm not a electronic guy so pardon me for any weird or limited knowledge about the question/answer.

    I'm trying to implement a Network controlled LED with OctoWS2811 and WIZ812 Ethernet using Teensy 3.0.
    Hope to know if there's any possible conflict between these 2 implementing together such as pins or libraries.

    Thanks in advance.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,312
    The Wiz812 is probably much too slow to be useful with OctoWS2811.

    OctoWS2811's VideoDisplay example uses pin 12 by default for frame sync. But you can pretty easily edit the code to use a different pin. Pin 12 is needed for the SPI to talk to the Wiz812.

    Otherwise, I believe they can work together.

    A Wiz820 adaptor is coming soon. Optimized code for the 820 is still in development, without a solid time frame for release. But those 2 upcoming developments might enable Ethernet with decent performance. With these Wiznet chips, UDP is dramatically faster than TCP, so even with the 820 and an optimized library, you ought to plan on using UDP-based communication.

  3. #3
    Junior Member
    Join Date
    Oct 2013
    Posts
    2
    Thanks Paul, for both the reply and the awesome Teensy.

    I'm using Teensy 3.0 with OctoWS2811 and is very happy with it.
    Since it's workable together, I will be trying it out and find out the speed limitation first (I won't be passing high quality data).

    Hopefully I won't burn more stuff.


    I will be testing on the connection and learn more. Exciting times.
    Last edited by iris.sg; 10-04-2013 at 12:35 PM. Reason: After reading more stuff

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,312
    Just remember I mentioned it's much too slow.

    Edit: actually, it turns out there's a read(buffer, length) function. Use that. Let me know what sort of speed you see?

    If you use the normal available() and read() to receive each byte, you'll get approx 4 kbyte/sec.

  5. #5
    Was this ever tested? I'm having trouble with this at the moment. Slightly different based on this:
    http://www.epyon.be/2013/07/06/using...hernet-shield/

    I'm just trying to adapt the Video Display example to work with UDP input instead.

    I switched out serial inputs for the recommended read(buffer, length).

    int packetSize = Udp.parsePacket();
    if(packetSize)
    {
    Udp.read(packetBuffer,UDP_TX_PACKET_MAX_SIZE);
    if(packetBuffer[0] == '*'){
    // receive a "master" frame - we send the frame sync to other boards
    // the sender is controlling the video pace. The 16 bit number is
    // how far into this frame to send the sync to other boards.
    unsigned int startAt = micros();
    unsigned int usecUntilFrameSync = 0;
    int count = Udp.read((char *)&usecUntilFrameSync, 2); //Serial.readBytes((char *)&usecUntilFrameSync, 2);
    if (count != 2) return;
    count = Udp.read((char *)drawingMemory, sizeof(drawingMemory)); //Serial.readBytes((char *)drawingMemory, sizeof(drawingMemory));
    if (count == sizeof(drawingMemory)) {
    unsigned int endAt = micros();
    unsigned int usToWaitBeforeSyncOutput = 100;
    if (endAt - startAt < usecUntilFrameSync) {
    usToWaitBeforeSyncOutput = usecUntilFrameSync - (endAt - startAt);
    }
    digitalWrite(12, HIGH);
    pinMode(12, OUTPUT);
    delayMicroseconds(usToWaitBeforeSyncOutput);
    digitalWrite(12, LOW);
    // WS2811 update begins immediately after falling edge of frame sync
    digitalWrite(13, HIGH);
    leds.show();
    digitalWrite(13, LOW);
    }
    }


    Does this look proper?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •