Loading...
  Show Posts
Pages: 1 [2]
16  Using Arduino / Project Guidance / Re: Connecting ENC28J60 to an arduino on: January 19, 2012, 08:39:46 am
I have the same board (thanks Santa)
I read up on the different voltage levels of the board and the Arduino as well as on using the ethercard or EtherShield library.

In the end based on advice from http://www.electrodragon.com/?p=1112 I just wired it up directly and it works perfectly.
The ENC28J60 is tolerant of the 5V from the Arduino and the Arduino is tolerant of the 3.3v from the ENC28J60.

I did a bit of a blog post on the wiring needed for the different libraries here.  This explains how to wire up for the nuelectronics library and also the ethercard library.
http://winkleink.blogspot.com/2012/01/arduino-enc28j60-ethernet-module-part-2.html

I hope this helps.
Albert.
17  Forum 2005-2010 (read only) / Syntax & Programs / Re: x * 1000L - what does the L do on: January 02, 2011, 06:31:47 pm
PaulS

Thanks for that.  
This helped me find the reference page on arduino.cc

http://arduino.cc/en/Reference/IntegerConstants

Again, thanks for this.
18  Forum 2005-2010 (read only) / Syntax & Programs / x * 1000L - what does the L do on: January 02, 2011, 06:03:48 pm
Hi,

1st post.

I have been working through some Arduio code and I have what I hope is a basic question.

In the code below that works perfectly 'duration' is multiplied by 1000L.

Why the L at the end?
What does it mean.

Code:
void playTone(int tone, int duration) {
  for (long i = 0; i < duration *1000L; i += tone *2) {
    digitalWrite(speakerPin, HIGH);
    delayMicroseconds(tone);
    digitalWrite(speakerPin, LOW);
    delayMicroseconds(tone);
  }
}

I'm tryingt o understand when I just multiply my 1000 and when I multiply by 1000L.

I tried removing the L from the code but it failed, so obviously it is important.

Any info much appreciated.

Albert.

Pages: 1 [2]