Pages: [1]   Go Down
Author Topic: Ethernet shield and Uart  (Read 1361 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey ya'll. I'm trying to get the output of the Ethernet shield to output to UART (RX/TX pins). I have 2 arudinos, 1 has the Ethernet shield, and the other is connected via UART. I'm trying to control TLC 5940's with it, but I have found out that 1 Atmega doesn't have enough balls to do a large fixture and read Ethernet packets at the same time.

My question is, is there any way to just get the output of the Ethernet shield from the 1st arduino and output it to the 2nd arduino for decoding and writing to the TLC's?

I'd like to stick with the if(i-17 == cont + 1) way of addressing.
Let me know what you think. Thanks!
Logged

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9671
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
My question is, is there any way to just get the output of the Ethernet shield from the 1st arduino and output it to the 2nd arduino for decoding and writing to the TLC's?

You should be able to connect the two arduinos together via their tx/rx/gnd pins.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I plan on using the rx and tx pins. Crossed over. The code is what im worried about. Do I have to mark a start of frame and then transmit the data, or is there a pin on the Ethernet shield that I can just connect to the rx on the 2nd arduino, and use the code like I would onto the 1st one?
Logged

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9671
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Do I have to mark a start of frame and then transmit the data

This is up to you as to how you want to write yor tx and rx code. the rx just needs to be able to read what the tx sends.

Quote
or is there a pin on the Ethernet shield that I can just connect to the rx on the 2nd arduino, and use the code like I would onto the 1st one?

Not sure what you are talking about here. Do you just want to pass the tx data on to another device?
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I did setup a serial string, what commands would I use to start the frame?  I got them to communicate a Serial.write to transmit, and Serial.read to receive. However, these are unreadable to the human eye from what I see. So, what would I use for the start of the frame? Serial.print doesn't work with Serial. receive, does it?

As for the Ethernet shield, Is there any way to bypass the 1st arduino, or just use it for ip and mac config. Can I take one of those pins used by the Ethernet shield and connect it to the 2nd arduinos RX pins?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 50111
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Serial.print doesn't work with Serial. receive, does it?
Serial.receive()? Did you mean Serial.read()?

Quote
As for the Ethernet shield, Is there any way to bypass the 1st arduino, or just use it for ip and mac config. Can I take one of those pins used by the Ethernet shield and connect it to the 2nd arduinos RX pins?
The communication between the Arduino and the ethernet shield and between the 2 Arduinos are not related. They use completely different mechanisms. If you want Arduino #2 to get data from the ethernet shield, and don't care that Arduino #1 has access to that data, the simplest solution is to simply move the shield to Arduino #2.
Logged

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9671
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I really don't understand the references to the eye and ethernet shield pin (I haven't heard of paralleling two arduinos to a single ethernet shield, but might be possible with extra hardware). You should be able to do some simple testing with the individual arduinos using the serial monitor to capture what is sent/received between the arduinos.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A single arduino doesn't have enough balls to read the Ethernet packet, decode it, and write to the tlcs. I can do a few leds, but once you start to go large, it slows down. How would I go about setting up a frame? I want it to have the address and the value in it, so that the 2 arduino's don't have to be started at exactly the same time.

I do mean Serial.read... sorry.
« Last Edit: May 08, 2011, 12:47:53 pm by mike_r » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 50111
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Serial.read() is the counterpart to Serial.print(). Serial.print(), though, can output a series of bytes, while Serial.read() can only read one byte at a time.

Quote
How would I go about setting up a frame?
Define what you mean by a frame. Is it a single packet of data? If so, start- and end-of-packet markers can be used.

Quote
I want it to have the address and the value in it, so that the 2 arduino's don't have to be started at exactly the same time.
If one Arduino is getting data from the internet, and the other Arduino is blinking lights, there should be no need to ever "sync" them. The only thing that is necessary is to define what bits of data sent between the two Arduinos constitutes a packet/frame. What address are you thinking belongs in the packet/frame?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are going to be hundreds of lights, all at different brightnesses. It's going to be a video wall. I just want it to continually scroll through channels and brightnesses as fast as it possibly can. (ex. 1, 4096; 2, 0; 3, 4096 and goto 100)
Logged

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9671
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
A single arduino doesn't have enough balls to read the Ethernet packet, decode it, and write to the tlcs. I can do a few leds, but once you start to go large, it slows down.

You off your meds? I send get request from a web page to an arduino with an ethernet shield, which in tern sends the the data out its tx pin to control a servo controller. No problem. maybe you need to explain the balls on your arduino and "going large".  smiley-wink
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The protocol is Art-net. I can run a few leds fine with the TLC5940 and Ethernet shield mod. The problem is that the more leds that I try to control, the slower the update to the tlcs is. I can watch leds update while they go down the line.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I assume the reason is doesn't work is because both of those devices need the spi bus, With the mod, the Ethernet shield gets the spi bus and the TLC's use bit-bang. The more TLC's I put in line, the slower the update. Since it's going to be used in a video wall type application, I would like there to be at least 30 updates to the TLC's per second.
Logged

Pages: [1]   Go Up
Jump to: