follow up: universal driver for raspberry and arduino -

More
21 Feb 2019 18:36 #126869 by wicki
hi all,

started from this tread, I now have a working raspberry-driver, which turns the
raspberry-PI into a ethernet-connected multi-IO-interface:

forum.linuxcnc.org/27-driver-boards/3581...r-help-needed#123766

last days, I made some tests with an arduino (with eth-shield) instead of the raspberry. the latency-times are more or less 1ms.
not really amazing, but there may be configurations, where this is more than enough....

what do you think?
does this make sense ?

regards

wicki

Please Log in or Create an account to join the conversation.

More
21 Feb 2019 19:02 #126870 by PCW
If it can reliably support a 2 ms servo thread, thats probably adequate for many applications

Please Log in or Create an account to join the conversation.

More
22 Feb 2019 18:29 #126930 by wicki
OK, here is something to play with:

erste.de/ethraw/

10 output-pins
and
8 input-pins

of an arduino-uno.

the component driver ethraw builds:

11 bit OUT TRUE ethraw.0.pin-00-in
11 bit IN FALSE ethraw.0.pin-00-out
[...]
11 bit OUT FALSE ethraw.0.pin-15-in
11 bit IN FALSE ethraw.0.pin-15-out

(only 10 OUT and 8 IN as usable with this hardware.
a "mega 2560" will give you a lot more pins.)

have fun ;-)

feedback would be fine....

Please Log in or Create an account to join the conversation.

More
10 Jan 2022 16:06 - 06 Feb 2022 11:48 #231314 by virencq
Dear wicki,
I am not being able to compile error for arduino uno.
error global variable. 
Last edit: 06 Feb 2022 11:48 by virencq.

Please Log in or Create an account to join the conversation.

More
10 Jan 2022 16:22 #231317 by virencq
// the setup runs once when you press reset
void setup() {
W5100.init();
W5100.writeSnMR(s, SnMR::MACRAW);
W5100.execCmdSn(s, Sock_OPEN);

// first byte in IN packet
pinMode(0, INPUT_PULLUP); // this is an output-pin
pinMode(1, INPUT_PULLUP); // this is an output-pin
pinMode(2, INPUT_PULLUP; // this is an output-pin
pinMode(3, INPUT_PULLUP); // this is an output-pin
pinMode(4, INPUT_PULLUP); // this is an output-pin
pinMode(5, INPUT_PULLUP); // this is an output-pin
pinMode(6, INPUT_PULLUP); // this is an output-pin
pinMode(7, INPUT_PULLUP); // this is an output-pin

// second byte in IN packet
pinMode(8, INPUT_PULLUP); // this is an output-pin
pinMode(9, INPUT_PULLUP); // this is an output-pin
//pinMode(10,INPUT_PULLUP); // this is an output-pin


// first byte in OUT packet
pinMode(A0, INPUT_PULLUP); // set pull-up on analog pin 0
pinMode(A1, INPUT_PULLUP); // set pull-up on analog pin 1
pinMode(A2, INPUT_PULLUP); // set pull-up on analog pin 2
pinMode(A3, INPUT_PULLUP); // set pull-up on analog pin 3
pinMode(A4, INPUT_PULLUP); // set pull-up on analog pin 4
pinMode(A5, INPUT_PULLUP); // set pull-up on analog pin 5
pinMode(A6, INPUT_PULLUP); // set pull-up on analog pin 6
pinMode(A7, INPUT_PULLUP); // set pull-up on analog pin 7


// put MAC-addresses into send-buffer
for (int i=0; i<6; i++) sbuf =radr ;
for (int i=0; i<6; i++) sbuf[i+6]=myadr;
}

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.149 seconds
Powered by Kunena Forum