Show Posts
Pages: [1] 2 3 ... 6
1  Using Arduino / Networking, Protocols, and Devices / Re: ENC28J60 and arduino pro micro on: January 23, 2014, 12:06:32 am
Quote
I connected similar like you but  for MicoPro I have supply power from microusb when I connected with PC
My micro is also supply by usb, but the ENC28 get his power from a UNO, because it needs 3.3 Volt.
and only the GND form UNO, Micro and ENC28 are tied together.
So for this setup two usb are plugged in the computer.
2  Using Arduino / Networking, Protocols, and Devices / Re: ENC28J60 and arduino pro micro on: January 20, 2014, 03:50:44 am
I made a setup with a micro and enc28j60 module
My micro running on 5 volt, dit not work directly with ENC.
So I grab a uno for 3.3v supply
All 3 modules tied up together  worked.  My intend is to power the micro with a asm1117-3.3v
replace/jump the voltage regular on board the micro, and make it working at 3.3V .

This is my working setup so far:
I connect
ETHERNET        ARDUINO Micro Pro
PIN 4  (SO)           PIN 14
PIN 5  (SI)           PIN 16
PIN 6  (SCK)          PIN 15
PIN 7  (CS)           PIN 10
                                  GND   ---> uno GND
---------------------------
pin 9                     UNO 3.3
pin 10                   UNO GND

This is the modified part of  the setup for the getDHCPandDNS example
Code:
void setup () {
  Serial.begin(57600);
    while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
  Serial.println("\n[getDHCPandDNS]");
 
  if (ether.begin(sizeof Ethernet::buffer, mymac,10) == 0)
    Serial.println( "Failed to access Ethernet controller");

And my modified part off the enc28j60.ccp file from the ethercard.h libary
Code:
void ENC28J60::initSPI () {
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
    const byte SPI_SS   = 53;
    const byte SPI_MOSI = 51;
    const byte SPI_MISO = 50;
    const byte SPI_SCK  = 52;
#elif defined(__AVR_ATmega644P__) || (__AVR_ATmega1284P__)
    const byte SPI_SS   = 4;
    const byte SPI_MOSI = 5;
    const byte SPI_MISO = 6;
    const byte SPI_SCK  = 7;
#elif defined(__AVR_ATmega32U4__)
    const byte SPI_SS   = 10;
    const byte SPI_MOSI = 16;
    const byte SPI_MISO = 14;
    const byte SPI_SCK  = 15;
//Serial.println("__AVR_ATmega32U4__");
#else
    const byte SPI_SS   = 10;
    const byte SPI_MOSI = 11;
    const byte SPI_MISO = 12;
    const byte SPI_SCK  = 13;
#endif


// Serial.println(MOSI);
    pinMode(SS, OUTPUT);
    digitalWrite(SS, HIGH);
    pinMode(MOSI, OUTPUT);
    pinMode(SCK, OUTPUT);   
    pinMode(MISO, INPUT);



3  Using Arduino / Networking, Protocols, and Devices / Re: ENC28J60 and arduino pro micro on: January 19, 2014, 10:09:34 am
I missed a bracket, hope you saw that.
But what about level conversion is the micro 5 v or  3.3 V
btw be carefull with that micro usb connector,  The weight of you breadboard will ripped the connector
when if it falls .
learned the hardway smiley-confuse


Code:
Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
}
  Serial.println("\n[webClient]");

4  Using Arduino / Networking, Protocols, and Devices / Re: ENC28J60 and arduino pro micro on: January 19, 2014, 06:30:33 am
Try this in your setup
Code:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  Serial.println("\n[webClient]");

 
5  Using Arduino / Networking, Protocols, and Devices / Re: ENC28J60 and arduino pro micro on: January 19, 2014, 02:50:24 am
I altered this in enc28j60.cpp to meet my needs.
This trick came from a early version on ethercard.h libary

Code:
void ENC28J60::initSPI () {
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
    const byte SPI_SS   = 53;
    const byte SPI_MOSI = 51;
    const byte SPI_MISO = 50;
    const byte SPI_SCK  = 52;
#elif defined(__AVR_ATmega644P__) || (__AVR_ATmega1284P__)
    const byte SPI_SS   = 4;
    const byte SPI_MOSI = 5;
    const byte SPI_MISO = 6;
    const byte SPI_SCK  = 7;
#else
    const byte SPI_SS   = 10;
    const byte SPI_MOSI = 11;
    const byte SPI_MISO = 12;
    const byte SPI_SCK  = 13;
#endif
   
    pinMode(SPI_SS, OUTPUT);
    pinMode(SPI_MOSI, OUTPUT);
    pinMode(SPI_SCK, OUTPUT);   
    pinMode(SPI_MISO, INPUT);
   
    digitalWrite(SPI_MOSI, HIGH);
    digitalWrite(SPI_MOSI, LOW);
    digitalWrite(SPI_SCK, LOW);

6  Using Arduino / Networking, Protocols, and Devices / Re: ENC28J60 losing the connection after some time. on: January 16, 2014, 03:07:06 pm
I am running one of these cheaps modules, it is running now for months without problems
When I started out I had lots of problems. Most where related to ram usage.
You have to find the right balance between buffersize and freeRam
Also this link helpt me a lot.
http://blog.cuyahoga.co.uk/2012/05/theres-something-wrong-with-my-stash/
7  Using Arduino / Sensors / Re: Ublox Neo6MV2 GPS data problem on: December 31, 2013, 11:11:12 am
What i mean is that you using the softserial libary in your sketsh, The pins you use now 19,18 are the pins of the hardware serial port, maby this will give a confict,  So changing to for example pin 20,21 can rule that out.

If you want to check out the Ublox,  connect it to pin 0 and 1
load a empty sketch

void setup(){}
void loop(){}

and monitor on the arduino ide Serieel Monitor the NEMA lines from the UBLOX.
Download u-center from u-blox.com for a nice view.

From ublox tx to mega rx, i dont thing you need the level switcher
Hope this will help you futher.


8  Using Arduino / Sensors / Re: Ublox Neo6MV2 GPS data problem on: December 30, 2013, 04:14:36 pm
Maby because you using softserial,
on the hardserial(1) pins of the mega
If  you wanna use softserial, change to some other pins
9  Using Arduino / Sensors / Re: Ublox Neo6MV2 GPS data problem on: December 30, 2013, 02:52:34 pm
You lost some on this line

static const int RXPin = 19n = 18;
10  Using Arduino / Networking, Protocols, and Devices / Re: Problems with Arduino UNO and ENC28J60 on: November 29, 2013, 01:12:54 pm
Did you follow these connections
http://hofmannsven.com/2013/laboratory/arduino-ethernet-module/
11  Using Arduino / Microcontrollers / Re: Atmega328P additional pins on: June 09, 2013, 10:34:51 am
That will be D14 up to D16 as digital pins
12  International / Nederlands / Re: Bootloader branden met usbasp on: May 09, 2013, 03:13:02 pm
Quote
From time to time, it may be useful to have an interrupt or reset delivered independently of the main program code. This may be to wake the AVR from sleep mode or to reset when the program gets stuck in a loop; that's where the watchdog timer comes in. An onboard 128kHz oscillator is used to drive the watchdog with intervals from 16ms to 8s. If the watchdog expires without being touched, the system can catch an interrupt, be reset or both. If you "kick the dog" before the time expires, no action is taken.


While it can be slightly complicated to set up the watchdog by hand, avr-libc has some convenience functions. To enable the watchdog, call watchdog_enable() with the desired duration. Refreshing the watchdog is as simple as a call to watchdog_reset(). If the WDTON fuse is set the watchdog activates automatically, rather than requiring manual activation.

Ik denk niet dat je WDTON op on moet zetten, gebeurt via de software waarschijnlijk al
13  International / Nederlands / Re: Bootloader branden met usbasp on: May 09, 2013, 02:31:44 pm
Verander in bootloader sketch
 0xD8,         // fuse high byte: SPI enable, boot into bootloader, 8192 byte bootloader
in
 0xC8,         // fuse high byte: SPI enable, boot into bootloader, 8192 byte bootloader

Daarna de sketch weer in de uno, en de bootloader naar de mega branden
14  International / Nederlands / Re: Bootloader branden met usbasp on: May 09, 2013, 06:33:29 am
De watchdog timer is een setting in je Fuses
http://www.frank-zhao.com/fusecalc/fusecalc.php?chip=atmega2560
Als je die wil veranderen zal je de fuses moeten aanpassen.
In de sketch zijn ze nu zo gezet
Code:
  { { 0x1E, 0x98, 0x01 }, "ATmega2560",  256 * kb,   1 * kb,
        atmega2560_v2,// loader image
        0x3E000,      // start address
        sizeof atmega2560_v2,   
        256,          // page size (for committing)
        0xFF,         // fuse low byte: external clock, max start-up time
        0xD8,         // fuse high byte: SPI enable, boot into bootloader, 8192 byte bootloader
        0xFD,         // fuse extended byte: brown-out detection at 2.7V
        0x2F },       // lock bits: SPM is not allowed to write to the Boot Loader section.
15  International / Nederlands / Re: Bootloader branden met usbasp on: May 09, 2013, 05:58:17 am
Je hebt nu twee keuze's,
Of je set nick bootloader sketch in de uno
http://www.gammon.com.au/forum/?id=11635
en volgt zijn instructie's

Of je volgt het arduinoISP voorbeeld. Hier heb je dan wellicht een extra condesator nodig tussen de reset en gnd van de uno.
Dus ga voor nick bootloader.
Succes
Pages: [1] 2 3 ... 6