Show Posts
Pages: 1 2 3 [4] 5 6 ... 12
46  Using Arduino / Networking, Protocols, and Devices / Re: SoftwareSerial lib and atmega1284p sends data but does not recieve it on: October 09, 2013, 05:32:18 pm
HI Nick,

It is not on any board just the chip on breadboard waiting for the PCB design to be finalized.

It has the atmighty optiboot boot loader with the standard pin configuration from maniacbug.

Cheers Pete.
47  Using Arduino / Networking, Protocols, and Devices / Re: SoftwareSerial lib and atmega1284p sends data but does not recieve it on: October 09, 2013, 05:06:13 pm
Thanks Nick,

can you point me at the list for the 1284P if you know where to find it.

Cheers Pete.
48  Using Arduino / Networking, Protocols, and Devices / Re: SoftwareSerial lib and atmega1284p sends data but does not recieve it on: October 09, 2013, 04:24:03 pm
Software serial uses pin change interrupts and not all pins raise pin change interrupts. Check the documentation.

Thanks Nick,

       According to the pin allocation in the documentation D2 has INT2 associated with it.

       I guess this should be allocated to the RX pin in the library. I will try this and see what happens.

Cheers Pete.

49  Using Arduino / Networking, Protocols, and Devices / SoftwareSerial lib and atmega1284p sends data but does not recieve it on: October 09, 2013, 04:06:14 pm
Hi again folks,

Having won the battle of the SPI and the Ethernet controller with the guidance and help here on the forum I have now moved onto my second problem with the atmega3284P

SoftwareSerial  sends data but does not receive it

I am setting up a soft serial port using pins D2 and D3. The system is sending data happily at 9600 but not receiving anything.

I am looking for any clues as to why this might be.

Cheers Pete.
50  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Wiznet5100 ethernet shield interfacing to atmega1284p on: October 09, 2013, 03:59:35 pm
My ethernet board works fine on UNO, Mega, and my 1284 board too, just as long as I fixed w5100.h and got the correct pins, so ???

Yes my second board does too. It was just my luck to have pulled this one out of the draw first.

I have a second problem to do with the software serial not working but i wont hijack this thread i will start another one.
51  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Wiznet5100 ethernet shield interfacing to atmega1284p (Solved) on: October 09, 2013, 02:54:12 pm
Thanks to Dan and others on this...

I finally got it working by changing my Ethernet board. I had another one in my toy box and so out of desperation i thought i would try it ... voila it works

Now what is REALLY odd is this board that refuses to work with the 1248 works fine attached to an UNO.

Dan .. as a completely side question it the Oric part of your handle anything to do with that personal PC that came out in the 80s.. does that give my age away smiley

Cheers Pete.

edit I added the following to the ws5100.h file for the 1284P, this will actually use the pins defined as SS for the CPU version

Code:
#elif  defined(__AVR_ATmega1284P__)
  inline static void initSS()    { pinMode(SS, OUTPUT); };
  inline static void setSS()     { digitalWrite(SS, LOW); };
  inline static void resetSS()   { digitalWrite(SS, HIGH); };
52  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Wiznet5100 ethernet shield interfacing to atmega1284p on: October 09, 2013, 01:32:01 pm
Hi Oric_Dan,

Thanks for this input. I have already tried the suggested addition to the ws5100.h file.

Could you explain how you managed to get the ws5100 working, what hardware you used (Ethernet variant) and what version of libs, IDE and bootloader on the 1284P you got it working on. you say you use port pins D11-D13, what is the SS PIN and what version of pin mapping are you using on the 1284P to get this mapping for the SPI bus.

I am using the "Standard" atmega1284P using Optoboot pulled down from   

https://github.com/maniacbug/mighty-1284p#readme

and using the "Mighty 1284p 16MHz using Optiboot"

This one  maps D4 to SS, D5 to MOSI, D6 to MISO and D7 to SCK.

Cheers Pete.

53  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Wiznet5100 ethernet shield interfacing to atmega1284p on: October 08, 2013, 07:06:20 am
Hmm interesting .. I have several (brands of) SD card breakout board and they all do the same thing ..

work with the SS held low ....

I am under the impression that the SS is used to set the SPI (MISO) data pins (of the slave device) into tristate (open collector) so that other devices on the bus can use them.  whilst I see the SS pin being held low during the read.write cycle of the data I dont see it clocking anything just enabling the SPI pins.

OK so the SS debate aside it is still not working connected either to pin D10 or pin D4. any other ideas please smiley

Cheers Pete.
54  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Wiznet5100 ethernet shield interfacing to atmega1284p on: October 08, 2013, 06:38:29 am
Quote
Any way round you put it however if I ignore the SS pin hard wire the Pin10 on the Shield to GND and Pin4 to Vcc it should be causing the Ethernet to be permanently enabled as a slave device. doing this I should only need MOSI/MISO/CLK for my interface. This however does not seem to want to work either.
That will not work. The w5100 and SD use the slave select as the start and stop markers for communication. You can't hard wire it. It is the HIGH-to-LOW transition of the SS that indicates the start of a read/write, and the LOW-to-HIGH transition that indicates the end.


I beg to differ doing this (SS to GND)  works fine with the SD card ... is this method unique to the Ethernet card ?

In fact WIKI agrees with me  http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus
55  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Wiznet5100 ethernet shield interfacing to atmega1284p on: October 08, 2013, 06:07:25 am
Hmm on the 1284 using the standard pin mapping (rather than the Bobduino varient) SS is in fact D4 is is the same internal pin allocation as the 328 I.E. PortB4 with Port B5/B6/B7 being MOSI/MISO/CLK If you look at the mappings for the 2560 you will see the port to pin allocations are the same

Code:
// ATMEL ATMEGA1284P
//
//                   +---\/---+
//           (D 0) PB0  1|        |40  PA0 (AI 0 / D24)
//           (D 1) PB1  2|        |39  PA1 (AI 1 / D25)
//      INT2 (D 2) PB2  3|        |38  PA2 (AI 2 / D26)
//       PWM (D 3) PB3  4|        |37  PA3 (AI 3 / D27)
//    PWM/SS (D 4) PB4  5|        |36  PA4 (AI 4 / D28)
//      MOSI (D 5) PB5  6|        |35  PA5 (AI 5 / D29)
//  PWM/MISO (D 6) PB6  7|        |34  PA6 (AI 6 / D30)
//   PWM/SCK (D 7) PB7  8|        |33  PA7 (AI 7 / D31)
//                 RST  9|        |32  AREF
//                 VCC 10|        |31  GND
//                 GND 11|        |30  AVCC
//               XTAL2 12|        |29  PC7 (D 23)
//               XTAL1 13|        |28  PC6 (D 22)
//      RX0 (D 8)  PD0 14|        |27  PC5 (D 21) TDI
//      TX0 (D 9)  PD1 15|        |26  PC4 (D 20) TDO
// RX1/INT0 (D 10) PD2 16|        |25  PC3 (D 19) TMS
// TX1/INT1 (D 11) PD3 17|        |24  PC2 (D 18) TCK
//      PWM (D 12) PD4 18|        |23  PC1 (D 17) SDA
//      PWM (D 13) PD5 19|        |22  PC0 (D 16) SCL
//      PWM (D 14) PD6 20|        |21  PD7 (D 15) PWM
//                   +--------+
//

Any way round you put it however if I ignore the SS pin hard wire the Pin10 on the Shield to GND and Pin4 to Vcc it should be causing the Ethernet to be permanently enabled as a slave device. doing this I should only need MOSI/MISO/CLK for my interface. This however does not seem to want to work either.

Cheers Pete.
56  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Wiznet5100 ethernet shield interfacing to atmega1284p on: October 08, 2013, 04:34:41 am
Hi Tim,

                 Thanks for your suggestion. I have in fact tried getting it to work without the SD card code as well. I only mentioned it to, as you have pointed out, demonstrate that the wiring is correct. On the 328 pin 10 is the SS. However this is pin 4 on the 1284. I have wired pin 4 on the 1284 to pin 10 on the Ethernet shield. I have also pulled pin 4,on the Ethernet shield high to disable the SD card. Still no luck.

Are you suggesting that the Ethernet library uses the mapped digital pin 10 and not the mapped SS pin in all MCUs ?
57  Using Arduino / Networking, Protocols, and Devices / Arduino Wiznet5100 ethernet shield interfacing to atmega1284p on: October 07, 2013, 04:30:23 pm
Hello Folks,

I am trying to get an off the shelf Arduino Ethernet shield to interface to the atmighty (atmega1284p) With the Maniacbug Optiboot boot-loader installed.

I have got the integrated SD card to work without issues however I cannot get the DHCP demonstration sketch to work.It just return that it has failed.

To get the SD car reader working I connected the SD SS pin(4) to D0  on the 1248 and set that as the select pin in the sd init call and also connected the Ethernet SS Pin(10) to the SS (D4,PB4,pin5) on the 1248.

In order to get the SPI to work I also had to set the port direction of the MISO,MOSI and SCK in code and set SS as outputs.

Does anyone have experience of actually getting this combination to work. Any other idea would be gratefully received.


Cheers Pete.
58  Using Arduino / Programming Questions / Re: SoftwareSerial problem , but only on 1284p on: October 02, 2013, 03:12:31 pm
I suspect this related to pin change interrupts. I now recall that I had to modify the original SoftwareSerial library to support the 1284P, so I'm now chasing this in the new library :-(


Is there any chance that you could send me the modified library you got working wit the 1284P please

Cheers Pete.
59  Community / Gigs and Collaborations / Re: What is the website where you can bid on jobs? on: September 26, 2013, 02:30:46 am
Indeed I live in France but 80% of my client base is in the USA. I write code, talk over Skype and send prototype hardware in the post. It works well for me.

Cheers Pete.
60  Community / Gigs and Collaborations / Re: What is the website where you can bid on jobs? on: September 20, 2013, 02:22:12 pm
www.freelancer.co.uk

a bit of everything there
Pages: 1 2 3 [4] 5 6 ... 12