Arduino Forum

Development => Other Hardware Development => Topic started by: retrolefty on May 14, 2011, 04:16 am

Title: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 14, 2011, 04:16 am
Would be cool if someone could come up with a core files needed to run this $29 puppy with the arduino IDE:

http://store.atmel.com/PartDetail.aspx?q=p:10500272

They supply the needed USB driver, but you have to register for the free download.

Not sure if the bootloader is compatible with AVRDUDE or not, or if it even uses a bootloader.

The mega 1284P is the top of the line 8 bit AVR for us DIP package fans and may be that forever? However it's not the DIP packaged chip used in this evaluation board.

Lefty

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on May 14, 2011, 04:52 am
Ooh! I agree -- this would be great!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 14, 2011, 07:29 am
What would you say to an Uno compatible board with shield compatibility, 1284P processor, added RS232 drive capability, and additiona port pins to take advantage of the other port the 1284 offers? I have a design in mind, gonna do it up in eagle tomorrow and come up with a layout.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 14, 2011, 11:24 am
Quote
What would you say to an Uno compatible board with shield compatibility, 1284P processor, added RS232 drive capability, and additiona port pins to take advantage of the other port the 1284 offers?

I'd say you've had this on the cards for a while :) I'd also say it's a good idea.

Let us know if you want people to peer review of the schematic.

______
Rob
 
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 14, 2011, 04:30 pm

What would you say to an Uno compatible board with shield compatibility, 1284P processor, added RS232 drive capability, and additiona port pins to take advantage of the other port the 1284 offers? I have a design in mind, gonna do it up in eagle tomorrow and come up with a layout.


I would like it, esp if the dip packaged version was used. Otherwise the 1280/2560 has more bang per board layout.

Lefty
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on May 14, 2011, 05:20 pm

What would you say to an Uno compatible board with shield compatibility, 1284P processor, added RS232 drive capability, and additiona port pins to take advantage of the other port the 1284 offers? I have a design in mind, gonna do it up in eagle tomorrow and come up with a layout.


Very much what I need. In my particular case, the RS-232 will eliminate the need for one external chip as well! All I'd need is that and a good WiFi solution. Still looking for one. I don't need all the expanded i/o of the MEGA boards, I am really just short on RAM. Do you have a target price?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Coding Badly on May 14, 2011, 07:48 pm
Quote
Would be cool if someone could come up with a core files needed to run this $29 puppy with the arduino IDE


It looks like the crystal is 11.0592 MHz (or something close; I'm having trouble reading the number).  Is that the only issue?  Modifying an existing core for the "odd" crystal frequency?

Is there a core available for the 1284P family?  (isn't it just a big 644?)

Do you picture this core having built-in support for the gadgets?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 14, 2011, 10:36 pm
Okay, here's my draft of the "Bobuino" as I haven't come up with a better name yet. Realized I forgot JTAG & ICSP header, will add those in next.
Am thinking maybe ditch the RS232 connector and just have a header pin block instead, skinny up the board a little more. Than folks can add DB9 of choice (male/female) with a couple wires to a less expensive panel mount part vs board mount connector.
Or leave it, seems like someone is always connecting a GPS or something similar.

Why DIP vs SMD?

No idea on price yet, will run a parts list thru digikey & see what it comes back like.

(http://www.crossroadsfencing.com/Bobuino_layout.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 14, 2011, 10:43 pm
Quote
Why DIP vs SMD?


Just so one could develop the sketch on the board and then pull the chip for a standalone application. No big deal I guess, just more convenient then directly programming the dip in it's standalone home.

Lefty
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 14, 2011, 10:51 pm
I think that's one major advantage of the 1284 - you can get it in DIP :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 14, 2011, 11:25 pm
Looks like it could fit, have to see if its routable or not. Kinda jammed up by the SD card driver & RS232 driver.
Still no JTAG/ICSP headers.
(http://www.crossroadsfencing.com/Bobuino_dip_layout.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 15, 2011, 12:13 am

I think that's one major advantage of the 1284 - you can get it in DIP :)


That was my whole point. I homebrew some of my stuff, but only in DIP version, too old and tired to do major smd hand soldered layouts.

Another question is the 1284 and 644p pin compatable in the DIP versions? An arduino board that could utilize DIP 644p and 1284 would open my wallet, assuming the IDE software could be made to work with it by mear mortals like myself.  :D

EDIT: Answered my own question by reviewing datasheets: 644p and 1284 are pin compatible in 40pin dip version at least.

Lefty
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on May 15, 2011, 03:10 am
For my own personal interest, DIP vs SMD isn't a big deal. I think conceptually I like the idea of DIP as it does afford more flexibility. But, as to the RS-232, for my own (current) need, just some form of header would be even better, as I need (well, want) to get to an RJ-11.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 15, 2011, 03:14 am
I'd ditch the DB9 and use a header. You can get IDC DB connectors that use ribbon cable so they still look neet and can easily be mounted remotely, makes fitting the board into an enclosure easier and you can swap from male to female without desoldering a connector.

That should route easily (manually of course :)), using the DIP doesn't really make it worse because you can run 2 lines between pins, whereas the TQFP is basically a no go zone for one layer.

Please get rid of the huge USB connector and use a mini B.
 
Add a jumper (not a solder bridge) for the auto reset so it can easily be disabled.

The headers at the end of the chip are pretty close, Ok if you use a screw driver to remove the chip from the other end but may get in the way of a chip puller.

Crystal too close to the chip, especially with a socket.

I'll shut up now, I guess it's just a quick mock up but thought I'd highlight a couple of things anyway.

______
Rob


Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 15, 2011, 03:24 am
Well, I got the schematic redone for the DIP, added solder bridge fields to route I2C or A4/A5 to the shield header.
Can change the solder bridge things to pins when I see that it routes okay, same with moving the crystal a scooch and pulling the DB9 off.
Will look at the header spacing also, can move if the db9 is gone.
USB change as well.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 15, 2011, 03:58 am
Just looking at the extra IO header, the rows aren't .1" spaced.

______
Rob
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 15, 2011, 04:15 am
Wow, this is like watching a baby being born, only not as wet.  ;)

Lefty
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 15, 2011, 08:54 am
Okay, next pass is ready.

5.5/2.1mm power jack.
Mini USB-B for Serial.
Crystal/capacitors for clock generation.
Full Shield compatibility (standard complement of Arduino pins).
RS232 for Serial1 with 4-pin header (Rx1,Tx1, Gnd, 4th is open). Rx/Tx jumpers to disconnect from driver if need Digital I/O or INT0, INT1.
INT2 available at D6.
Jumpers to select between A4/A5 and SCL/SDA at analog shield header.
Two pins added to analog shield header for A6, A7.
New 8 pin header for PC0-7 (includes SDA/SCL, even if jumpered to A4/A5).
(hmm, looks like I lost  an I/O pin for PD7 along the way)
SD MMC push-push with dedicated SPI SS line not available else where on the card. Ladyada style design with Write Protect, Card Detect signals.
Seperate 3.3V regulator for SD card.
FTDI FT232RL USB chip with 3.3V to shield.
ICSP header, allows BIT Bang programmig with FT232RL X3 header.
10 pin JTAG header.
Power LED, "L" (D13) LED, Serial Rx/Tx LEDs (not on Serial1).
No onboard reset - connect externally if needed (at shield pins, at ICSP, or at JTAG)
(tho it appears there is plenty of room to add one, guess one pass to put pads in for it).

My only concern is the USB connector - any one know which library part to use that will let what appear to be the shield pads get connected to ground in Eagle?
Here's  close up of what I have now.
(http://www.crossroadsfencing.com/usb-b_detail.jpg)
(http://www.crossroadsfencing.com/Bobuino_dip_layout_Rev1.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 15, 2011, 09:55 am

Is there a core available for the 1284P family?  (isn't it just a big 644?)

Do you picture this core having built-in support for the gadgets?


The cores at http://www.avr-developers.com will work on Bob's board, as will the bootloader.

They would work on the thing from Atmel as well. The only thing that makes an Arduino an Arduino is the bootloader.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 15, 2011, 09:57 am

Why DIP vs SMD?


Another advantage of DIP is that you could make it available as a kit. If the crystal is in a socket then the user can select the speed they like, although i don't know if a crystal in a socket works as well as a soldered crystal.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 15, 2011, 10:00 am

I'd ditch the DB9 and use a header. You can get IDC DB connectors that use ribbon cable so they still look neet and can easily be mounted remotely, makes fitting the board into an enclosure easier and you can swap from male to female without desoldering a connector.



Thats a cool idea!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Coding Badly on May 15, 2011, 10:18 am
Quote
The cores at http://www.avr-developers.com will work on Bob's board, as will the bootloader.


I agree.

Quote
They would work on the thing from Atmel as well.


Nope.  millis, micros, delay, and delayMicroseconds will not work correctly at 11.0592 MHz.  Which is why I asked if clock speed was the only issue.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 15, 2011, 10:47 am
RE the RS232 connector.

As soon as you have to solder up wires to headers and connectors it looks like a dog's breakfast. Consider the following

a) serial on a DB9 only needs 3 signals on pins 2, 3 and 5.
b) The smallest IDC connector you can get (AFIAK) is 6-way.
c) You have room for a 2x3 header (same as the ISP header).

So I would add the 2x3 header so there is a quick and neat solution to wiring up serial with IDC connectors.

THEN

If there is room. Add a 2x2 header for jumpers so the polarity can be easily swapped.

All in all this allows two Arduinos to be neatly connected with no crappy soldered wires.

______
Rob
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 15, 2011, 10:49 am
I'd suggest MicroSD instead of SD - most people have MicroSD cards now and if not then they're not expensive.
Also, due to the size of the DIP chip, you can fit parts underneath it (not that I can see much on your board that could go under it).

Quote
So I would add the 2x3 header so there is a quick and neat solution to wiring up serial with IDC connectors.

Could get confusing as 2x3 is the same as the ICSP - I suppose good silkscreening solves this problem.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 15, 2011, 06:05 pm
Looks like my ISP is acting up today, so the files are not viewable. Time for a phone call to see what's going on.

> I'll check out RS232 cable headers, see what exists.
> Crystals work in sockets, es evidenced by the wirewap boards I have built up.
> 16/20 MHz - 3-pin socket strip would let one put in either frequency.
> There are some parts under the 1284, socket strip intended to be used now to plug in the processor.

> SD/MicroSD - maybe I can put both footprints in the same spot so one or the other can be installed.

ISP seems to be back up?
(http://www.crossroadsfencing.com/Bobuino_rev 1_schematic.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 15, 2011, 06:34 pm
Ok, looks like the sparkfun microSD footprint will fit nicely under the regular SD footprint.  Most signal names to connect in parallel are obvious.

The SD design brings the card detect (CD) and write protect (WP) signals out.

Any ideas if CD1 and CD2 are the same features on the microSD?
And what does RSV do?

(http://www.crossroadsfencing.com/parallel_SD_microSD.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 15, 2011, 06:47 pm
If it was my design I would throw out all the auto-voltage switching components and instead use a simple 3 pin SIP and a jumper clip. This would save on component costs and board space avalible for more useful stuff. I never liked the Arduino auto-voltage circuit, looks like a solution looking for a problem.

Lefty

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 15, 2011, 07:25 pm
Nope.  millis, micros, delay, and delayMicroseconds will not work correctly at 11.0592 MHz.  Which is why I asked if clock speed was the only issue.



What happens if the F_CPU is set to that frequency?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Coding Badly on May 15, 2011, 10:36 pm
Quote
millis, micros ... will not work correctly at 11.0592 MHz ... What happens if the F_CPU is set to that frequency?


The rule for the clock frequency because of the way the code is written...
http://arduino.cc/forum/index.php/topic,59263.msg427808.html#msg427808

An example of what happens when the rule is not followed...
http://arduino.cc/forum/index.php/topic,59263.msg426611.html#msg426611
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 15, 2011, 10:49 pm
Okay so you're saying the crystal freq has to be a power of 2? But there are other boards that do not follow this rule. These boards claim Arduino compatibility and work with Arduino cores from avr-developers.com. Here is a list:


arduino_amber128.name=Arduino-Amber 128 14.7456 Mhz
arduino_amber128.build.f_cpu=14745600L


arduino_OrangutanSVP1284.name=Arduino-Orangutan SVP-1284
arduino_OrangutanSVP1284.build.f_cpu=20000000L


arduino_gator.name=Arduino-Rugged Circuits Gator Board
arduino_gator.build.f_cpu=20000000L


arduino_bahbots1284p.name=Arduino-BahBots 1284p
arduino_bahbots1284p.build.f_cpu=18432000L

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Coding Badly on May 16, 2011, 01:41 am
Quote
These boards claim Arduino compatibility and work with Arduino cores from avr-developers.com


How do you know that millis (et al) works correctly on those boards with that core?

I certainly could have made a mistake analyzing the code but by my calculations the 20 MHz boards are off by 0.39%; the 14745600 Hz board is off by 6.84% 0.64%; and the 18432000 Hz board is off by 0.10%.

Edit: Corrected the percent error for one of the boards.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 16, 2011, 01:51 am
Can I get an eyeball on Reply #25 and confirm I have the socket installed the right way?  Not sure what the lines at the left side do, they interfere with routing tho.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 16, 2011, 01:57 am

Quote
These boards claim Arduino compatibility and work with Arduino cores from avr-developers.com


How do you know that millis (et al) works correctly on those boards with that core?

I certainly could have made a mistake analyzing the code but by my calculations the 20 MHz boards are off by 0.39%; the 14745600 Hz board is off by 6.84%; and the 18432000 Hz board is off by 0.10%.



I don't know that millis works right for sure, that's true although I think a fair claim of "Arduino compatibility" would require them to be pretty close. However, I would be amazed if the baud rates were substantuially off, and that would also be impacted by changing rhe crystal frequency.

I have a 1284P prototype board here with a socketed crystal. I think I'll get a few different crystals and see what happens.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 16, 2011, 04:10 am
RE the SD sockets.

The schematic looks good according to my limited SD knowledge. However the pins on the two sockets are reasonably aligned, yet the rats nest on the PCB shows them all crossed over.

Quote
Not sure what the lines at the left side do,

What lines?

RSV => reserved I think.

PS I responded to your PM with a couple of other comments.

______
Rob
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 16, 2011, 05:27 am
I'm thinking this is the correct orientation for the microSD - the vertical lines to the right are part of the microsd symbol. No idea what they do besides get in the way.

Rob,
I had an e-mail typed up & it got dumped while I was looking up a 4 pin header to stick on the 4-pin RS232 header. I think I will recommend folks use 4-pin crimp connector housing that pololu.com carries, 3 wires plug in, the other ends connect to uses RS232 connector of choice. Just occurred to me - what if I made that 3 pins with ground in the middle? Then the housing could be plugged on either way, worst case Tx goes against TX and nothing gets received on either end.
I've had no luck finding a 2x2 crimp on type for a ribbon cable.

Reset_enable - 3 pin header  was used as I couldn't find a 2 pin header that was just pins.

Values - I left off the R & C values, are just 1K/10K resistors, 100nf/0.1uF for the small caps, 100uF for the 3 big one, nothing unusual.

COMM1 jumper - my intent there was to have jumpers across 1-2 and 3-4 to have RS232 going off board, and to have No jumpers installed if one needed D2/D3 not interfered with on the shield header.
I'm up for changing it to something that will provide more functionality, I don't understand what you are referring to by Serial Polarity tho.

(http://www.crossroadsfencing.com/microsd_sd_layout.jpg)
(http://www.crossroadsfencing.com/rs232_jumpers.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 16, 2011, 06:07 am
Quote
what you are referring to by Serial Polarity tho.

If you want to connect two devices (especially two that are the same such as two of these boards) you have to swap Rx and Tx. In the past I've found the easiest way to do this is with a 2x2 header and two jumpers. The jumper are say horizontal for one polarity and vertical for the other, so there's no wiring of special plugs/cables. The alternative is to have crossover cables. With Pololu-style discrete connectors that's easy enough, but with ribbon cable you can't (easily) make a crossover cable.

However if you're not using ribbon cable this is all pretty moot. It's easy enough to wire up a crimp connector in any format.

It's largely an aesthetic thing for me, if you use separate wires they look ugly and you have to have a huge DB9 shell with just 3 small wires poking out the back. Ribbon cable looks neat.

Quote
I've had no luck finding a 2x2 crimp on type for a ribbon cable.

You won't AFIAK 2x3 is the smallest.

Quote
I couldn't find a 2 pin header that was just pins.

Do you mean in the Eagle library?

Quote
COMM1 jumper

OK, I get it.

The SD sockets now line up as I would have expected. How far out does the card sit physically. I'm guessing that's what those lines are but there's 3 of them.

What I'm getting at is accessibility when the board is in an enclosure, any memory card has to poke off board enough to be usable from outside the box. The right most line looks good, the other two would not work. Are there 3 sizes in micro SD, I didn't think so. Not that there's much you can do about it, the socket is already right on the edge.

______
Rob




Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 16, 2011, 06:47 am
Hi Rob,

Reset_Enable: yes in the eagle library. I'm sure there is one, I just gave up on looking. I'm up for changing it if you know where to find one. The ones I found had big outlines around them for plastic shrouds or something.

RS232 - I have it set up now as 3 pins, middle is ground. If one wants to go board to board, make a flat 3-pin cable and it will go one way or the other.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: bubulindo on May 16, 2011, 01:24 pm
I'm actually thinking about keeping the same Arduino footprint and changing the processor to the ATmega1284. I seems like it would jsut fit in there (DIP version). The extra pins would be added to the end of the board. A bit like the Seeeduino Mega. Haven't routed it yet, though.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 16, 2011, 03:45 pm
@bubulindo, I did just that, adding SD card driver and RS232 driver as most folks seem to need a 2nd serial for their GPS, etc.
Standard shield header with all the regular signals, and a couple of jumper fields for flexibility.
Waffling on the autopower vs power selection headers still, debating whether to make space for a reset switch.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on May 16, 2011, 05:34 pm
Quit making me drool all over my d*mn keyboard :-/
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 16, 2011, 05:38 pm
You guys make it sound like I need to get the prototypes ordered yesterday!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 16, 2011, 07:13 pm

You guys make it sound like I need to get the prototypes ordered yesterday!


No, but you have seemed to have created an itch in a lot of us. I'm still not convinced that all the software hurdles have been leaped over yet, clock @ standard 16Mhz, bootloader compiled to run at 16Mhz, etc. Pin mapping should be the same as 644p however.

I'm glad you are still considering the manual Vs auto-voltage switching function. Can live with either but still think the board space could be used for more useful purposes.

Lefty

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on May 16, 2011, 07:40 pm
I would suggest to get rid of rs232 chip and put there an rtc chip with a backup battery instead. The usage of a Sdcard (for e.g. logging purposes) require a valid timestamp mostly. This is my experience as I run 1284puino for a year now (rtc pcf8563 and cr1220 hardwired on the board).
Rs232 - most gps modules are 5v or 3v3 ttl, so no need for a rs232 hw driver, just bare 3 pins, I think. I would put 10k pullup on each Rx pin as well.
Reset button - I would rather go with it..
Also - I would go with 3V3 Vcc, no need for SDcard buffer and 3v3 reg then. I would go with microsd socket only.. Add maybe a header for an external accu (with a charging circutry or a trickle charge..).
Also mind the situation you have a SDcard plugged in and you do ICSP programming.. The crystal value - you may use any provided you will not use micros and do recompile the bootloader. The delay() used in 0022 is based on micros(??) so I am using my own based on millis (as it was in past). P.
PS:  :P two new gadgets in the town:
http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,719,895&Prod=CHIPKIT-MAX32
http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,719,896&Prod=CHIPKIT-UNO32
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on May 16, 2011, 07:45 pm
No!! Leave *my* RS-232 alone! :-)

OTOH, if you find room to add an RTC, that'd be fine & dandy :-)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Coding Badly on May 16, 2011, 07:53 pm
I'm glad you are still considering the manual Vs auto-voltage switching function. Can live with either but still think the board space could be used for more useful purposes.


Would moving the auto-voltage switch to a daughter / companion board be a good idea?  That would free some space and reduce the component count for people who intend to run the board from a 5 volt source.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 16, 2011, 08:24 pm
Quote
Would moving the auto-voltage switch to a daughter / companion board be a good idea?  That would free some space and reduce the component count for people who intend to run the board from a 5 volt source.


Not as useful as just s@#t canning the whole concept of auto-voltage selection. It's such a lame function that uses way too many components and space for what it brings to the table. Real people should use real switches or jumper clips for things like voltage source or voltage level selection, auto-reset enable/disable, and any other useful user hardware selection feature required or desired. Auto-voltage selection was an idea that might have had the best of intentions for beginners, but if just limits flexibility and has some questionable design points.

OK, I'm done with my arduino rant for the time being.  ;)

Lefty

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 17, 2011, 12:02 am
The automatic selection of powering from USB or another source is very useful for many applications. If the device is going to live somewhere away from a PC ou need to power it, but for the occasional trip to the PC to be updated or whatever it comes in very handy not to have to go searching for the wall art.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 17, 2011, 12:04 am

No, but you have seemed to have created an itch in a lot of us. I'm still not convinced that all the software hurdles have been leaped over yet, clock @ standard 16Mhz, bootloader compiled to run at 16Mhz, etc. Pin mapping should be the same as 644p however.


I have a bootloader running at 16 MHz and the cores available at avr-developer.com work nicely.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 17, 2011, 12:07 am
Quote
If the device is going to live somewhere away from a PC ou need to power it, but for the occasional trip to the PC to be updated or whatever it comes in very handy not to have to go searching for the wall art.


What I proposed doesn't prevent that, it just requires moving a jumper clip from one position to the next position. What's not handy about that?

Another example of the auto-voltage lameness. Assume your project is powered externally and is independent to a PC. Why power up the FTDI or 8u2 chip? Check out the Seeeduino design for power selection, manual two position switch for usb/external power and FTDI power source is hardwired to the USB connector only. That's good functional design.

Lefty
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on May 17, 2011, 12:17 am
I find it mildly convenient to be able to take my computer over to my running project, hook up my USB cable, upload new code, then disconnect shortly thereafter without the project having to reboot. Would your solution allow that?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 17, 2011, 12:28 am

I find it mildly convenient to be able to take my computer over to my running project, hook up my USB cable, upload new code, then disconnect shortly thereafter without the project having to reboot. Would your solution allow that?


Yes, that would still function as you stated.

As far as power switching, the arduino auto-voltage switching remains powered by the external source if power is on both usb and the external power connector at the same time (external has priority), so that would have no bearing on what you are asking to do, the board would not reboot because you removed the usb connector.

Lefty
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on May 17, 2011, 12:33 am
Cool! In which case, I personally have no need for auto power source switching.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 17, 2011, 12:56 am
Lefty, i don't follow... It seems like you are saying that a jumper needs to be moved to switch from wall wart to USB power. Or does your jumper switch from auto-switching to not auto-switching?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 17, 2011, 01:03 am

Lefty, i don't follow... It seems like you are saying that a jumper needs to be moved to switch from wall wart to USB power. Or does your jumper switch from auto-switching to not auto-switching?



I proposed eliminating the auto-voltage switching logic altogether. Instead replace with a simple 3 pin SIP male pin header and a two position jumper clip. In one position the boards power is coming from the on-board +5VDC regulator, in the other jumper position the boards power comes from the USB +5vdc source. You decide how you want to power the board and place the jumper appropriately. A two position manual switch could also work just as simple as it does in the Seeeduino board designs. How the board is powered has no bearing on if you are using the usb serial function or not, if the board has power the usb can function period.

Edit: What I proposed is to go back to the design that arduino used with the  Diecimila board.
http://arduino.cc/en/Main/ArduinoBoardDiecimila

Schematic: http://arduino.cc/en/uploads/Main/Arduino-Diecimila-schematic.pdf  Note the power selection jumper in the lower left hand of the drawing.


Lefty
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 17, 2011, 07:28 am
What lefty is suggesting is (I think) exactly what I have on my two current 1284 designs.

Note the diode on the FTDI chip's RXD line. I'm not 100% sure that's needed but I've had trouble before with this sort of setup where the active chip powered the inactive chip through the IO pin. This is easy to get around by tristating the active chip's output as well but I prefer a hardware option that doesn't require a use to know about this stuff.

This should allow the USB chip to only be powered when USB is available.

@crossroads, this is a board designed for my network and it's pretty specific to that. I won't be competition, not yet anyway :)

______
Rob
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 17, 2011, 07:45 am
Okay, I think this is for updates.
> added Reset switch.
> deleted autopower, added 3-pin jumper field (5V from regulator, 5V from USB).
(user can bring the three pins to a panel mount toggle/rocker if desired, or to bring in external 5V).
> added DS1307 RTC, crystal, pullups for Square wave output, SCL, SDA lines.
> added 20mm coincell battery, on Bottom of the board.
> RS232 remains. 3 pin header with Gnd in middle for easy board-to-board connections, or to offboard DSub connector.
> Both SD & MicroSD remain, up to builder to populate desired socket.
> ICSP header.
> JTAG header.

Question:  How do I get the battery holder markings to show up on the bottom of the board?
And will what I presume is a plastic coin cell battery holder be interfered with by the atmega socket pins ? If so I need to adjust it placement and fix the routing around it.

Any other options/features/requests?
(http://www.crossroadsfencing.com/Bobuino_rev2_layout.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 17, 2011, 09:18 am
Nice, getting a bit full but has a good range of features.

The 32kHz xtal, is that really an HC49 case, normally they are the watch crystal style.

The battery holder will probably clash with the headers and dip socket.

Are the mounting holes at good spacing, .1" preferably but at least whole mm.

______
Rob
 
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 17, 2011, 09:31 am
If everything else on teh board is surface mount, what's the advantage of the mpu being DIP? Why would anyone want to switch from the 1284P to the 644P?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 17, 2011, 09:37 am
I was also going to mention the RTC crystal size.

I think the battery holder would probably be ok depending on what you use. - Might interfere with the headers but I wouldn't have thought it would interfere with the DIP socket as it has a big hole in the middle.
My thinking is that it could go where the caps and RTC are atm as they're surface mount on the other side so could fit in the big space in the middle of that battery holder.
I mean you could go with a CR1220 or something but I don't personally like the smaller battery types as they're harder to get hold of.

Quote
If everything else on teh board is surface mount, what's the advantage of the mpu being DIP? Why would anyone want to switch from the 1284P to the 644P?

We want DIP as you can then simply use the board as a programmer for chips, remove them and stick them somwhere else.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 17, 2011, 09:44 am
Quote
If everything else on teh board is surface mount, what's the advantage of the mpu being DIP? Why would anyone want to switch from the 1284P to the 644P?

We want DIP as you can then simply use the board as a programmer for chips, remove them and stick them somwhere else.


Okay. But, this board is kind of overkill for that. if you use the SMT mpu you can save a lot of room. Another board could be designed with many fewer parts as a programmer. Not that its a big deal.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 17, 2011, 09:52 am
Well it's providing multiple options :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: bubulindo on May 17, 2011, 10:54 am
Well, for me at least, the DIP version allows you to keep the board in case you fry the processor. I'm not good at soldering, and processors do go bad once in a while. In terms of investment and considering most people are not great with soldering SMDs, this is quite logical. Also, in case you want to use the board for a standalone project, you may use a (not so much) cheaper chip (ATmega32, 16, 644p). So for tinkering and prototyping, nothing beats the DIP version.

Didn't the first design use the surface mount ATmega1248p? :\

Also, why not use an RTC with integrated crystal? Something like this... http://www.maxim-ic.com/datasheet/index.mvp/id/4627

Last but not least, are you taking orders?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 17, 2011, 11:16 am
RTCs with integrated crystals are expensive.
Have you looked at how much the DS3231 is?


~$10...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: bubulindo on May 17, 2011, 11:25 am
No, I haven't... :| I had a look at Maxim's website... but for that price, the DS1307 is the way to go. The integrated crystal isn't worth the 8 or 7 extra bucks! :S
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 17, 2011, 11:58 am
I got a couple as free samples when I wanted some and I have to say that they are brilliant RTCs but very expensive for small prototype runs.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on May 17, 2011, 12:43 pm
Guys,

Some humble thoughts of mine.


Would love to see the outcome of this thread. :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 17, 2011, 01:16 pm
Quote
a 32 kHz can be used to drive TIMER2 on PC6 & PC7. RTC without any extra cost.

True, but you loose two pins and a timer and may have to write RTC code. I guess it depends on whether you just need to know how many mS since you went to sleep or need to know the actual time.

I'm not a big fan of the 1307 (I prefer the DS3234/3231 because they are more accurate) but it does the job well enough and is half the size of the TCXO chips.

@Crossroads, do you have the SQW signal going to an interrupt pin so you can create a version of millis() that doesn't skip a beat or have the RTC wake the processor at 3AM.

Quote
Would love to see the outcome of this thread.

Wouldn't we all. The pressure's on Crossroads :)

______
Rob

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 17, 2011, 01:22 pm
Quote
do you have the SQW signal going to an interrupt pin so you can create a version of millis() that doesn't skip a beat or have the RTC wake the processor at 3AM.

Somehow I don't think he's connected anything up yet.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on May 17, 2011, 02:21 pm
You guys might want to consider RX-8025 as the RTC. Comes with a built-in crystal. Price is slightly more than DS1307.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 17, 2011, 02:25 pm
Yeah but it's not a common device. I think I'd rather have a DS1307 (with external crystal).
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: bubulindo on May 17, 2011, 03:19 pm
Actually my idea for the ATmega1284p would be to use the oscillator pins for the RTC built by software.

Providing a place for the crystal and leaving the pins open to a connector would be good enough. It's something that if I remember correctly isn't possible in the Arduino Mega. :\ 
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on May 17, 2011, 04:00 pm
An advantage of RTC is that it remembers the date/time when power (except for coin battery to RTC) is off. It was stated earlier that knowing the date/time is often important or desirable for logging things to the proposed memory card.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 17, 2011, 04:21 pm

Well, for me at least, the DIP version allows you to keep the board in case you fry the processor. I'm not good at soldering, and processors do go bad once in a while. In terms of investment and considering most people are not great with soldering SMDs, this is quite logical.


Well this last bit was my point. One of those chips is extremely fine pitch. I have a similar project and the stencil just came in. I'm pretty nervous about being able to assemble it with a stencil and an oven, never mind hand soldering. Although, there is no reason it can't be sold assembled with a socket. Realistically, as a mostly SMT device, i doubt too many people would buy it as a kit. But you never know.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 17, 2011, 04:31 pm

What lefty is suggesting is (I think) exactly what I have on my two current 1284 designs.

Note the diode on the FTDI chip's RXD line. I'm not 100% sure that's needed but I've had trouble before with this sort of setup where the active chip powered the inactive chip through the IO pin. This is easy to get around by tristating the active chip's output as well but I prefer a hardware option that doesn't require a use to know about this stuff.

This should allow the USB chip to only be powered when USB is available.

@crossroads, this is a board designed for my network and it's pretty specific to that. I won't be competition, not yet anyway :)

______
Rob



The method the standard arduino uses with 1K resistors in series with the rec & tx pins works pretty well.

Lefty
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 17, 2011, 05:34 pm
So I have these for changes:

"The 32kHz xtal, is that really an HC49 case, normally they are the watch crystal style."
I will check this, I copied the ATmega footprint, smaller would certainly fit.

"The battery holder will probably clash with the headers and dip socket. "
I  wil move this left to not have the base overlap any pins that go thru the board.
How do I get the battery markings on the bottom of the board?

"Are the mounting holes at good spacing, .1" preferably but at least whole mm."
Not sure what you are asking here.

"what's the advantage of the mpu being DIP? Why would anyone want to switch from the 1284P to the 644P? "
The socket can handle any of the 40 pin DIPs: ATmega164A/164PA/324A/324PA/644A/644PA/1284/1284P
I can make SMD version also once I finish the accessory electrical tweaks.

"3.3V regulator & cap"
any other inputs on this? It is only supplying current for the SD/uSD.

"uSD connector only"
I like the option of either one. Looks like there are plenty of options for brands & sizes:
http://www.amazon.com/s/?ie=UTF8&keywords=64gb+sd+card&tag=googhydr-20&index=aps&hvadid=3806787621&ref=pd_sl_3v9txqilg_b

"SQW signal going to an interrupt pin so you can create a version of millis() that doesn't skip a beat or have the RTC wake the processor at 3AM. "
I think I can do that - does it need to a hardware interrupt like INT2 on pin PB2, or can it be a PCINT like PD7?

"The pressure's on Crossroads"
No pressure, I am having fun solving this puzzle.

"Somehow I don't think he's connected anything up yet."
Not true - board as shown is all routed. I just rip up small areas and make tweaks as I go.

Real time clock - is any one familiar with this Pericom part:  PT7C4311WEX
Digikey has them for 85 cents in qty 1, having some trouble locating the datasheet for it.

"One of those chips is extremely fine pitch. I have a similar project and the stencil just came in. I'm pretty nervous about being able to assemble it with a stencil and an oven, never mind hand soldering."

The FTDI chip is really nice for USB. I think that is the only part I'd be uncomfortable hand soldering, the 0805 size Rs, Cs, LEDs look do-able.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on May 17, 2011, 05:41 pm
RTC - I am using pcf8563T (smd), 5xcheeper than the ds1307, and only needs 200nA current (you need two additional diodes for the pcf)
Battery -  I've moved to 12mm diameter cell recently (cr1220), there are nice sockets available, it will last _many_ years as well.. No need for such giant hockey puck :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 17, 2011, 06:05 pm
Quote
How do I get the battery markings on the bottom of the board?

Don't know, I don't use Eagle for anything but viewing other people's files.

Quote
"Are the mounting holes at good spacing, .1" preferably but at least whole mm."
Not sure what you are asking here.

Just that the distances between mounting shouldn't be something like 57.356mm that's hard to measure with you come to mounting it in a box.

Quote
"SQW signal going to an interrupt pin so you can create a version of millis() that doesn't skip a beat or have the RTC wake the processor at 3AM. "
I think I can do that - does it need to a hardware interrupt like INT2 on pin PB2, or can it be a PCINT like PD7?

Either way, I would probably save the INTs and use a PCI, but INT2 would be a bit easier to use from the software point of view and it's "spare" according to the Arduino or do the 1284 core files handle attachInterrupt(2,xx).

Quote
"3.3V regulator & cap"

The MCP1700T is good, @ 250mA it will handle the power I would think, what power do the SD cards draw? The SOT23 has a tempco of up to 336 C/W and the the SOT89 only 52 C/W. So the SOT23 can only handle about 1/3W at room temp (depending on how much copper it has around it).

Quote
is any one familiar with this Pericom part:  PT7C4311WEX

Not me,it looks similar to the 1307 but I don't see any benefit to using it. The RX-8025 mentioned before looks nice and I do like the built-in TCXO, but if you went that route I'd go with the DS3231 chip. There are libraries for the common chips, probably not for the others, so unless there's a really neat feature not available on the 1307/3231 I'd stick with them.

Quote
One of those chips is extremely fine pitch.

I use a hot air gun to solder these (the FTDI is the finest I've done so far), easy, just run two beads of paste along the pads and hit it with the hot air. Clean any bridges with solder wick.

______
Rob


Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on May 17, 2011, 06:14 pm
.. the 1284p is a low power device with <<1uA power save and power down.. Did you think on switching off the various chips on the board when they are not accessed? E.g. via a transistor in their Vcc.. Otherwise they can take ~mAmps.. A green board design.. :)
PS: the pcf8563 driver (based on the ds1307) does exist..
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 17, 2011, 06:17 pm
Quote
How do I get the battery markings on the bottom of the board?

If you flip the battery holder then it should go to the bottom of the board (either flip tool or middle button/scroll wheel when moving the part)

Quote
Quote

One of those chips is extremely fine pitch.

I use a hot air gun to solder these (the FTDI is the finest I've done so far), easy, just run two beads of paste along the pads and hit it with the hot air. Clean any bridges with solder wick.

I have soldered 2 DS3231s with a 2mm chisel tip soldering iron (no extra flux) as well 16 dual colour 0805 LEDs and those tiny SMD 0.1uF caps and some other stuff - just takes practice. I did lose a capacitor in my solder when I got distracted though :D
Oh - smallest I've done are some of those SMD resistor networks with 8 resistors in each in a package about 3mm long.

Quote
.. the 1284p is a low power device with <<1uA power save and power down.. Did you think on switching off the various chips on the board when they are not accessed? E.g. via a transistor in their Vcc.. Otherwise they can take ~mAmps.. A green board design..

Hmm. Interesting idea but I don't really have any knowledge of low power stuff so have no idea :D
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on May 17, 2011, 06:32 pm
..and what is interesting for a low power design is the system can measure its battery voltage in the way it will not consume much energy. So you need an op-amp (sourced from i/o pin or switched on/off when required) with fet intputs, and a high impedance voltage divider (not to discharge the battery too much). I am using MAX1724 3V3 stepup (great chip -sot23-5)and my system is powered from one nimh cell.. From time to time it measures the battery voltage.. The 1.2V cell is charged from a sollar cell.. It works from 0.6V (it shall work from 0.8V input voltage according to the datasheet)..
P.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 17, 2011, 06:48 pm

..and what is interesting for a low power design is the system can measure its battery voltage in the way it will not consume much energy. So you need an op-amp (sourced from i/o pin or switched on/off when required) with fet intputs, and a high impedance voltage divider (not to discharge the battery too much). I am using MAX1724 3V3 stepup (great chip -sot23-5)and my system is powered from one nimh cell.. From time to time it measures the battery voltage.. The 1.2V cell is charged from a sollar cell.. It works from 0.6V (it shall work from 0.8V input voltage according to the datasheet)..
P.


If the processor is being powered directly from the battery voltage, there is a way to directly read the Vcc voltage of the processor without any external components. It's done by selecting the internal bandgap voltage as a analog input measurement (not as a reference) and calculating what the Vcc actual is. Here is a link to the topic as Coding Badly and I were playing with the function. http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1294478456/8

However as you are using a step-up regulator that would not apply as the vcc should be constant until battery exhaustion.

Lefty
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on May 17, 2011, 07:02 pm
re: RTC, I imagine you'd want to pick something for which there's already library support...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on May 17, 2011, 07:40 pm
@lefty: yea, it is understood we measure the battery voltage.. to know the battery is low.. Btw, I've seen an application note at Maxim (an opamp) for current measurement (one op-amp, one pnp trans, 4 resistors - it is an simple i/u converter and it measures the current flowing from the positive vcc rail somewhere). So when using a dual opamp we can measure both and provide a kind of "power management". E.g. you can measure the current consumption of some external devices.. And switch them off when battery is close to die (you will decrease the current, based on its capacity, by switching off/on the shields with lower priority such the battery will last until the mission is accomplished..). Useful when you plan to land on the Mars (Arduino Guidance Computer)  :smiley-mr-green:

PS: see the
http://datasheets.maxim-ic.com/en/ds/MAX4240-MAX4244.pdf
fig.11.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 18, 2011, 08:34 am
Okay, I'm calling it done electrically.  Gonna work on cleaning up component names next, check availability of all parts, from sparkfun or elsewhere.

Found a little 32K crystal for the RTC. Sticking with the DS1307 as it seems well known. Brought the square wave to the middle of 3 header pins, other 2 go to INT2 and PD7, select your interrupt choice.  May change it to much less expensive part (85 cents vs $3.72) if I can find a datasheet.
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=PT7C4311WEXCT-ND
Hmm, maybe not - not much flexibility on the square wave out:
http://www.pti-ic.com/new/manage/doc_datasheet/PT0322%20%20%20%20%20PT7C4311.pdf
512 Hz only
vs
http://datasheets.maxim-ic.com/en/ds/DS1307.pdf
1 Hz/4K/8K/32K Hz

Not doing any more with low power operation, wasn't my goal for this board. Figured this to be an actively powered device with the 2 interfaces  and the SD card going for whatever reason.
Got the battery socket on the bottom of the board, away from any thru hole interference.

Made sure the mounting  holes were on 0.10" spacings.

Any Eagle experts out there? I need someone to confirm the pads are correct for the 2 regulators. They look odd to me.
PM me with address, I'll send the eagle file.

Thanks
Robert
(http://www.crossroadsfencing.com/Bobuino_rev3_layout.jpg)
(http://www.crossroadsfencing.com/Bobuino_rev3_traces.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 18, 2011, 10:09 am
Eugh, am I allowed to say that routing's ugly?
And those power tracks are a bit thin. No ground plane?

What do you think looks odd with the regulators?

Quote
However as you are using a step-up regulator that would not apply as the vcc should be constant until battery exhaustion.

Yeah this confused me for a bit last week - I've modified some scales which took 2 CR2032 batteries and ate them. It would tell you it was going flat at about 4V so I stuck in 2 AAs and a 5V boost converter. Then it stopped working after a while as the batteries were half flat but it hadn't told me it was going flat as the voltage was still ~5V, the boost converter just couldn't supply enough current so the scales simply died.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on May 18, 2011, 10:23 am
You might want to move all tracks underneath the crystal elsewhere and provide proper guard ring.
The analog lines you might want less overlapping with the digital ones. I guess all the tracks (even signal can be thicker).
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 18, 2011, 10:28 am
That was also some pretty quick routing. Autorouter or by hand? Looks a bit too random to be done by hand.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on May 18, 2011, 10:13 pm
1. there is a part colliding with the pinheader above the rtc
2. no tuning capacitor? (at least a single cap placeholder at X1 input against gnd), few pF makes few seconds a day from my experience when not having special resonator (and usualy resonators run faster so needs to be slowed down, at least mines)
3. the 32khz resonator shall not be placed vertically but it has to be placed horizontally with a solder point for its case (gnd?)
4. do pour the both sides with GNDplane (eagle "polygon GND" or "polygon gnd"), this may help with autorouting and ground noise significantly
5. did you consider smaller diameter coin cell? (maxim says 48mAh coin lasts for 10y ->CR1220)
6. sometimes helped me to place a few cents TL431 (+ 1 resistor in anode, anode+gate shorted) as an external 2.5V ref source (maybe better than atmega's internal one)
7. do we need those big alu caps there - the 10-20uF ceramics usualy works better, are cheap and are 1206 or 0805.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 19, 2011, 07:45 am
Ok, the board was autorouted with lots of parts placement manipulation to make traces as short a possible.
Here's a blowup of the pads. I figured the top & bottom would be 2 solid planes connected by vias. Yet the tops got split up funny.

I make the ground traces thicker manually, they seem to revert to thinner every time I rip them up and let them play out again as I move parts around.

After the routing was done I tried adding polygon to make a ground plane.
>> What makes  the ground plane actually connect to ground?
>> The ground plane also made a couple of signals become disconnected. Not sure its doing much for me.
Is there a better way to add that?

@pito,
1. There is no conflict - the battery holder is on the bottom of the board.  All conflicts except for "stop mask" errors were taken care of, I will be cleaning up the Reference Designators next.
2. X1 on the DS1307?
3. 32K crystal has been layed over.  Traces have been cleared away.
4. Am trying that again, see if it helps.
5. Went with a coin cell that I could easily find a holder for.
6. I don't know why Arduino original design had Aref located diaganolly opposite on the board from the Analog inputs.  Ihave rerouted the Aref signal away from the power supply section.
7. Will review the 'big' electrolytics.
(http://www.crossroadsfencing.com/Slide1.JPG)
(http://www.crossroadsfencing.com/Slide2.JPG)
(http://www.crossroadsfencing.com/Slide3.JPG)


Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 19, 2011, 09:02 am
I'm trying to add the top & bottom layer hatch planes. I drew out the rectangles, renamed then Gnd, ripped up all traces and let the autorouter go - is ~97.7% done afeter Optimize 1. Having the 2 ground planes isn't helping the routing as much a I thought it would.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 19, 2011, 09:07 am
Great, so its all done finally, leaving me unrouted lines to clean up - all Grounds! Go figure.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 19, 2011, 10:22 am
Quote
Great, so its all done finally, leaving me unrouted lines to clean up - all Grounds! Go figure.

Shouldn't take too long.

Once you're done I'd have a manual tidy up of tracks (I'll have a play around with them if you want).
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on May 19, 2011, 04:30 pm
@Xroads: you have to simply write into eagle's command line:
polygon Gnd (or GND or gnd - depends on the signal name)
and it will assign the name to the polygon you intend to draw after..

BTW -you may place the crystal underneath the 1284p (see the dil40 machine pin socket there are such "windows"), I did it with dil28 narrow socket as well - Unless you plan to change the crystal too often it saves a lot of space. As the heights is concerned it fits nice..
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 19, 2011, 04:57 pm
Quote
BTW -you may place the crystal beneath the 1284p (see the dil40 machine pin socket there are such "windows"), I did it with dil28 narrow socket as well - Unless you plan to change the crystal too often it saves a lot of space. As the heights is concerned it fits nice..

Yeah I was going to suggest parts under the 1284 but I was struggling to think of anything that could go under it - I'd completely forgotten the crystal!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on May 19, 2011, 05:01 pm
IC1 is also a good candidate to be put underneath the 1284p..
Btw, is the package of the IC1 really so wide??
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 19, 2011, 05:09 pm

IC1 is also a good candidate to be put underneath the 1284p..
Btw, is the package of the IC1 really so wide??

You'd struggle to fit it under as it really is that wide - I think the plastic socket would hit it and that would make routing much harder without any real advantages.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 19, 2011, 07:52 pm
Yes, the MAX232 driver chip selected is that wide. It would fit under the 1284 if the pins were laid perpindular to the DIP's pins, which would probabaly be good for the capacitors also. However I think routing of the signals in/out of the part then seriously get in the way of the 1284 signals on a 2 layer board.  If I think about it tonight, I'll rip the traces up & try it.
The decoupling caps and crystal caps and Reset R/C parts would then have to move out from under the 1284 (or go on the bottom of the board? Hadn't considered that possibility.)
The MAX3232 also comes in a 16TSSOP package which the FTDI part type pin spacing. I went for the bigger hand-solderable size.
The 16MHz crystal won't fit, is too tall.

@mowcius,
"Shouldn't take too long.
Once you're done I'd have a manual tidy up of tracks (I'll have a play around with them if you want)."

Its gonna be hard - there are so many signals, I did not see any readily available spaces to run a trace and vias to get them connected to ground somewhere, and I have hatching on the top & bottom layer.  The pads that need to be connected are on their own little ground islands.  I think I will have to  move things a little and try again, should resolve 2 of the capacitor ground issues, getting ground to IC7 a little trickier now that the crystal caps are under the 1284.

I find it very hard to follow the traces after the hatching goes in.

I suppose I could have it do the routing with no hatching, strip out the grounds, clean up by hand, then let it try & put the hatching in again. Likely just leave me with unconnected grounds again.

Or just route it all by hand, just takes longer and results in more Design Rule checks to clean up as I tend to get things a little too close without realizing it (they look far enough apart when zoomed in!)

What gets me is the clearance errors that need cleaning up after the routing is done, and the Width & Dimension errors. from the libray parts! Specifically the fiduciarys, some interference between SD socket ground pad and hole in the lower right side, and vias that get placed too close to stuff.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 20, 2011, 07:46 am
Quote
I suppose I could have it do the routing with no hatching, strip out the grounds, clean up by hand, then let it try & put the hatching in again. Likely just leave me with unconnected grounds again.

Why are you hatching it then? Or just so it looks pretty...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 20, 2011, 08:55 am
Got it to work finally. Still had to make a few ground connections by hand, kinda like showing the program where to put a via or two so it could make the final connections. Moved a couple of caps slightly, moved a few traces so the ground planes could cover a little more area. Bit of an iterative process - tweak a trace or two, let the polygon refill. Move a part a scooch, let the polygon refill. Overall coverage between the 2 layers is good, got some voids in the bottom layer where the runs spanning long stretches don't give the polygon any access.
Think I can add a via in the middle of the top layer and have it carry over to the bottom to get the voids filled?

Looking at parts for availability next - checking the SD socket to see if make can go in (digikey carries several, the mechanical drawings are not the easiest to interpret) or if the Sparkfun library part is unique.
(http://www.crossroadsfencing.com/Slide2.JPG)
(http://www.crossroadsfencing.com/Slide1.JPG)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 20, 2011, 09:50 am
When Eagle complains about "Clearance" errors around the regulator thermal pad, do I need to resolve that or can I ignore it as the top & bottom layers are intentionally connected together with vias?

I'm thinking this needs  more work - looking closer, the top layer has a small pad in the middle that is isolated with an outer pad that is connectet to the ground hatching.
The bottom pad is VCC, but is also connected to the bottom layer ground hatching.
I need some way to isolate the regulator thermal pad.

(http://www.crossroadsfencing.com/eagle_complaint.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on May 20, 2011, 10:03 am
if you shoot manually vias through you have to name each via according to the signal - in the thermal pad case "GND".
You are missing the vias in thermal pad for the second voltage regulator..
The low profile crystal package fits under the chip..
Do use solid ground plane..
Generally : design rules - it depends on your pcb provider, most of them are checking them before the fab starts (and they shall provide you with their design rules definition, drill set definition etc..) and when they see an error they will not fab the pcb or they will charge additional fees.. :0
P.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 20, 2011, 12:30 pm
Yeah, use a solid ground plane (or an almost solid ground plane if you absolutely have to stick silly hatching on it) and that routing's still ugly :D

What fab house are you thinking of using, go look if they provide design rules files - some do so you can easily check it yourself.
...and if the tracks are ground, you don't have to route them, rip them up and they will then just connect to the ground plane.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 20, 2011, 03:47 pm
Ok, now that I've the hatched polygon figured out,  I can try solid planes. I will check out naming the pads/vias as well.
I had vias in both thermal pads, will check & see what happened to them. I might have just turned viewing them off when I did the screen captures.

There were a few pins that couldn't connect to the ground hatching because there were too many signal runs in the area. I had to run a trace by hand, adding vias to bring the signal under the part and back up to where there was a ground signal to hook up to. Just a little too complex for the autorouter.

I think part of the reason for the ugliness is the shield footprint. The placement of some signals is just poor, and the size of the 1284 means you can't cram everything all in the same spot.

Skyjumper just had some similar boards made (little bigger more connectors), the bare PCBs look good, I think I'll follow his lead as  he's nearby (Boston area also) and they were made & returned pretty quick.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 20, 2011, 07:52 pm
Quote
I think part of the reason for the ugliness is the shield footprint.

Nahh it's just the tracks going at funny angles.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 20, 2011, 07:57 pm
Ah, the angles - thats all part of the shortest distance routing going on. The 40 pin DIP really stretches some of the signals out.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 20, 2011, 07:59 pm
Hmm - I'd opt for a neat 45deg angle and a 1mm longer track any day but maybe that's just me
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on May 20, 2011, 08:43 pm
^^^ wot he sed ^^^
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 20, 2011, 08:45 pm
Quote
^^^ wot he sed ^^^

I'd also opt for a few ms longer typing time and correct spelling and grammar any day :D
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on May 20, 2011, 08:49 pm
to quote DEATH

"ho ho-ho"
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on May 22, 2011, 01:50 pm
While waiting for other boards to return from the fab, I give the ATMega1284P board a go. And here's the outcome!
(http://farm6.static.flickr.com/5182/5746278034_27f9c05e37.jpg)
(http://farm4.static.flickr.com/3485/5746281712_5844ae0f06.jpg)
(http://farm3.static.flickr.com/2599/5746300906_6229effcf9.jpg)

I wanted the board to have minimal components and made the board as simple as possible. Some descriptions of the board:


I have thoughts of using a smaller output current 3.3V regulator but with very small quiescent current. This will allow for lower power usage and maybe use the 32.768 kHz in asynchronous mode during sleep. In this case, input voltage (battery maybe) is stuffed in from the 5V instead of the DC in. Comments and critics are welcome. No plans for fabrication on this board yet. :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 22, 2011, 04:49 pm
Nice expansion from a 328 to the 644/1284 family.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 22, 2011, 04:55 pm
Nice-looking layout, not auto-routed I'm guessing.

I can't read the schematic, are you using an inductor on AVCC?

______
Rob
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on May 22, 2011, 05:50 pm
Rob,

I think you can view the schematic on the image source link (Flickr) itself. Not too sure why the image was resized.
It's manually routed totally. And yes, there's an inductor on the AVCC. :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on May 22, 2011, 08:03 pm
..my strong feeling is the board needs an external RTC.. the idea running 1284p with the optional 32khz xtal @timer2 is nice, but when you start to work with it you will be soon unhappy not having the actual time ready anytime.. maybe to trade it for jtag and the prototyping area.. with a small dia coin cell it may fit, maybe..
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 22, 2011, 10:49 pm
Manual routing is the way to go - see how neat it looks all with nice 45deg angles :D
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 22, 2011, 11:14 pm
I'm doing the other one manually now, got about 10 signals to go. The ones that go from the top of the board down to the middle & bottom are a pain.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 22, 2011, 11:16 pm
Quote
I'm doing the other one manually now

Heh, nice :)

You'll never go back to that evil autorouter!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 23, 2011, 10:38 am
Okay, after much time  manually routing and tweaking signals to maximize ground plane coverage, here's what I have.
Am still looking into which SD card socket to use so that corner may change a little, or I may  just leave alone for the sparkfun offering.

We're noticing that the Duemilanove and the Uno changed pad shapes from round 0805 pads to square pads for some components (along with going to what looks like mere specks of sand for some parts o) ) - anyone know the reason for change on reasonalbe size parts?
(http://www.crossroadsfencing.com/Slide1.JPG)
(http://www.crossroadsfencing.com/Slide2.JPG)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: bubulindo on May 23, 2011, 03:13 pm
Looks sweet!!! ;)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on May 23, 2011, 05:52 pm

..my strong feeling is the board needs an external RTC.. the idea running 1284p with the optional 32khz xtal @timer2 is nice, but when you start to work with it you will be soon unhappy not having the actual time ready anytime.. maybe to trade it for jtag and the prototyping area.. with a small dia coin cell it may fit, maybe..


I manage to add PFC8563T RTC with a 12mm coin cell. I guess it will last you for a long time. And there's some library around for that chip. As there's a 5V & 3.3V selection, the RTC needed to be able to operate on both voltage and PFC8563T fits that and didn't burn a hole in the pocket.
I'll stop here for the board! If any of you guys are interested, I'll post the CAD files probably on GitHub.

(http://farm6.static.flickr.com/5063/5750827783_6d06399fc5.jpg) (http://www.flickr.com/photos/53660215@N05/5750827783/)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 23, 2011, 09:11 pm
Eugh, why still no 45s?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 24, 2011, 01:10 am
I got close! 45 not so handy with a long rectangular board.
Besides, long parallel runs are good for inducucing crosstalk between signals, so is better to break them up.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on May 24, 2011, 02:17 am
Came across this on the AVRfreaks site. Some kind of bug with Mega1284p on serial RX0 requiring a low pass filter to solve. Don't know the root problem or even the symptom seen, but this seems to be a fix:

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=107115

Lefty
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 24, 2011, 04:54 am
I have a prototype board Crossroads made up originally for the 644P-DIP, and I have since replaced the 644P with a 1284P in DIP. My application is heavily serial based, although with the second serial port. Tonight I will write up a little code that moves data out the first serial port at high speed and see what happens. I know the second serial port is fine as it ran for nearly five days with no errors.

I doubt I'll have an issue though.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 24, 2011, 04:58 am
Bob, I suggest on the 0805 parts you switch from package 0805RND to 0805. I have asked around and not received much feedback on the parctical difference, but the square pads have more surface area for solder paste to flow on. The few opinions I were offered went in favor of square pads. When I had my stencil made, the maker thought he was doing me a favor and removed the round pads because he though they were holes. He is making a new one now.

Over all it may be a small change but its easy to make and I think worth the effort.
 
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 24, 2011, 05:09 am
Okay, my 1284P DIP is dumping data out Serial at 115,200 with no end in sight. We'll see if it keeps going.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 24, 2011, 06:32 am
Looking at parts for availability next - checking the SD socket to see if make can go in (digikey carries several, the mechanical drawings are not the easiest to interpret) or if the Sparkfun library part is unique.


I have searched, and as far as I can tell, the SparkFun SD Socket is available only through SparkFun or its manufacturer. The maker is a company called 4UTechnology and they will sell these direct, but its not super clear how to buy them. Through SparkFun its about $4.00, which is very high.

On my prototype, this is the first thing on the list to change for production.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on May 24, 2011, 06:35 am

Looking at parts for availability next - checking the SD socket to see if make can go in (digikey carries several, the mechanical drawings are not the easiest to interpret) or if the Sparkfun library part is unique.


I have searched, and as far as I can tell, the SparkFun SD Socket is available only through SparkFun or its manufacturer. The maker is a company called 4UTechnology and they will sell these direct, but its not super clear how to buy them. Through SparkFun its about $4.00, which is very high.

On my prototype, this is the first thing on the list to change for production.




Those connectors are from 4UConnector. They are not a manufacturer but a some sort of huge connector trading company. You can the connectors way cheaper there. You can get samples something like for 10 pieces. But, they expect you to buy in reels later on. I think it's best to stick to some easily obtained manufacturer like Molex and the like.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 24, 2011, 07:33 am
"I think it's best to stick to some easily obtained manufacturer like Molex and the like."  Yet there no library symbols for those, or maybe there are & I'm just not clever enough to have found them yet.
I'd like to go with the FCI connector that Digikey carries, one of the better prices, the thickest gold plating on the contacts, and what looks lke a decentmetal housing. I haven't figured out how to make symbols yet to be able to add it into a design.

I''ve finally got the Clearance errors cleaned up on my hand routed board.
Got a pile of drill size errors now, not even sure what the fix is for those!
And then back to the Stop Mask errors and Width errors.
Pain in the ass.  The auto router made some errors; this is ridiculous.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 24, 2011, 08:49 am
So far about 2.5 hours of serial data moving around, no issues (knock on wood).
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: sixeyes on May 24, 2011, 10:16 am
Quote
I haven't figured out how to make symbols yet to be able to add it into a design.


http://www.instructables.com/id/How-to-make-a-custom-library-part-in-Eagle-CAD-too/

Does this help?

I use this every time I can't find the part in Eagle.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 24, 2011, 02:55 pm
@sixeyes,
I can give it a shot. What'd I'd really like is to just be able to mod & save the existing socket - it really just needs the pads moved left & right a little. Is there an easy way to do that?

As long as I have your eyes - my hand routing resulted in a bunch of drill size error. Something about 0.012" vias on traces that are 0.01 wide, which appears to be the size that eagle uses when it autoroutes. I opened the vias to the first standard size listed, 0.019xxx, the DRC with Fusion rules checker still calls them out. I don't know what to do fix it.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on May 24, 2011, 03:01 pm

...
As long as I have your eyes - my hand routing resulted in a bunch of drill size error. Something about 0.012" vias on traces that are 0.01 wide, which appears to be the size that eagle uses when it autoroutes. I opened the vias to the first standard size listed, 0.019xxx, the DRC with Fusion rules checker still calls them out. I don't know what to do fix it.


Coming at this from a position of blissful ignorance (so please just ignore me if I'm sounding stupid), it sounds to me like Eagle is complaining that the via's are too big, and it sounds like your action ("I opened the vias to the first standard size listed, 0.019xxx...") was to make them bigger (compared to 0.012). Perhaps they need to be made smaller? Or the traces made bigger??
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: sixeyes on May 24, 2011, 03:21 pm
Quote
What'd I'd really like is to just be able to mod & save the existing socket - it really just needs the pads moved left & right a little. Is there an easy way to do that?


Yes you can do that too. I tend to copy libraries and edit them, more than create new parts. The link shows you how to create a new part but the instructions can be applied to existing parts.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 24, 2011, 09:03 pm
@tastewar,
I can't tell if too big or too small or a conflict with the trace width - it just lists Error as "Drill size" and the layer; thenI click it and it shows where on the board. No explanation.

You'd think that having 2 standard selections would make things legit.

I guess the DRU file, that we got from Seeed Studio I think as a good example, is doing me in, but I don't understand it enough to know how to fix things. Clearances, that was straightforward. There's also "Width" errors, for a trace sitting on a pad - what's the matter with that? 
I won't get a  chance to do anything until 10:30ish (east coast) tonight.

Can't even autoroute it anymore - design is too complex, it only get ~72% done  then chokes.

@sixeyes,
Will play with the symbol then too.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 24, 2011, 09:18 pm
Crossroads, keep in mind that the board we did also failed many of those checks but there was no problem making the PCBs.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 24, 2011, 09:42 pm
Yes, but:  the initial design could not autoroute. I then did a manual route and solved many of the issues by moving components, and ended with ugly looking traces at funny angles & stuff (routing with laptop finger pad is not the best way to go). I was able to get that to autoroute with a couple more small moves and only had to manual fix up 3-4 traces, so the traces ended more or less like my manual version but much neater looking. Eagle maintained the clearances and selected the drill sizes & stuff so the errors were limited to tStop & tCream overlaps, which some sliding & scooching around resolved.

The same approach is not working so well here with the FTDI chip, the SD card driver, the RS232 driver, all of which the other also had, but also the RTC, smaller board size, jumper fields for user signal manipulations, etc. I had the manual routing done, looks like a checkerboard pattern, but it won't autoroute. Also want to incorporate your suggestion on the square pads vs round.

I haven't looked at the international circuits Design Rules yet, not sure where that will lead.

Solution might be to widen/lengthen the board, have the atmega placed closer to the digital header pins and move the  support chips to the 'analog' side of the DIP.

I still think the original shield pin assignments are part of the problem, with signals criss-crossing the board.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 24, 2011, 09:58 pm
Maybe its time to drop Eagle and go to a 4 layer board!  LOL

Actually my friend Bill was over the other day and showed me the GNU EDA suite. All free, very nice stuff with schematic capture, board layout, auto-routing, component libraries (he should me how to add a component - not too hard).  No limit on board size and works up to 8 layers. He said the only restriction of consequence is that all the vias have to go all the way through the board.

Non-triveal to learn though, like all these things. :-( Who has time to invest in learning a new system?

Is there a reason you didn;t want to make the Bobuino board any bigger?


Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 24, 2011, 10:19 pm
Size: I started out just planning to use the SMD 1284, plenty of room for the RS232, SD driver & socket, 1 more header for the extra I/O, no big deal, and it fit nice in the lengthened Uno footprint (lengthened for the SD socket and the DB9 when I had that in the design).
So when I went to the DIP, figured it would still fit as the # of signals hadn't changed. But now its feeling really condensed.
Still, I am very close, I want to get it done now. My newness to the tool is getting in the way despite being able to do more with it, or at least do it quicker, every time I use it.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on May 25, 2011, 06:05 am
Cross,

If you don't mind posting the Eagle files, I think everyone here can take a look and help or suggest.
I'm not a pro in Eagle, but I'm familiar with a number of CAD. And I think there's a lot of Eagle master here to help out!

If you do move the chip upward, you might have more signal issues later especially on the analog lines. I faced this before and I end up getting kHz noise on analog lines.

IMHO think the board is still achievable with 2 layer! And it doesn't matter what CAD you use, as long you stick to one that you like or prefer, it's good enough.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 25, 2011, 06:33 am
The board file can be downloaded here.
I don't have access to this stuff during the day, end up getting to play after fencing classes at night.
http://www.crossroadsfencing.com/atmega1284_Rev7_auto_routing.brd
http://www.crossroadsfencing.com/Fusion_eagle_rule_v1.1.dru
(right click, save target as, ... etc and correct the file extension).
I already cleared up the Clearance errors. Except for the built in error in the SD card socket.
The Drill Size and Width errors are the ones I am concerned about.
The Stop Mask errors are just the part outlines on the header pads, seems like a stupid error to be getting.
The Default setting creates tons! of errors.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on May 25, 2011, 07:11 am
Some thoughts on the boards:


If there's plan to stick to microSD connector only, there's plenty that you can do to improve. For example, you can push the microSD to the left top nearer to SPI breakout. By doing that, your RTC and battery can move to the right edge of the board (original location of SD) and you can even replace the battery connector with a slide in version from the edge of the board like this one: http://www.sparkfun.com/products/8863

That's some of my humble thoughts. What the rest of you guys think?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 25, 2011, 07:11 am
Okay, I am going to stop my serial read-write process. Its been running non-stop since I started it.

However, this does not prove much. Maybe Atmel fixed the bug, but there are some chips out that still have it. Maybe I just didn't write code to trigger it. The high pass filter may be a good idea, just in case.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on May 25, 2011, 07:13 am

Okay, I am going to stop my serial read-write process. Its been running non-stop since I started it.

However, this does not prove much. Maybe Atmel fixed the bug, but there are some chips out that still have it. Maybe I just didn't write code to trigger it. The high pass filter may be a good idea, just in case.



The errata is empty in the datasheet. I never see any chip that is perfect!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 26, 2011, 06:32 pm
Okay, I have the ground planes covering just about everything except a few small areas where there too many line in parallel to get any coverage. I'v got the signals moved away from the crystals and ground plane underneath them on both layers (altho my wirewrap boards have just ungrounded copper holes underneath and wires there too and it doesn't seem to bother anything as evidenced by skymaster's testing of the "hacking the Uno" prototype.
I was looking at the runs last night, and it looks like I managed to put vias in the middle of 2 IC pads, so I have a little more cleanup to do. I think I have all the clearance between traces & pads cleaned up.  Got most of the Width errors cleaned up, they mostly seemed to 10 mil traces for power & ground, so have been making them wider, like the 16 mil that is the defaut in eagle.
Don't know why, but the drill size errors seem to have gone away on their own.
And , need to clean up the silkscreen/labelling so parts placement is readable. Possibly move the headers for the extra IO and RS232 IO to conform to same 0.1" grid alignment as the shields. (maybe add 2nd set of holes so the funny offset shiedld can be populated for a standard shield, or for normally spaced perfboard - need to see if any traces are in the way). The others are intended to have jumpers installed for signal selection.

Have not tried updating the SD socket symblo yet (still keeping both) or changing 0805 pads to squares from round. I think for that I have to delete them on the schematic, add them in again, and then see if they will fit in the same space on the board.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on May 26, 2011, 07:13 pm

... or changing 0805 pads to squares from round. I think for that I have to delete them on the schematic, add them in again, and then see if they will fit in the same space on the board.


Sheesh. I'd have hoped/thought that the pads would just be a property of the component that could be changed easily. Of course I've never used Eagle (or any other) CAD software...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 26, 2011, 09:09 pm
And , need to clean up the silkscreen/labelling so parts placement is readable.


The default silk screen line width is too narrow and it will fail DRM at Advanced Circuits and one other (I forget who). But on the plus side, they correct this for you. International Circuits never said a word about it and it came out great. I did make a change to the font I think to proportional. I'll double check and post back.

Quote
Have not tried updating the SD socket symblo yet (still keeping both) or changing 0805 pads to squares from round. I think for that I have to delete them on the schematic, add them in again, and then see if they will fit in the same space on the board.


On the pads, thats super easy. Right click ont eh component, and I think under properties just change the packahe type from 0805RND to 0805. If you want to round the corners, this is set in the Shapes tab of the DRC menu. It's not necessary to create new footprints.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on May 26, 2011, 09:11 pm
Sheesh. I'd have hoped/thought that the pads would just be a property of the component that could be changed easily. Of course I've never used Eagle (or any other) CAD software...


I *think* the way this works is that each compnent has a "package" property and it just needs to be changed.

I'm also not certain that its better to use square. There dos not seem to be a concensus on this. I plan to reflow some boards between now and Sunday and the boards have round pads for 0805 components. We'll see how it works.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 26, 2011, 10:02 pm
Quote
Have not tried updating the SD socket symblo yet (still keeping both) or changing 0805 pads to squares from round. I think for that I have to delete them on the schematic, add them in again, and then see if they will fit in the same space on the board.

Assuming the parts have the same number of connections in the same order then you can just use the 'Replace part' tool which seems to work pretty well when people have the wrong package for a chip or similar.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 26, 2011, 10:28 pm
The SD socket for the FCI part I want to use does not exist that I know - or if it does, I haven't found it (am still fighting my way along with eagle). I will admit to stumbling along in my library searches.

digikey catalog
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=609-3956-1-ND
datasheet
http://portal.fciconnect.com/res/en/pdffiles/doc_search/10067847.pdf
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 26, 2011, 10:37 pm
It'll be good practice for you to make it then :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: sixeyes on May 26, 2011, 10:41 pm
If you've got a mechanical drawing it'll not take you long. The tutorial at instructables is very detailed, with step by step instructions.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on May 26, 2011, 10:43 pm
they're not wrong
it's quick and easy and very satisfying
(noooooooooooooo making your own components!)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on May 27, 2011, 03:38 am
Once you get hold of making your own libraries, you don't look back! :)

You can use right click and replace to change the footprint.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 27, 2011, 09:08 pm
Will be back at it tonight, was wiped after fencing classes last night, didn't even get online.
Thanks for all the encouragement!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 28, 2011, 05:48 am
I wonder if your drill size problem was that the via "anulars" were too small, ie the copper around the drilled hole. This happens when the hole it too large for the pad according to the rules.

As for making components, I don't even bother to search for them, I just make things as I need them (but I don't use Eagle).
______
Rob
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on May 28, 2011, 05:53 am

I wonder if your drill size problem was that the via "anulars" were too small, ie the copper around the drilled hole. This happens when the hole it too large for the pad according to the rules.

As for making components, I don't even bother to search for them, I just make things as I need them (but I don't use Eagle).
______
Rob



Always check minimum annular ring with the factory that you want to use. If the factory didn't check and the design went for production, you'll get a lot of half moon craps.

Argh, I miss using Altium. You are using one right? Can't afford one nowadays, used to have it on previous job. It's super efficient program and intuitive! 
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 28, 2011, 06:32 am
I don't what happened to the drill errors, but they went away.
I'm working on the SD socket now. 
Got the pads all defined to be the right sizes, working on their placement.

Here's the latest  - with a bunch of signal tweaking, I have a lot more ground plane coverage. Thought I had the bottom middle fixed, I think solving one of the clearance errors hosed it, will tweak that again.
Also looks like the TX/D1 line takes the really long way around, will see if that can be fixed some.
And there's 1 little blue unrouted line where +5 needs to go to a pullup resistor, need to fix that too.
(http://www.crossroadsfencing.com/Slide1.JPG)
(http://www.crossroadsfencing.com/Slide2.JPG)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 28, 2011, 01:50 pm
I'd say the top left and bottom right mounting holes have components/tracks way too close, a screw head would easily short some of those tracks and maybe foul the headers.

______
Rob
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 28, 2011, 05:14 pm
I fixed the top one already, the autorouter kept putting that signal up there even tho I had it routed down the middle of the board - I'm thinking I had 1 or 2 vias too many. I had to move a few signals to route it with fewer vias so when I let it autoroute & fill the ground planes things worked.
Will look at the lower right as I clean up clearances again from the moves I made.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on May 28, 2011, 05:31 pm
Quote
Argh, I miss using Altium. You are using one right?

I was a very early adopter of the original DOS-based Protel, I pushed for it at the company I worked for. Moving from stencils and Bishop tape to CAD was a real leap of faith in those days.

We used to get beta releases (from the guys who wrote it in Tasmania IIRC), we'd phone them and talk about features we'd like in the next release.

Despite Altium's heritage it's nothing like Protel, it's bloody good though.

______
Rob
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on May 29, 2011, 06:34 pm
..maybe it is there - a jumper to switch off the capacitor from ftdi to RESET - some terminals may reset the arduino when connected, and other systems may require the switching the cap off too..P.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 29, 2011, 08:19 pm
This jumper pito?
(3-pin used because I didn't see a 2-pin)
(http://www.crossroadsfencing.com/1284_snippet.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 30, 2011, 03:35 am
Okay, I've created my first Eagle Library part!
However, I can't find it on my hard drive to upload it for review.
I saved it as RWP.lbr. When I open eagle, I can tell it to use my new Library.
When I go to add parts, RWP is not listed in list of libraries.
I'd like to upload it to ask you guys to check my math on the pads placements, but I can't find it to  upload it.
If I open the eagle control panel, I can see the library, and my part - I just can't get it into my schematic.
This is damned aggravating.

(http://www.crossroadsfencing.com/FCI_Slide1.JPG)
(http://www.crossroadsfencing.com/FCI_Slide2.JPG)
(http://www.crossroadsfencing.com/FCI_Slide3.JPG)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on May 30, 2011, 12:31 pm
open your library
click save as - you then say where it will finish up!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on May 30, 2011, 01:36 pm
When in the control panel you sometimes have to right click on it and tell it to 'use' that library you've just created.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 30, 2011, 05:47 pm
That's what I did.  I can see that library, I can see the part if I open the library from the control panel, but not if I Use the library within the schematic editor.
Going thru the instructrable again this morning, I realise I am not quite  finished - I only created the footprint so far, I need to tie it to an electronic symbol.

I was so relieved at appearing to have figuted it out mechanically, while at the same time getting the board routing to be what I think is finally done:
> no more overlapping traces - I had 2 vias right in the  middle of SMD pads, and not the same signal, and in a very dense area too
> no crazy autorouted traces added in parallel, created by eagle when I autorouted to get the ground planes filled in. These seemed to be caused by my manual traces having one or two too many vias, so I found ways to minimize the jumps between layers.
> all the clearance  errors fixed, so now everything is 5mil or more from everything else
> all the drill size errors fixed, seemed to mostly exist when a signal did something more than just change layers - like power & ground going to more than 1 place, or being a wider trace coming in than going out
> and finally all the text placement cleaned up, so now all Reference Designators can be read clearly;

that I forgot I hadn't done anything electrically with the new part!  So, time to make a simple schematic symbol & see if I can Really finish my first symbol.

Then add it to the board, and also add in the A0, A1, D0, D1, etc type names by the pins.

I also saw Skyjumpers bare board Friday night and the size of the typical 0805 components used (on a Duemilanove anyway), that I was thinking I could solder manually;  now I'm thinking the maybe not so much! And the reflow oven he has been working up is starting to look like a better idea!

His 1284P based board is also nice in that it is setup to have USB, RS232 via the 1284's internal UARTS, 4 RS485 channels via NewSoftSerial with screw terminals, reading of 3 external signals with screw terminals, 3 open collector drivers (ULN2803) with screw terminals to pull external signals low, in addition to the SD card and the standard shield support.
I changed mine to be more developmentally based with a DIP part, RS232 driver but not not a connector, I/O on a header socket vs screw terminals, both SD & Micro SD sockets, and added RTC, in a slightly smaller board since there are no screw terminals, with some jumper fields to be allow user changes, and the JTAG & ISCP headers, where he's/got a specific project in mind so we ditched JTAG and just pick up ICSP from the shield pins if needed - If you have a project that needs similar multiple serial I/O and other digital I/O then Skyjumper's board could be the ticket for you (plugging for you man!) with the screw terminals supporting a final project nicely.

I was just thinking, the footprint supports the 164P, 324P, 644P,1284P, only difference is the memory size (and ATMega chip price), so maybe a few models could be offered.

(http://www.crossroadsfencing.com/Skyjumper1.JPG)
(http://www.crossroadsfencing.com/Skyjumper2.JPG)
(http://www.crossroadsfencing.com/Skyjumper3.JPG)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on May 31, 2011, 10:00 pm
Finished the FCI Symbol last night, getting it tied to an electrical symbol! Got it on the board, is deeper than the sparkfun part and took me a while to get the traces re-routed for it.
Skyjumper made me a set of Gerbers using the sparkfun CAM, made me realize my Reference Designators need cleaning up still (didn't look as good as I thought they were), and I hadn't put the shield  headers labels back on, so a little more work tonight for that ...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mnmis on May 31, 2011, 10:48 pm
Question, Does anyone have any information on programming this board that you are designing?

Mnmis
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 01, 2011, 06:34 am
Sure, can be programmed via ICSP, or via bitbang from FTDI to get a bootloader in, and then via USB for normal sketch after that.
Skyjumper has  a lot of that worked out using the hacked Uno (see 'hacking the uno' where I modified an Uno to use a 644/1284 type chip, which was the prototype for the board above, and adapted to a more developmental type board for my use).
I aim to use this thing for something (no specific project in mind yet) so we'll have a way to program it for sure.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on Jun 01, 2011, 02:25 pm
That board (skyjumper's?) has a teaser domain name on it. No web server, no MX record. Hmm...

Anyway, CrossRoads, what are your ultimate plans for this board? Do you intend to:


or some combination?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: bubulindo on Jun 01, 2011, 02:32 pm
I'd be up to get one... preferably already built.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: oscarBravo on Jun 01, 2011, 03:46 pm
I might be missing something very obvious, but it doesn't look like the pin headers on either side of the board line up properly to allow shields to be mounted.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on Jun 01, 2011, 04:02 pm

I might be missing something very obvious, but it doesn't look like the pin headers on either side of the board line up properly to allow shields to be mounted.


Just to clarify, are you referring to the board photos recently posted, or CrossRoads' diagrams? I wondered the same thing looking at the photos...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: oscarBravo on Jun 01, 2011, 04:20 pm
I'm referring to CrossRoads' layer plots. The pin headers seem to line up just fine in the photos.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 01, 2011, 05:08 pm
Shield footprints - They should line up - I started with the duemilanove footprint and never touched the shield  headers - only enlarged the board around them. The perspective might look off due to the board being longer & wider.

Website - Yeah, Skyjumper might be a little ahead of the game - or I am in posting that. But it does look sharp!

Selling - I think I'd be up for selling bare boards and/or kits from a pick list - you get all this with every kit (a,b,c), pick from the following: 1 of w or x, 1 of y or z. I don't know about completed boards, I don't have time to line up an assembly house, nor time to assemble them myself. Maybe just have the FTDI chip soldered, folks can hand solder the rest depending on what they want to implement.  I think build at least a couple and make sure every thing works as expected.

Got the labeling cleaned up last night, will create gerbers tonight & review, then I think its time to place an order and buy some parts!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: oscarBravo on Jun 02, 2011, 12:27 am

Shield footprints - They should line up - I started with the duemilanove footprint and never touched the shield  headers - only enlarged the board around them. The perspective might look off due to the board being longer & wider.
Here's what I'm talking about:
(http://img.ie/73cbb.jpg)
On the Arduino on the desk in front of me, those pin headers line up. Again, maybe I'm missing something obvious.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on Jun 02, 2011, 01:50 am
Quote
Here's what I'm talking about:


I think that is still correct, he just added two more analog input pins onto the normal 6 pin analog shield connector, making it a a 8 pin connector. Normal shields will still mate up. I think that is how the mega board does it also.

Lefty
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 02, 2011, 03:24 am
Correct, A6 & A7 added to the analog header.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 02, 2011, 04:34 am
Okay, I think this is the final pass:
(http://www.crossroadsfencing.com/Slide1.JPG)
(http://www.crossroadsfencing.com/Slide2.JPG)
(http://www.crossroadsfencing.com/Slide3.JPG)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: oscarBravo on Jun 02, 2011, 08:42 am

Correct, A6 & A7 added to the analog header.


Ah! Told you I might be missing something. Turns out it was the ability to count. Carry on!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 03, 2011, 02:10 am
It can look a little deceiving :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jun 05, 2011, 11:28 pm
.. do the smd parts (e.g. c2 r2) below the IC socket fit without touching the plastic socket's diagonal frame? P.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on Jun 05, 2011, 11:31 pm
The SMD parts do look a bit too close on that.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 05, 2011, 11:46 pm
There will be no diagonal frame, just socket strips.  I'll see if the parts can be moved in a little.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jun 06, 2011, 12:05 am
.. so you are not going to use the standard dil40 machine (precision) socket?
http://www.chip-service.de/product_info.php?language=en&info=p185_DIL40%20Sockel.html
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 06, 2011, 12:47 am
No, being in the US, I was thinking more like this, comparable design, less expensive.
http://www.dipmicro.com/store/index.php?act=viewProd&productCode=HDR40X1FM

Course if one had a bare board one could populate as desired. Take a frame and cut the middle span for example.

I like the look of these, just gets kind of pricey to use 40 - becomes a $6 socket!
http://www.dipmicro.com/store/0552-2-15-01-11-27-10-0
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 06, 2011, 01:00 am
Pito,
I think you recommende a cap on the 32K crystal  - any value recommened there?

http://datasheets.maxim-ic.com/en/ds/DS1307.pdf
(http://www.crossroadsfencing.com/RTC_Design.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 06, 2011, 02:05 am
Crap. Just discovered that the 20mm battery holder (CR2032) I used from the Sparkfun library is not actually carried by Sparkfun.

Anyone seen either of these in the Eagle Library?
http://www.dipmicro.com/store/BH120591-1
http://www.dipmicro.com/store/BH2025

Thanks
Robert
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on Jun 06, 2011, 09:43 am
Those machined headers will probably do fine for the chip although I have never seen them used that way before
EDIT: Just tested on one, seems to work quite well actually.

Quote
Crap. Just discovered that the 20mm battery holder (CR2032) I used from the Sparkfun library is not actually carried by Sparkfun.

Anyone seen either of these in the Eagle Library?
http://www.dipmicro.com/store/BH120591-1
http://www.dipmicro.com/store/BH2025

Sounds like a job for EAGLE part making :D

I'll take a look through the libraries I have later and see if anything matches up but it would almost be faster to make a part.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 06, 2011, 06:23 pm
Well, faster for someone more experienced than me!  I kind of bumble along, having only done 1 so far. Learned a lot about eagle doing it, but by no means was it a speedy process.

I use the machine header strips all the time.  A large # of what I have built so far has used those as a socket for a Promini's, with pins installed in the promini. Dipmicro has the too.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 06, 2011, 08:50 pm
here's one I prepared earlier

if you want any mods just let me know

but it does seem to match the data sheet I found (TYCO 120591-1 (http://www.tycoelectronics.com/catalog/pn/en/120591-1?RQPN=120591-1))

LINK REMOVED AS THE LIBRARY WAS INCORRECT

see post #203 for library Mk II

added link to data sheet
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jun 06, 2011, 08:57 pm
MMCP42, what's the part number for that? I was just about to place an order from Digikey and I can grab one of those for Crossroads to play with.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on Jun 06, 2011, 08:58 pm
Well it's two pads either 20 or 26.92mm apart for the ones CrossRoads posted... I wouldn't bother with an actual part atm :D
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 06, 2011, 09:07 pm

MMCP42, what's the part number for that? I was just about to place an order from Digikey and I can grab one of those for Crossroads to play with.




it's the tyco 120591-1

120591-1 (http://www.tycoelectronics.com/catalog/pn/en/120591-1?RQPN=120591-1)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jun 06, 2011, 09:13 pm
Thanks! $2.19 each at Digikey in small quantity, in stock.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 06, 2011, 09:15 pm
:)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 06, 2011, 09:53 pm
Thanks guys! Will update my layout tonight. Think I just have 1 or 2 parts left to confirm as being purchasable & I will be ordering material & PCBs.
Figure out solder strategy & template, etc next.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 07, 2011, 02:08 am
Well, it was an ugly routing to fit those pins, but I got it in!

Looks to me that the 2 top pins are the +/- from the battery and the bottom pin is not connected; the symbol is not marked like that.

Which is that correct?  Hopefully the electrical connections as that's what I worked in 8)

(http://www.crossroadsfencing.com/tyco_battery_holder.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 07, 2011, 07:30 am
'fraid not
the 2 pins at one end are PLUS, the one pin at t'other end is MINUS

reference document (http://www.tycoelectronics.com/commerce/DocumentDelivery/DDEController?Action=showdoc&DocId=Customer+Drawing%7F120591%7FF2%7Fpdf%7FEnglish%7FENG_CD_120591_F2.pdf%7F120591-1)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on Jun 07, 2011, 07:36 am
Yeah, only a single pin for +, the diagrams are confusing where they show two pins as is splits into two to contact the battery.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 07, 2011, 07:39 am
Can you fix the footprint to match? I had to show both ends of the battery connected to the RTC's Vbat pin on the schematic to get eagle to let me connect them together, and kludge a via and overlapping wires over the other pin to get it grounded.
Thanks!
Robert
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 07, 2011, 08:01 am
yup give me 10 minutes!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 07, 2011, 08:10 am
ok here's MkII

I had to kludge it by putting two pins on top of one another in the schematic view!

I'll see if there's a neater way

(hee hee 9 minutes!!)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 07, 2011, 08:37 am
and better yet, removed the spurious holes (you get one free with each pad!)

so ugly, only a mother could love it...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 07, 2011, 04:32 pm
Thanks, will give it a try when I get home tonight!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jun 07, 2011, 11:23 pm
@crossroads: the value of the capacitor at the 32khz resonator depends heavily on the type of resonator you're going to use. Basically there are so called for CL = 6pF, 12.5pF, and many others. My no-name resonators require ~15pF. So the usual way is to left it empty, and, when the clock is too fast,  add few pF. Adding the capacity will slow down your clock.. (provided you travel at a reasonable speed..). P.

The tuning capacitor shall be connected to X1 pin ( the input of the oscillator ), not X2 !! Pls modify your layout..
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 08, 2011, 02:26 am
Okay, will go with nothing to start and tweak from there. Will move the cap when I update the battery in a little while.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 08, 2011, 05:10 am
mmcp24,
I deleted the  old library, deleted the  battery from my schematic,  saved  files, closed eagle down and resaved the library, Then reopened the files, selected use library, selected the part again - and  the terminals are still showing up the same way
(http://www.crossroadsfencing.com/coin_battery.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 08, 2011, 08:30 am
hmm that's odd

easiest way to update a component without deleting and adding is
open your schematic (xxx.sch)
click library::update and select the updated ButtonCell.lbr

can you try this then:
open your schematic (xxx.sch)
click library::open and select ButtonCell.lbr
when you click on package and select TYCO120591 do you see the new (pretty) shape?
(see picture below)

your technique of delete and add works of course, it's just more clicks than you need

another way is to right-click the old button in the schematic, click replace - then navigate through the library to the replacement object

I've re-posted the library to make sure you have the latest
let me know how it goes

cheers
Mike
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 08, 2011, 03:13 pm
Thanks Mike, will try again tonight. No fencing tonight, can try it as soon as I get home. 
Was definitely not pulling your new picture in. 
I even checked the timestamp when I downloaded, seemed to be the right thing.
Thought maybe it was keeping the old one, that's why I deleted everything and added in fresh.
Robert
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 08, 2011, 03:24 pm
cool
is Boston 5 hours behind UK (so it's 9:20 there now?)

what time you get home?
might try and stay up late to get this sorted!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 08, 2011, 04:11 pm
Sounds about right, just after 10AM now.
Usually closer to 5:30, depending on traffic. Sometimes 5:15 if things go really smooth and I can catch a couple of green lights at the right place.  18mile drive, but only a couple of it on the highway - and that usually the slow part!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 09, 2011, 12:20 am
Looking good!
Now to figure out what that rotation angle was again ...
(http://www.crossroadsfencing.com/1284_CCA_Battery.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 09, 2011, 12:21 am
woop woop!

what was the fix? (walk away for a couple of hours and it works now?!?)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 09, 2011, 03:52 am
It was  your new file :)

Either that or I never really got rid of the old file, despite my best efforts.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 10, 2011, 09:07 am
way back you mentioned a USB that allowed you to connect the ground pads
did you ever find one?

I used USB-MINIB-5PIN (USB-MINIB) from the Sparkfun library
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 10, 2011, 03:34 pm
I have one on the board.  Will have to look to see which one it is.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 10, 2011, 04:52 pm
I saw that you had one, but with ground pads floating
the one I mentioned in the Sparfun library allows you to connect them up
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 11, 2011, 03:20 am
I will check it out, thanks for the tip.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: bubulindo on Jun 18, 2011, 01:23 pm
What's the status on this board? Any news?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 18, 2011, 08:16 pm
Ahh, the pressure!
Things have been busy at work, its the end of the fencing season, so things have gone a little slow.
I have a quote for boards in hand. Have a parts list nearly complete to place an order for material.
I have an FCI socket and the battery holder now, graciously supplied by Skyjumper (whose board I have also been working on, he is making great progress in getting testing done and details worked for the enclosure - had to do a redesign to add a dual UART for more serial ports when he discovered software serial sucked up too much computing time - still, the 1284 and a dual uart are less than a quad uart equipped atmega).

So, should be back at it soon. Probably not tomorrow being Father's Day and all ...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jun 18, 2011, 08:22 pm
Its my fault, I have been monopolizing all Crossroads' spare time :-( But on the plus side, we're sooooo close to done!

Happy father's day Bob!

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: bubulindo on Jun 19, 2011, 03:28 am
No worries... I just don't wanna miss my chance of putting my hands on one of them. :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on Jun 19, 2011, 03:41 am
I've been quietly assuming there would be some sort of announcement, asking for interest and/or orders before CrossRoads places his order for boards...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on Jun 19, 2011, 03:49 am

I've been quietly assuming there would be some sort of announcement, asking for interest and/or orders before CrossRoads places his order for boards...


And I assume some time will have to be made to identify/develop the arduino support software files and instructions to make it all work together. I wonder how many of the contributed commonly used libraries will work without requireing modification?

Lefty

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 19, 2011, 06:06 am
After much careful lining up, and punch holes in paper, and getting parts to sit flat, and finding camera batteries, I managed to bump everything and take this blurry picture of the FCI SD socket and battery holder on the card (battery holder goes on the backside) next to a duemilanove for comparison.

I want to add some holes next to the Dxx shields to accomodate an RF Rx or Tx module or maybe a transceiver as an optional part that can be accomoted.
I have a set on my desk somewhere, just need to make sure they are lined up so the component sides are facing out & not interfere with the header connectors.

(http://www.crossroadsfencing.com/rev12_mockup.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 19, 2011, 12:49 pm
looking good
always wise to check that real components match the layout you think works!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jun 19, 2011, 08:44 pm
That looks really nice. What did you print the gerber out on? Or is it not a gerber? It looks like an actual PCB...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on Jun 19, 2011, 08:48 pm
That mounting hole is much too close to the SD socket and the one below that looks rather too close to the headers too.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 20, 2011, 04:34 am
The printout is 1:1 from my eagle color laserjet, CP1215 model. Can be found on sale fairly frequently for $150. Gave up on inkjets and cartridges drying up/becoming unusable with my infrequent printing.

Mounting holes - thought I had enough space - putting actual #4-40 screwhead and nuts on top of the holes does show it to be pretty tight!
Will have to spread things out a little now. Thanks Mowcius.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jun 20, 2011, 04:48 am
Cool, what generated the image? Gerbers tend to be black and white. Did Eagle make the image?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 20, 2011, 04:52 am
Yes, it is just the eagle output of the top layer.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 20, 2011, 07:26 am
Alright, did a bunch of rerouting and made the board a scooch bigger, 3.95" x 2.4" (100.33 x 60.96mm)
This gives the mounting  holes more room, will do another print tomorrow & confirm screw head/nut clearance.
(http://www.crossroadsfencing.com/Rev12_holes.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 22, 2011, 01:07 am
Hi Gang,
Can I get a last review of the layout before I proceed to place an order for 11 CCAs with International Circuits and material with Digikey, etc.
I have been going over this with Skymaster learning from things he's found, and also incorporated I believe all the prior comments I've had here.
Files are located here:
http://www.crossroadsfencing.com/atmega1284_Rev13_Radio.sch
http://www.crossroadsfencing.com/atmega1284_Rev13_Radio.brd
http://www.crossroadsfencing.com/Rev13_parts_list.xls

(right-click, Save Target As, rename with correct extensions)

I've just started the PL, I have digikey PNs in another file, need to merge the two.

Features: Compatible with regular shields
SPI to SD socket with non-shield SS line, 74AC125 level translater
Jumper to connect I2C or A4/D18 - A5/D19 to the shield (or, can connect both with proper software)
I2C lines have 10K pullup
RTC with battery backup (battery holder goes on bottom of the card), 32.768KHz crystal
RTC Square wave out goes to jumper field to drive INT2 or PD7 (both non-shield lines)
Mounting holes are on 0.1" spacing
Mini-USB-B connector
5.5/2.1mm power jack
ATMega 326/644/1284 will plug in,16 MHz crystal
Surface mount or thru-hole 5V regulator (to allow easier heatsinking if it should run hot or to move offboard)
Dual serial - RX/TX connects to D0/D1 and USB. RX1/TX1 connects to D2/D3,  with jumper field to allow connection to RS232 driver and pins to connect to offboard DB9 connector.
Jumper to allow disconnecting of Reset capacitor
Jumper to allow 5V from USB or from Regulators.
3.3V on shield from FTDI USB ship.
3.3V regulator to power SD.
Will accept MicroSD socket or Full size FCI SD Socket
8 pin header for PC0-7, 4 of which are also JTAG signals, and 2 of which are I2C
ICSP pins
JTAG pins
Holes for mounting 315/434 MHz RF RX or TX module (one or the other), data from D9 pin. I guess I could find a way to connect that to a non-shield pin like PC6 or PC7, the only pins totally undedicated. Laipac RLP434 & TLP434 for example, same type as sparkfun used to carry from Holy Stone.

Any questions, comments, I think I am about ready to place an order & go do some surface mount soldering with Skyjumper!
Ooh, need to get a stencil created too ...

Thanks!
Robert/Crossroads
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jun 22, 2011, 04:23 am
Oh, I'll send you some info on the stencil. The Oharp (spelling?) stencil was fine, just be sure to warn him that the round pads are not holes and they need to stay. The only IC that might be an issue is the USB FTDI chip. It will help to touch up the gerber file to make the opening for those pads narrower. Other than that, I think its a very easy board to stencil and place.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jun 23, 2011, 02:16 pm
@Crossroads: If I were you I would place the large sd socket on the top and the micro sd socket on the bottom layer of the pcb. Maybe 20mins of a hard work ->> and you may use both (mind additional /cs) in parallel..
]:) Pito

PS: Why you do isolate the "cooling polygons" beneath the both voltage reglers from the surrounding GND? You are loosing maybe 70% of cooling efficiency there then..
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jun 23, 2011, 10:08 pm
If he puts SMT components on both the top and the bottom, that will make the board much more difficult to reflow in a toaster oven.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jun 23, 2011, 10:21 pm
.. the soldering the microsd on the bottom side is not a big deal, the added value of having there both sdcards is much bigger, though. BTW, he can leave the both sd card traces on the top as they are now, _and_ to add the new one for one microsd on the bottom. So everyone may do it manually afterwards, when required. Remember an additional card_select signal from somewhere then..P.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 24, 2011, 01:59 am
The 5V regulator needs to be isolated, the pad is 5V while the ground polygon is .. ground.
The other regulator takes 5V down to 3.3V and I  don't think actually gets hot.

Putting microSd on the bottom -  I was thinking reflow as skyjumper said, and only having one or the other in use.
I don't see any reason it couldn't go on the bottom, will have to see what the part looks like mechanically & ease of hand soldering.  Good suggestion pito.
I was thinking most folks would opt for the microSD from the # of earlier comments against the SD, but that was the socket I wanted to use so cards could go right into a PC with no need for an adapter (just more pieces to lose!).
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 24, 2011, 03:27 am
Okay. MicroSd is on the bottom -that was pretty easy.
Oooh, rats - forgot the SS line ...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 24, 2011, 03:32 am
Okay, its not gett a seperate SS line - that is gonna be one huge pain in the ass to route seperate SS thru the level translater.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 24, 2011, 05:14 am
I did it! Got the uSD on the bottom of the card, and seperate buffered SS line going to it.
Saved it as a seperate version, in case my review of the uSD socket shows it to be difficult hand solder to the bottom of the board.

(http://www.crossroadsfencing.com/6_23_layout.png)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jun 24, 2011, 10:47 am
.. great! Now you may backup one sd-card to another one, on fly! Or you may run a Bitlash script from the first one and store the data to the second one..

1. What would be necessary, though, is to have the detection of cards insertion working.. Do we have it?

2. There are issues reported with other similar boards as the sdcard operation is concerned - current surge - as the sdcards may take a quite a lot of current, thus they reset the mcu or introduce some instability.. The recommendation is to place a ceramic! 10u or 22u smd capacitor as close as possible to each sd-card's Vcc and GND pins, maybe an inductor into Vcard rail (4u7 or 10uH) would help as well..

PS: do not fab too many pcbs in the first batch - it would be a miracle to have the very first pcbs error free..
-Pito
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jun 24, 2011, 08:18 pm
The hardware design for the SD card Bob used is known good. It works on my board beautifully. The chip detect and write protect pins will have to be checked manually by your software. The SdFat library does not check those.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 25, 2011, 02:43 am
Hmm, card detect, hadn't considered that. Both cards have CD & WP in parallel still.
Looking closer, the uSD doesn't seem to have CD/WP pins.
So, yes, I do have Card Detect & Write Protect connected, but only on the SD card, not the uSD card.

Current surge is covered by the separate 3.3V regulator that is good for 400mA.
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=IFX25001ME%20V33INCT-ND
(http://www.crossroadsfencing.com/parallel_SD_Cards.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: westfw on Jun 25, 2011, 05:03 am
Suggest "change isolate" of the bottom-layer GND fill to 10mil or so.  It's currently "0", which means the polygon will obey only the design rules for clearance (5mil!), which is pretty tight to have over as many spots as the polygon approaches traces.

Smaller battery?  The next size down is 16mm diameter (cr1620 and compatible.)  A lot less capacity than a 2032, but plenty to backup a RTC.  Or use a two-pin wire connector and have the actual holder off-board.  Foam taped to the CD card holder or something...

One of the things I do to save space is change the "elongation" of oval pads in the "shapes" part of the design rules.  That will shorten the pads, and you can pick a value that gives you some of the advantages of the larger pads without being quite so huge.

Routing of +5V near "L" led and r6 is weird.

I find the 5V trace near the top connector pins uncomfortably close to the pins, and it doesn't need to be that close.

Move C9 and C14 slightly leftward.

Center the RESET signal between the pads of the JTAG connector.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: westfw on Jun 25, 2011, 05:44 am
Here's a gerbv snapshot highlighting the areas where I made some changes.  The changes near the pads are mostly from changing the elongation to 70% (from 100%)

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 25, 2011, 06:08 am
Umm, okay, I'll look into those.

1. change isolate - where do I find that?
2. battery - that is the size I want.
3. my library editing skills are crap. I am going with those as that is what the duemilanove uses and I know the shield pins will fit.
4. L/R6 - I flipped R6 around so the 5V feeds thru straighter now, no more back & forth.
5. 5V trace moved down some.
6. C9/C14 - moved a scooch
7. Reset centered. Also centered/spaced out a few other signals in that area.

Do you know about itead DRC files here? I can't seem to save, open, anything.
http://iteadstudio.com/store/index.php?main_page=product_info&cPath=19_20&products_id=175
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 25, 2011, 06:12 am
Elongation - found that, that is cool!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: westfw on Jun 25, 2011, 06:46 am
Quote
1. change isolate - where do I find that?

It's in the "change" menu, or you can use "info" on the polygon and change it in the pop-up window.

Quote
Do you know about itead DRC files here? I can't seem to save, open, anything.
http://iteadstudio.com/store/index.php?main_page=product_info&cPath=19_20&products_id=175

".rar" files are an alternate archive format, like .zip.  There are assorted things that will unpack it; I have Stuffit (paid) and "Stuffit Expander" (free) on my Mac and they seem to work fine.
Inside the DRC .rar file is an "ITead_rule.dru" file that can be read using the "Load" button of the DRC sub-window...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 25, 2011, 06:56 am
Could you do me a huge favor? Unzip those & send to me?
robert @ crossroadsfencing.com

I can't get windows vista to download them.

Got the spacing/isolation changed to match the top layer. Gotta go fix trace placements now to get ground plane coverage back in some big areas now.
(http://www.crossroadsfencing.com/interim_plane.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: westfw on Jun 25, 2011, 08:30 am
"A4-SDA" does not appear to connect to the CPU.  (the signal connected to the CPU says "A4-D18")

(found while considering: Do you need to keep the mapping up the Analog pins the way it is?  That part of the board would get a lot simpler if you swap the analog connector end-for-end.  It would mean a different pin-mapping file on the SW side, and I don't know how common it is to use those pins together as a port (it would be portC on an Uno instead of portA, anyway.))

Similar but more complicated issue with A5-D19 and A5-SCL ?

EDIT: OOPS.  Never mind.  I just realized that what I thought was a peripheral connector is actually a jumper block!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 25, 2011, 09:07 am
8)
I have always thought the analog port would have made a lot nicer routing also if the pins had gone the other way.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 25, 2011, 09:10 am
Take a look at the clean up:
http://www.crossroadsfencing.com/atmega1284_Rev15_itead.brd
http://www.crossroadsfencing.com/atmega1284_Rev15_itead.sch

And now I'm really off to bed!  Thanks for the help.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jun 25, 2011, 02:24 pm
..cr1220 would be more elegant, as I wrote few times.. :smiley-yell:

http://shop.ebay.com/i.html?_from=R40&_trksid=m570.l2736&_nkw=cr1220++holder
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 25, 2011, 06:12 pm
Okay westfw and pito, after a nights sleep, I am willing to add another mounting hole for a smaller coin cell battery holder, wired in parallel with the existing, if you can help me with a symbol for it.
You can see space is a little tight in that area. Options are to use the existing Bat+ hole and add a new Bat- hole, or use the existing Bat- hole and add a new Bat+ hole.

Ah! I see it is surface mount - that will be easier to add, there are not too many bottom traces in that area.

(http://www.crossroadsfencing.com/battery_placement.jpg)

Rats! I went thru a lot of effort to make sure no thru parts would interfere with the battery holder - then stuck a thru hole +5V regulator right in the middle of it!  Back to the drawing board - or, forming the TO-220 leads. Really wanted thru hole for mechanical strength tho to support addition of a heat sink.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 25, 2011, 08:45 pm
Is there a way to make eagle only show the +5V traces? I am concerned that with my multiple revisions to the regulator area that I have +5 routed in multiple paths to some of the same parts.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Jun 25, 2011, 10:02 pm
click on the eye symbol, then select a trace - shows u all of it!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jun 25, 2011, 10:43 pm
@skyjumper:
- re decoupling capacitor at sd-card sockets - this is not about the current the voltage regulator can source, but about a transient caused by a pulse of high current when selecting the sdcard and the _maybe_high_ impedance of the pcb trace coming from regulator to the sdcards..
- card detect - yes, we may detect it by software outside the sdfat (or the detection will be implemented in sdfat as well), however, we need the signal from both cards ..
P.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 25, 2011, 11:34 pm
@mmcp42: Cool, thanks. That helped, found a couple of hand edits where thin traces got put in, and the star distribution of power had definitely become a little funny.

@pito:
The regulator & its 100uF input cap and 100nf output cap are located next to the SD card on skyjumpers board, I think he is in good shape there.

Are you able to find a symbol for a CR1220 battery holder? The only one I came across was the adafruit metal holder which didn't appear to be insulated on the board side, I need that to insure traces do not get shorted out by the battery wearing thru the solder mask.

Robert
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jun 26, 2011, 09:45 am
Robert,
- for example: here are 2 eagle files, you can open them and copy the battery holder part..

http://garden.seeedstudio.com/index.php?title=Wiseduino

http://www.wiseduino.com/?cat=3

- the cr1220 battery holder on the board seems to be this type:

http://www.ebay.com.au/itm/10pcs-CR1220-1220-Computer-Battery-Socket-Holder-Case-/300553623491?pt=AU_B_I_Electrical_Test_Equipment&hash=item45fa6457c3

(http://)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 27, 2011, 01:37 am
So I've traded some e-mails with the company that made skyjumpers stencils for his board, which had some bridging issues after reflow on the FTDI chip.
The guy I'm talking to says 28 SSOP are the devil's work! 8)
He suggested he would adjust the stencil opening to be 2mil narrower in all directions - but suggested instead going to the 32 pin QFN package.
Does anyone have a line on  part that uses 32 QFN with thermal pad on the bottom that I could edit into an FT232RL?

I know I could do it from scratch, but my eagle skills are slow in that area, took me several nights to come up with this FCI socket, doing the math calculations, intrepreting the mechanical data sheet.
(I can't even locate the library I created!  Eagle has it tucked away somewhere - I can open it & see my part, I just can't see it on my harddrive anywhere!)
(http://www.crossroadsfencing.com/fci_socket_pads.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: westfw on Jun 27, 2011, 01:56 am
It looks like the "ftdichip" library that comes with EAGLE includes the QFN version...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jun 27, 2011, 02:53 am
I have been thinking about this and I think I would avoid QFN (quad flat no-lead). Without an x ray machine, there is no way to inspect the component after reflow, so there could be bridges you would never see. If there are bridges, the only way to fix them is to remove the entire chip. Since it has four sides, removing it, even with a hot air rework station, is going to be a challenge. And then, how do you get it back on without disturbing the neighboring components? You can not hand solder it, because there are, well, no leads. And, assembly houses charge more if your board has no lead components and/or fine pitch components (but FTDI chip is not fine pitch).

I have been told by many people that swelling the apertures works well to solve the bridge problem. The FTDI chip does have tight leads, but they are not technically small enough to be referred to as "fine pitch." Without swelling the apertures, I got bridges, but I was able to wick them up and all was fine. I doubt I could do that with QFN.

Just my 2 cents. On the other side, heck, I'm willing to give it a try! Maybe I'll be pleasantly surprised!


Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 27, 2011, 05:25 am
Dang! Look the bodies of the 2 chips.
I'm liking the 28SSOP more after seeing them together.
I think I'm with you, swelled aperture.

I just spent a couple of hours creating a footprint too, as I didn't have an option for QFN - but I see why, somehow I grabbed the FT232 from the "smartprj" instead of the "ftdichip" - probably because I started out by stripping down a duemilanove and building back up.
The two libraries use diferent looking symbols too for the 28ssop part/
(http://www.crossroadsfencing.com/ft232_comparison.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jun 27, 2011, 09:49 am
That's amazing. And that stencil guy thought this would be an improvement? Well, to be fair, maybe there are QFN packages with bigger pins and spaceing.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 29, 2011, 02:15 am
First lot of 10 PCBs ordered, sans the small battery.
Stencil & parts ordering next ...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on Jun 29, 2011, 03:15 am
Yay!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jun 29, 2011, 06:36 am
Cool!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jun 30, 2011, 06:59 pm
All parts ordered except the stencil. Waiting to get confirmation from itead's factory that it is producible, then will order the stencil. Hopefully assemble the first board(s) the weekendof July 9 with Skyjumper's help.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 16, 2011, 03:15 am
New Boards are in! "Bobuino" for lack of a name - never did come up with a name to put on the silkscreen!
Already have plans for this weekend, should be assembling next weekend.

Submitted order of 10 to itead June 28, received 12 today July 15

(http://www.crossroadsfencing.com/boards_2sides.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: cyclegadget on Jul 16, 2011, 05:18 pm

  Wow very nicely done! With the risk of sounding needy could you keep track or photo the order in which you apply the parts to that board? I have read most of the thread as you have designed this and it is amazing how many parts you have managed to put on the board! My guess is that you would have to apply parts in a particular order otherwise you will have great difficulty.

  I probably don't need the latest greatest board but, I would still like to have because, it sounds so cool!


Mark
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 16, 2011, 06:04 pm
"order in which you apply the parts to that board"
Well,  being surface mount, I imagine all the surface mount parts will be applied first, then flowed in the oven, and the  thru hole parts will be hand soldered in.
I would imagine start on one corner of the board and work across, or perhaps do all the caps, then all the resisters, then the LEDs, then remaining big parts.
The only part I think will be difficult will be getting a microSD on the back of the card after the top is reflowed. The pins on the backend are tiny, but clearly exposed, so maybe not that bad.
itead studios seems to have built a nice PCB for me, so it looks like I have a good base to apply the parts too. Now I just need better eyes for plopping those parts down  :D
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: cyclegadget on Jul 16, 2011, 06:11 pm

   Thanks for the reply.
 
  "Now I just need better eyes for plopping those parts down  smiley-grin"

I have yet to try soldering SMT parts and I dread the though of soldering them down. I do need to learn it at some point though.  I have a cheap magnification visor I found at a hobby shop and I have access to a magnifier with a light at work. Looking at my new Mega I can already see that a magnifier is a MUST for me.

Mark
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on Jul 16, 2011, 06:19 pm
In the pre-SMD days you would normally load parts in order of their height, lowest through to highest. This way you could flip the board over to solder without them falling out.

That probably still applies to the PTH parts, with SMDs going on first.

______
Rob
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 17, 2011, 06:48 pm
We can try a few things. Yes we can try to hand solder the micro-SD socket. We might be able to reflow the mocro-SD socket first, then flip it over and reflow the rest, with suface tension holding the bottom part on. I don't think that will be feasible, though. Because reflowing the top measn using the stencil and squeegie to apply the paste and I doubt we can do that with the micro_SD part applied.

Maybe the trick will be to reflow the top, then use the hot air rework station to apply the bottom parts. As I think about it that might be best, although we'll need to be careful to apply just enough heat in just the area we need, so the parts on the other side stay put.

As for the order of parts, most recomendations I have read are to put the big ones on first followed by smaller ones. I have found with only a few exceptions, it does not make much difference. My board has a few spots where that is better though. I make a checklist, have an enalrged gerber next to me, use a few magnifiers and its off to the races! The checklist is key though.




Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: cyclegadget on Jul 17, 2011, 08:47 pm

  I appreciate the tips and ideas on applying parts. I have been able to solder since my teens so, over 20 years but, I know that I still have many things to learn. Recently, I have been soldering a lot and I have been finding little things that I wish I would have known in the past.  :smiley-eek: Some of my past work looks very sloppy compared to now.


Mark
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 18, 2011, 04:54 am
Thanks Skyjumper. Next weekend going to work for you?
Can you send me your checklist? I'll make one up for my board, and some expanded pictures also.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Subterranean on Jul 21, 2011, 06:21 pm
Just stumbled onto this and it looks very interesting. I was looking to start using the 1284p so if i could get it in an arduino compatible board that would be great. I will keep an eye on this thread and hope all the assembly goes well.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 21, 2011, 11:42 pm
Thanks Subterranean, I am looking forward to attempt ass'y on Saturday.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 22, 2011, 11:53 am
..nice boards.. I would assembly the very first pcb manually, and in a step by step manner. In case of errors it could be difficult to debug when fully assembled. E.g. start with power, ftdi, 1284p and so on.. and measure the voltages, currents.. just a hint.. Pito
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: 48X24X48X on Jul 22, 2011, 12:07 pm

..nice boards.. I would assembly the very first pcb manually, and in a step by step manner. In case of errors it could be difficult to debug when fully assembled. E.g. start with power, ftdi, 1284p and so on.. and measure the voltages, currents.. just a hint.. Pito


I usually do this with any new board. It avoids any unnecessary hair pulling when something is not working!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 23, 2011, 12:08 am
Not sure quite how to do that with surface mount. Need to stencil on the solder paste for the Rs, Cs, LEDs, USB connector, SD connector, and surface mount ICs, especially the FTDI chip. 
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 23, 2011, 01:17 am
:) ..you need a flux only.. there is nothing on the board one can not solder manually.. just put a lot of flux (i.e. amtech 223), place the ftdi or other chips/r/c and solder the pins.. it is easy.. I am soldering 0.5mm 64pin chips - no issues by today.. P.
8)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 23, 2011, 01:58 am
You must have much younger eyes than I do :D
I stopped to get some +3.0 reading glasses on the way home so I can see the little parts more clearly tomorrow.

Still trying to get my bootloading capability back, I seem to have lost the touch, see this thread, writing things as I go.
http://arduino.cc/forum/index.php/topic,67129.msg494716.html#msg494716
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 23, 2011, 07:56 pm
I am using 3+ as well  :smiley-eek: purchased in a supermarket for this exact purpose..
Important is not to solder your nose in as well.. :smiley-yell:
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 24, 2011, 01:51 am
First pair of "Bobuino"s are assembled &  minimally programmed! Spent a couple hours with my good friend Skyjumper, my son, and wife, got a little assembly line kind of thing going, me putting down solder paste & handing out parts, son placing parts on  1st and wife on 2nd , Skyjumper guiding us along in our first ever surface mount assembly project and driving the oven, group effort to find & fix the solder shorts on the FTDI chips.
Skyjumper got them bootloaded for me via ISP (I somehow managed to not bring a mini-USB cable out of all the toys we took down, only had regular USB and the large square kind between us).
Time to figure out how to do that with my tools, and write some sketches to show everything works now ...

Skyjumper, thank you again for all the help, and your wife for lunch!, and letting us use your tools.

(http://www.crossroadsfencing.com/Bobuino_pair.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on Jul 24, 2011, 02:24 am
Nice progress. Good luck on the alfa software/firmware tests. Suspect there will be a need for a nice single zip file that includes all the nessesary file changes and additions and a read.me file for installation instructions.

Lefty

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 24, 2011, 02:26 am
Thanks Lefty.  That's what I'm thinking also.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: cyclegadget on Jul 24, 2011, 03:24 am

  Beautiful job on the boards! Way to go!

Mark
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 24, 2011, 04:26 am
Thanks :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on Jul 24, 2011, 12:46 pm
Very impressive looking boards you got there!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 24, 2011, 05:13 pm
Thanks Mowcius. Finally got enough software pieces in place late last night that I can now select the board, compile, and make Blink - tho not on the pin I expected.
I think I am using the Sanguino-based pinout,
http://www.crossroadsfencing.com/pins_duino644.cxx I recreated it as pins_duino.1284.cxx (just added some comments, no actual changes).
I'm not sure how to follow the assemblage path to see that it gets used.
I have the L LED on the SCK line, yet I need to toggle D15 instead of D13 to make it turn on/off.
So I'm thinking I don't understand the software setup fully yet.
Going to play some more today, see what the other pin assignments ended up as.

Here's what I want it to be, not sure how to make it so.
(http://www.crossroadsfencing.com/bobuino_processor_pinout.jpg)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 24, 2011, 06:25 pm
Ok, here's what I've figured out by working 0-31 thru Blink:
PB0-PB7 are working as D8-D15  >> wanted D4-D13
PD0-PD7 are working as D24-D31 >> wanted D0-D3, PD4, D8,D9, PD7
PC0-PC7 are working as D16-D23 >> hadn't assigned #s
PA0-PA7 are working as D0-D7 >> wanted D14-D19

What file do I change so that a shield expecting D0-D19 gets D0-D19?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 24, 2011, 07:06 pm
.. try pins_arduino.c ..
the pins are referenced by their position (the order) within

digital_pin_to_port_PGM[]
digital_pin_to_bit_mask_PGM[]
digital_pin_to_timer_PGM[]

P.

PS: in case you want to use sdfat lib you have to modify sd2PinMap.h (add the 1284p defs, SPI port defs, e.g. "BahBots" like)..
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 24, 2011, 07:21 pm
Ok, that's gonna take me a bit to comprehend. Seems to be a ton of stuff listed  under
Code: [Select]

#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)


and if not it is mapped to the 168
Code: [Select]

#else
// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing)
const uint16_t PROGMEM port_to_mode_PGM[] = {
NOT_A_PORT,
NOT_A_PORT,
&DDRB,
&DDRC,
&DDRD,
};


So this would need to add something like this?
Code: [Select]

#if defined(__AVR_ATmega1284__)
and add similar stuff as the 1280/2560

and change the existing #else to this?
Code: [Select]

#if defined (__AVR_ATmega168__) || defined(__AVR_ATmega328__)

or leave it as is, with the #else etc. being after the last of the 1284 code?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 24, 2011, 07:38 pm
.. forget 1280 and 2560 - those have nothing to do with 1284p in any respect, 1284p=644p=32 as the pins are concerned..

download arduino-extra.zip
http://www.avr-developers.com/corefiles/index.html

and when required modify pins_duino644.cxx   == 1284p

See my last post on sdfat chages when runnig with 1284p/
P.


Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 24, 2011, 07:48 pm
Crossroady, you're very welcome, and also welcome back any time. We can get a full fledged assembly line going and make the last 10 boards!

I sent you a spreadsheet that matches port designations to arduino "digital pins." You do not need to modify the avr-developer cores, they work out of the box, including the pins files. Because the DIP package has different pin out than the SMT package we used on my board, you can't use my spreadsheet to map the physical pin number directly to the digital pin. But you can use it to map port to digital pin number.

If you need me to, I'll add another column for DIP physical pin number. but I expect you are ontop of that.

The data iin that spreadsheet is all tested. I also used that to add 1284 support to the NewSoftSerial library.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 24, 2011, 08:01 pm
Code: [Select]
[code]Ok, how's this look for a start to go the pinouts defined above?
Gotta run out for a while, next section (& corrections to this one) later...

Missed the previous 2 while typing this - please see if this is making sense...


// New definition added for ATMega1284 for use on "Bobuino"
// Just 4 ports, A,B,C,D
#if defined(__AVR_ATmega1284__)
const uint16_t PROGMEM port_to_mode_PGM[] = {
   NOT_A_PORT,
   &DDRA,
   &DDRB,
   &DDRC,
   &DDRD,

};

const uint16_t PROGMEM port_to_output_PGM[] = {
   NOT_A_PORT,
   &PORTA,
   &PORTB,
   &PORTC,
   &PORTD,

};

const uint16_t PROGMEM port_to_input_PGM[] = {
   NOT_A_PIN,
   &PINA,
   &PINB,
   &PINC,
   &PIND,

};

const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
   // PORTLIST      
   // -------------------------------------------      
   PD   , // PD 0 ** 0 ** USART0_RX   
   PD   , // PD 1 ** 1 ** USART0_TX   
   PD   , // PD 2 ** 2 ** USART1_RX   
   PD   , // PD 3 ** 3 ** USART1_TX

   PB   , // PB 0 ** 4 ** D4   
   PB   , // PB 1 ** 5 ** D5   
   PB   , // PB 2 ** 6 ** D6   
   PB   , // PB 3 ** 7 ** D7, PWM

   PD   , // PD 5 ** 8 ** PWM
   PD   , // PD 6 ** 9 ** PWM
      
   PB   , // PB 4 ** 10 ** SPI_SS, PWM   
   PB   , // PB 5 ** 11 ** SPI_MOSI,
   PB   , // PB 6 ** 12 ** SPI_MISO   
   PB   , // PB 7 ** 13 ** SPI_SCK

   PA   , // PA 0 ** 14 ** A0   
   PA   , // PA 1 ** 15 ** A1   
   PA   , // PA 2 ** 16 ** A2   
   PA   , // PA 3 ** 17 ** A3   
   PA   , // PA 4 ** 18 ** A4   
   PA   , // PA 5 ** 19 ** A5   

// start of new pins
   PA   , // PA 6 ** 20 ** A6   
   PA   , // PA 7 ** 21 ** A7
   
   PC   , // PC 0 ** 22 ** I2C_SCL   
   PC   , // PC 1 ** 23 ** I2C_SDA   
   PC   , // PC 2 ** 24 ** D24   
   PC   , // PC 3 ** 25 ** D25   
   PC   , // PC 4 ** 26 ** D26   
   PC   , // PC 5 ** 27 ** D27   
   PC   , // PC 6 ** 28 ** D28  // USD_SS   
   PC   , // PC 7 ** 29 ** D29  //

   PD   , // PD 4 ** 30 ** D30  //SD_SS, PWM
   PD   , // PD 7 ** 31 ** D31  // RTC INT, PWM
      
};
[/code]
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 24, 2011, 10:00 pm
Bob, I'm not sure what you're doing in the code. I think the pins files should be more generic, like targeted to a specific processor. Its then up to the developer to use the pins accpording to what they do on the board.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Coding Badly on Jul 24, 2011, 10:30 pm

The argument can be made to assign pins to serve a specific purpose.

For example, pin numbers and port B bit numbers are one and the same in Alessandro Saporetti's ATtiny45 core.  This deviates from the way pin numbers are typically assigned (sequentially top-left to top-right).  At first, the pin assignment is confusing.  But, it allows the user to go from the Atmel datasheet to their sketch without having to translate from port + bit to Arduino pin.  In my experience, it has made using his core a breeze; I truly appreciate the deviant pin assignment.

I believe CrossRoads is trying to do something similar; create a pin assignment that simplifies using his board.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 24, 2011, 10:47 pm
The pins_xxx.cxx files map physical pins to ports besed on the chip design. In this case, the 1284P DIP is the same is the 644P DIP, so the pins_duino644.cxx is exactly what he needs. I am trying to recall if I needed to make any changes for my 1284P based board.  If I did, it was to add this:

Code: [Select]

#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)
//* pin defs for duino644 and sanquino board
#include "pins_duino644.cxx"


to the pins_arduino.c file that shipped with the cores from avr-developers. But I think it was already there.

So if Bob's board uses non-arduino-standard pins for things like the SPI pins and so on, then he would want to make changes to the arduino headers that map those, but not in the pins_xxx.cxx files. I'll look and see what I did, if anything, to make that happen. I really need to keep better notes :-(
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 25, 2011, 12:37 am
(edit - fixed code tags)

I have arduino_extras set up already.
pins_duino644.cxx would seem to be the right file, yet PB0 is accessed as Digitalpin8 and not
D4.
D0 is accessed on PA0 and not PD0, where UART is.
So I think if I rearrange the Px0-7 as I started above, then my software mapping of pins to Dx names as used in my schematic should work, and a shield connected to D0, D1 etc, will see software commanded D0/D1 electrical action show up in the right place.

I can try adding 1284 to this line on arduino-extras/pin_arduino.c and see what happens
Code: [Select]

#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__)
//* pin defs for duino644 and sanquino board
#include "pins_duino644.cxx"


but pins_duin.cxx doesn't seem to reflect the usage I want.

Code: [Select]

const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
{
NOT_ON_TIMER, /* 0  - PB0 */
NOT_ON_TIMER, /* 1  - PB1 */
NOT_ON_TIMER, /* 2  - PB2 */
TIMER0A,       /* 3  - PB3 */
TIMER0B, /* 4  - PB4 */
NOT_ON_TIMER, /* 5  - PB5 */
NOT_ON_TIMER, /* 6  - PB6 */
NOT_ON_TIMER, /* 7  - PB7 */
NOT_ON_TIMER, /* 8  - PD0 */
NOT_ON_TIMER, /* 9  - PD1 */
NOT_ON_TIMER, /* 10 - PD2 */
NOT_ON_TIMER, /* 11 - PD3 */
TIMER1B,     /* 12 - PD4 */
TIMER1A,     /* 13 - PD5 */
TIMER2B,     /* 14 - PD6 */
TIMER2A,     /* 15 - PD7 */
NOT_ON_TIMER, /* 16 - PC0 */
NOT_ON_TIMER,   /* 17 - PC1 */
NOT_ON_TIMER,   /* 18 - PC2 */
NOT_ON_TIMER,   /* 19 - PC3 */
NOT_ON_TIMER,   /* 20 - PC4 */
NOT_ON_TIMER,   /* 21 - PC5 */
NOT_ON_TIMER,   /* 22 - PC6 */
NOT_ON_TIMER,   /* 23 - PC7 */
NOT_ON_TIMER,   /* 24 - PA0 */
NOT_ON_TIMER,   /* 25 - PA1 */
NOT_ON_TIMER,   /* 26 - PA2 */
NOT_ON_TIMER,   /* 27 - PA3 */
NOT_ON_TIMER,   /* 28 - PA4 */
NOT_ON_TIMER,   /* 29 - PA5 */
NOT_ON_TIMER,   /* 30 - PA6 */
NOT_ON_TIMER   /* 31 - PA7 */
};
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 25, 2011, 12:51 am
Okay, I'm probably mistaken then. Let me review your posts again and see if I have anything to suggest.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 25, 2011, 01:01 am
but pins_duin.cxx doesn't seem to reflect the usage I want.
[/quote]

Okay so you want to remap the Arduino "digital pins" to different ports. Now i see, sorry I was a bit brain dead earlier. I worked on this a bit some time ago, I'll dig in and see if I can get it going.

Do you have a mapping of what you want?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 25, 2011, 01:27 am
Ok,  I think I got it, this should agree with the schematic post of the 1284 I posted earlier:

added to pins_arduino.c:
Code: [Select]

#elif defined(__AVR_ATmega1284__)
//* pin defs for bobuino & 1284 board
#include "pins_duino1284.cxx"


created new pins_duino1284.cxx
Code: [Select]


/*
24 July - Modified for 1284 - RWP

 pins_arduino.c - pin definitions for the Arduino board
 Part of Arduino / Wiring Lite

 Copyright (c) 2005 David A. Mellis

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Lesser General Public License for more details.

 You should have received a copy of the GNU Lesser General
 Public License along with this library; if not, write to the
 Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 Boston, MA  02111-1307  USA

 $Id: pins_arduino.c 254 2007-04-20 23:17:38Z mellis $
*/

#ifndef _AVR_IO_H_
#include <avr/io.h>
#endif
//#include "wiring_private.h"
#ifndef Wiring_h
#include "wiring.h"
#endif
#ifndef Pins_Arduino_h
#include "pins_arduino.h"
#endif

// On the Sanguino/Bobuino board, digital pins are also used
// for the analog output (software PWM).  Analog input
// pins are a separate set.

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

#define PA 1
#define PB 2
#define PC 3
#define PD 4

// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing)
const uint16_t PROGMEM port_to_mode_PGM[] =
{
NOT_A_PORT,
   &DDRA,
&DDRB,
&DDRC,
&DDRD,
};

const uint16_t PROGMEM port_to_output_PGM[] =
{
NOT_A_PORT,
&PORTA,
&PORTB,
&PORTC,
&PORTD,
};

const uint16_t PROGMEM port_to_input_PGM[] =
{
NOT_A_PORT,
&PINA,
&PINB,
&PINC,
&PIND,
};

const uint8_t PROGMEM digital_pin_to_port_PGM[] =
{
PD, /* 0  PD0 */
PD, /* 1  PD1 */
PD, /* 2  PD2  */
PD, /* 3  PD3  */
PB, /* 4  PB0  */
PB, /* 5  PB1  */
PB, /* 6  PB2  */
PB, /* 7  PB3  */

PD, /* 8  PD5  */
PD, /* 9  PD6  */
PB, /* 10 PB4  */
PB, /* 11 PB5  */
PB, /* 12 PB6  */
PB, /* 13 PB7  */
PA, /* 14 PA0  */
PA, /* 15 PA1  */

PA, /* 16 PA2  */
PA, /* 17 PA3  */
PA, /* 18 PA4  */
PA, /* 19 PA5  */
PA, /* 20 PA6  */
PA, /* 21 PA7  */
  PC, /* 22 PC0  */
PC, /* 23 PC1  */

PC, /* 24 PC2  */
PC, /* 25 PC3  */
PC, /* 26 PC4  */
PC, /* 27 PC5  */
PC, /* 28 PC6  */
PC, /* 29 PC7  */
PD, /* 30 PD4  */
PD  /* 31 PD7  */
};

const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] =
{
_BV(0), /*D0: 0, port D */
_BV(1), /*D1: 1, port D */
_BV(2), /*D2: 2, port D */
_BV(3), /*D3: 3, port D */
_BV(0), /*D4: 0, port B */
_BV(1), /*D5: 1, port B */
_BV(2), /*D6: 2, port B */
_BV(3), /*D7: 3, port B */

_BV(5), /*D8: 5, port D */
_BV(6), /*D9: 6, port D */
_BV(4), /*D10: 4, port B */
_BV(5), /*D11: 5, port B */
_BV(6), /*D12: 6, port B */
_BV(7), /*D13: 7, port B */
_BV(0), /*D14: 0, port A */
_BV(1), /*D15: 1, port A */

_BV(2), /*D16, 2, port A */
_BV(3), /*D17: 3, port A */
_BV(4), /*D18: 4, port A */
_BV(5), /*D19: 5, port A */
_BV(6), /*D20: 6, port A */
_BV(7), /*D21: 7, port A */
_BV(0), /*D22: 0, port C */
_BV(1), /*D23: 1, port C */

_BV(2), /*D24, 2, port C */
_BV(3), /*D25: 3, port C */
_BV(4), /*D26: 4, port C */
_BV(5), /*D27: 5, port C */
_BV(6), /*D28: 6, port C */
_BV(7), /*D29: 7, port C */
_BV(4), /*D30: 4, port D */
_BV(7)  /*D31: 7, port D */
};

const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
{
NOT_ON_TIMER, /* 0  - PD0 */
NOT_ON_TIMER, /* 1  - PD1 */
NOT_ON_TIMER, /* 2  - PD2 */
NOT_ON_TIMER,     /* 3  - PD3 */  
NOT_ON_TIMER, /* 4  - PB0 */
NOT_ON_TIMER, /* 5  - PB1 */
NOT_ON_TIMER, /* 6  - PB2 */
TIMER0A, /* 7  - PB3 */ // PWM

TIMER1A, /* 8  - PD5 */ // PWM
TIMER2B, /* 9  - PD6 */ // PWM
TIMER0B /* 10 - PB4 */ // PWM
NOT_ON_TIMER, /* 11 - PB5 */
NOT_ON_TIMER,      /* 12 - PB6 */
NOT_ON_TIMER,     /* 13 - PB7 */
NOT_ON_TIMER,     /* 14 - PA0 */
NOT_ON_TIMER,     /* 15 - PA1 */

NOT_ON_TIMER, /* 16 - PA2 */
NOT_ON_TIMER, /* 17 - PA3 */
NOT_ON_TIMER, /* 18 - PA4 */
NOT_ON_TIMER, /* 19 - PA5 */
NOT_ON_TIMER, /* 20 - PA6 */
NOT_ON_TIMER, /* 21 - PA7 */
NOT_ON_TIMER, /* 22 - PC0 */
NOT_ON_TIMER, /* 23 - PC1 */

NOT_ON_TIMER, /* 24 - PC2 */
NOT_ON_TIMER, /* 25 - PC3 */
NOT_ON_TIMER, /* 26 - PC4 */
NOT_ON_TIMER, /* 27 - PC5 */
NOT_ON_TIMER, /* 28 - PC6 */
NOT_ON_TIMER, /* 29 - PC7 */
TIMER1B, /* 30 - PD4 */ // PWM
TIMER2A /* 31 - PD7 */ // PWM
};

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 25, 2011, 02:58 am
This is just getting aggravating now. I've got this great file
http://www.crossroadsfencing.com/pins_duino1284.cxx
in this folder
c:\program file\arduino-0022\hardware\arduino-extras\cores\arduino
and nothing I seem to do gets it used, so my pin mappings never change.

pins_arduino.c has this

Code: [Select]

#elif defined(__AVR_ATmega1284__)
//* pin defs for bobuino & 1284 board
#include "pins_duino1284.cxx"


Where do I get that defined?
Seems like
pins_duino1284.cxx
is getting compiled as I had to fix a couple of errors the first time I used it after creating it (extra commas at the end of lists of ports I think).
Any ideas?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 25, 2011, 03:06 am
I think the environment causes that to be defined based on the boards.txt file. Try commenting it out and see if that helps...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Coding Badly on Jul 25, 2011, 03:34 am
Quote
Where do I get that defined?


So long as the entries in boards.txt are correct, it's defined for you.

Quote
so my pin mappings never change


One potential problem is the way a sketch is linked.  The core is packaged into a (GCC not Arduino) library and then the sketch object file is linked to the library.  The linker uses a "weak reference" for symbols found in libraries.  This means that there could be more than one "port_to_mode_PGM" in the library without triggering an error.  The linker seems to use the first symbol found.

On the one hand, the "#elif" should ensure only one set of pin definitions makes it into the library.  On the other hand, the symptom is a perfect fit for the "multiple symbol" problem.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 25, 2011, 04:41 am
OK, I had added this to the arduinos-extras boards.txt
The -0022 boards.txt has no 1284 references at all.

Code: [Select]

extras.name=EXTRAS==============================

##############################################################

# extras added for arduino boards

##############################################################
atmega1284p.name=Arduino-Bobuino 1284p

atmega1284p.upload.protocol=stk500
atmega1284p.upload.maximum_size=129024
atmega1284p.upload.speed=38400

atmega1284p.bootloader.low_fuses=0xFF
atmega1284p.bootloader.high_fuses=0xDC
atmega1284p.bootloader.extended_fuses=0xFD
atmega1284p.bootloader.path=atmega
atmega1284p.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
atmega1284p.bootloader.unlock_bits=0x3F
atmega1284p.bootloader.lock_bits=0x0F

atmega1284p.build.mcu=atmega1284p
atmega1284p.build.f_cpu=18432000L
atmega1284p.build.core=arduino


avrdude.conf has this for the 1284 - I will add the P to the end of 1284 in pins_arduino.c and see what happens.

Code: [Select]

#------------------------------------------------------------
# ATmega1284P
#------------------------------------------------------------

# similar to ATmega164p

part
   id               = "m1284p";
   desc             = "ATMEGA1284P";
   has_jtag         = yes;
   stk500_devcode   = 0x82; # no STK500v1 support, use the ATmega16 one
   avr910_devcode   = 0x74;
   signature        = 0x1e 0x97 0x05;
   pagel            = 0xd7;
   bs2              = 0xa0;
   chip_erase_delay = 9000;
   pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
                      "x x x x  x x x x    x x x x  x x x x";

   chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
                      "x x x x  x x x x    x x x x  x x x x";

   timeout = 200;
   stabdelay = 100;
   cmdexedelay = 25;
   synchloops = 32;
   bytedelay = 0;
   pollindex = 3;
   pollvalue = 0x53;
   predelay = 1;
   postdelay = 1;
   pollmethod = 1;

   pp_controlstack     =
       0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F,
       0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F,
       0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B,
       0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02;
   hventerstabdelay    = 100;
   progmodedelay       = 0;
   latchcycles         = 6;
   togglevtg           = 1;
   poweroffdelay       = 15;
   resetdelayms        = 1;
   resetdelayus        = 0;
   hvleavestabdelay    = 15;
   chiperasepulsewidth = 0;
   chiperasepolltimeout = 10;
   programfusepulsewidth = 0;
   programfusepolltimeout = 5;
   programlockpulsewidth = 0;
   programlockpolltimeout = 5;

   idr                 = 0x31;
   spmcr               = 0x57;
   allowfullpagebitstream = no;

   memory "eeprom"
       paged           = no; /* leave this "no" */
       page_size       = 8;  /* for parallel programming */
       size            = 4096;
       min_write_delay = 9000;
       max_write_delay = 9000;
       readback_p1     = 0xff;
       readback_p2     = 0xff;
read            = "  1   0   1   0      0   0   0   0",
                         "  0   0   x   x    a11 a10  a9  a8",
                         " a7  a6  a5  a4     a3  a2  a1  a0",
                         "  o   o   o   o      o   o   o   o";

write           = "  1   1   0   0      0   0   0   0",
                         "  0   0   x   x    a11 a10  a9  a8",
                         " a7  a6  a5  a4     a3  a2  a1  a0",
                         "  i   i   i   i      i   i   i   i";

loadpage_lo = "  1   1   0   0      0   0   0   1",
 "  0   0   0   0      0   0   0   0",
 "  0   0   0   0      0  a2  a1  a0",
 "  i   i   i   i      i   i   i   i";

writepage = "  1   1   0   0      0   0   1   0",
 "  0   0   x   x    a11 a10  a9  a8",
 " a7  a6  a5  a4     a3   0   0   0",
 "  x   x   x   x      x   x   x   x";

mode = 0x41;
delay = 10;
blocksize = 128;
readsize = 256;
     ;

   memory "flash"
       paged           = yes;
       size            = 131072;
       page_size       = 256;
       num_pages       = 512;
       min_write_delay = 4500;
       max_write_delay = 4500;
       readback_p1     = 0xff;
       readback_p2     = 0xff;
       read_lo         = "  0   0   1   0      0   0   0   0",
                         "a15 a14 a13 a12    a11 a10  a9  a8",
                         " a7  a6  a5  a4     a3  a2  a1  a0",
                         "  o   o   o   o      o   o   o   o";

       read_hi         = "  0   0   1   0      1   0   0   0",
                         "a15 a14 a13 a12    a11 a10  a9  a8",
                         " a7  a6  a5  a4     a3  a2  a1  a0",
                         "  o   o   o   o      o   o   o   o";

       loadpage_lo     = "  0   1   0   0      0   0   0   0",
                         "  0   0   x   x      x   x   x   x",
                         "  x  a6  a5  a4     a3  a2  a1  a0",
                         "  i   i   i   i      i   i   i   i";

       loadpage_hi     = "  0   1   0   0      1   0   0   0",
                         "  0   0   x   x      x   x   x   x",
                         "  x  a6  a5  a4     a3  a2  a1  a0",
                         "  i   i   i   i      i   i   i   i";

       writepage       = "  0   1   0   0      1   1   0   0",
                         "a15 a14 a13 a12    a11 a10  a9  a8",
                         " a7   x   x   x      x   x   x   x",
                         "  x   x   x   x      x   x   x   x";

mode = 0x41;
delay = 10;
blocksize = 256;
readsize = 256;
     ;

   memory "lock"
       size            = 1;
       read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
                         "x x x x  x x x x   x x o o  o o o o";

       write           = "1 0 1 0  1 1 0 0   1 1 1 x  x x x x",
                         "x x x x  x x x x   1 1 i i  i i i i";
       min_write_delay = 9000;
       max_write_delay = 9000;
     ;

   memory "lfuse"
       size            = 1;
       read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
                         "x x x x  x x x x   o o o o  o o o o";

       write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
                         "x x x x  x x x x   i i i i  i i i i";
       min_write_delay = 9000;
       max_write_delay = 9000;
     ;

   memory "hfuse"
       size            = 1;
       read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
                         "x x x x  x x x x   o o o o  o o o o";

       write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
                         "x x x x  x x x x   i i i i  i i i i";
       min_write_delay = 9000;
       max_write_delay = 9000;
     ;

   memory "efuse"
       size            = 1;

       read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
                         "x x x x  x x x x  o o o o  o o o o";

       write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
                         "x x x x  x x x x  1 1 1 1  1 i i i";
       min_write_delay = 9000;
       max_write_delay = 9000;
     ;

   memory "signature"
       size            = 3;
       read            = "0  0  1  1   0  0  0  0   x  x  x  x   x  x  x  x",
                         "x  x  x  x   x  x a1 a0   o  o  o  o   o  o  o  o";
     ;

   memory "calibration"
       size            = 1;

       read            = "0 0 1 1  1 0 0 0   0 0 0 x  x x x x",
                         "0 0 0 0  0 0 0 0   o o o o  o o o o";
       ;
 ;
 
[/code
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 25, 2011, 04:46 am
No help - pin3 still blinks on A3.
Code: [Select]

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
*/
byte pinx = 3; // do not use 0, 1
void setup() {               
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(pinx, OUTPUT);     
}

void loop() {
  digitalWrite(pinx, HIGH);   // set the LED on
  delay(200);              // wait for a second
  digitalWrite(pinx, LOW);    // set the LED off
  delay(200);              // wait for a second

}
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Coding Badly on Jul 25, 2011, 06:23 am

In "pins_duino1284.cxx", very near the "digital_pin_to_port_PGM" declaration, add a "#error" line, save, and try to compile your test sketch.  Did the compiler stop at the "#error" line?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on Jul 25, 2011, 06:27 am
I just knew that the arduino IDE mods would be a big pot hole in progress of the Bobuino.  ;)

Where is that auto installing Bobuino zip file when you need it.  :D

Lefty
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 25, 2011, 06:36 am
Coding:  Yes.

added here
Code: [Select]

const uint8_t PROGMEM digital_pin_to_port_PGM[] =
{
#error
PD, /* 0  PD0 */
PD, /* 1  PD1 */
PD, /* 2  PD2  */
PD, /* 3  PD3  */
PB, /* 4  PB0  */
PB, /* 5  PB1  */
PB, /* 6  PB2  */
PB, /* 7  PB3  */

Got this when compiled:
Quote

In file included from C:\Program Files\Arduino-0022\hardware\arduino-extras\cores\arduino\pins_arduino.c:114:
C:\Program Files\Arduino-0022\hardware\arduino-extras\cores\arduino\/pins_duino1284.cxx:105:2: error: #error
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 25, 2011, 06:44 am
Lefty, am collecting lots of bits & pieces for it, thats for sure!
Auto installing, I don't know, maybe just a ReadMeFirst.txt file 8)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on Jul 25, 2011, 06:57 am

Lefty, am collecting lots of bits & pieces for it, thats for sure!
Auto installing, I don't know, maybe just a ReadMeFirst.txt file 8)


So did the Bobuino have a change in crystal freq?



Quote
# extras added for arduino boards

##############################################################
atmega1284p.name=Arduino-Bobuino 1284p

atmega1284p.upload.protocol=stk500
atmega1284p.upload.maximum_size=129024
atmega1284p.upload.speed=38400

atmega1284p.bootloader.low_fuses=0xFF
atmega1284p.bootloader.high_fuses=0xDC
atmega1284p.bootloader.extended_fuses=0xFD
atmega1284p.bootloader.path=atmega
atmega1284p.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
atmega1284p.bootloader.unlock_bits=0x3F
atmega1284p.bootloader.lock_bits=0x0F

atmega1284p.build.mcu=atmega1284p
atmega1284p.build.f_cpu=18432000L
atmega1284p.build.core=arduino
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 26, 2011, 01:38 am
Got boards.txt corrected to call out the correct frequency. Didn't help with pin mapping.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 26, 2011, 02:03 am
Putting an error in pins_duino1284.cxx did indeed cause an error, so the file would seem to be seen.

You know, Think I just noticed something that might  help.
In pins_duino1284.cxx, there are 6 arrays.
I didn't change the first 3, just the second 3.
I just noticed that the pin assignments seem to follow the first 3 arrays, and not the last 3.

Am gonna play with those next:
Code: [Select]

#define PA 1
#define PB 2
#define PC 3
#define PD 4

// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing)
const uint16_t PROGMEM port_to_mode_PGM[] =
{
NOT_A_PORT,

now to mess with the order of these, since the Digital  Pin assignment are going:
PortA: 0-7
PortB: 8-15
PortC: 16-23
PortD: 24-31
Code: [Select]

                     &DDRA,
&DDRB,
&DDRC,
&DDRD
};

const uint16_t PROGMEM port_to_output_PGM[] =
{
NOT_A_PORT,
&PORTA,
&PORTB,
&PORTC,
&PORTD
};

const uint16_t PROGMEM port_to_input_PGM[] =
{
NOT_A_PORT,
&PINA,
&PINB,
&PINC,
&PIND
};

const uint8_t PROGMEM digital_pin_to_port_PGM[] =
{
PD, /* 0  PD0 */
PD, /* 1  PD1 */
PD, /* 2  PD2  */
PD, /* 3  PD3  */
PB, /* 4  PB0  */
PB, /* 5  PB1  */
PB, /* 6  PB2  */
PB, /* 7  PB3  */

PD, /* 8  PD5  */
PD, /* 9  PD6  */
PB, /* 10 PB4  */
PB, /* 11 PB5  */
PB, /* 12 PB6  */
PB, /* 13 PB7  */
PA, /* 14 PA0  */
PA, /* 15 PA1  */

PA, /* 16 PA2  */
PA, /* 17 PA3  */
PA, /* 18 PA4  */
PA, /* 19 PA5  */
PA, /* 20 PA6  */
PA, /* 21 PA7  */
    PC, /* 22 PC0  */
PC, /* 23 PC1  */

PC, /* 24 PC2  */
PC, /* 25 PC3  */
PC, /* 26 PC4  */
PC, /* 27 PC5  */
PC, /* 28 PC6  */
PC, /* 29 PC7  */
PD, /* 30 PD4  */
PD  /* 31 PD7  */
};

const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] =
{
_BV(0), /*D0: 0, port D */
_BV(1), /*D1: 1, port D */
_BV(2), /*D2: 2, port D */
_BV(3), /*D3: 3, port D */
_BV(0), /*D4: 0, port B */
_BV(1), /*D5: 1, port B */
_BV(2), /*D6: 2, port B */
_BV(3), /*D7: 3, port B */

_BV(5), /*D8: 5, port D */
_BV(6), /*D9: 6, port D */
_BV(4), /*D10: 4, port B */
_BV(5), /*D11: 5, port B */
_BV(6), /*D12: 6, port B */
_BV(7), /*D13: 7, port B */
_BV(0), /*D14: 0, port A */
_BV(1), /*D15: 1, port A */

_BV(2), /*D16, 2, port A */
_BV(3), /*D17: 3, port A */
_BV(4), /*D18: 4, port A */
_BV(5), /*D19: 5, port A */
_BV(6), /*D20: 6, port A */
_BV(7), /*D21: 7, port A */
_BV(0), /*D22: 0, port C */
_BV(1), /*D23: 1, port C */

_BV(2), /*D24, 2, port C */
_BV(3), /*D25: 3, port C */
_BV(4), /*D26: 4, port C */
_BV(5), /*D27: 5, port C */
_BV(6), /*D28: 6, port C */
_BV(7), /*D29: 7, port C */
_BV(4), /*D30: 4, port D */
_BV(7)  /*D31: 7, port D */
};

const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
{
NOT_ON_TIMER, /* 0  - PD0 */
NOT_ON_TIMER, /* 1  - PD1 */
NOT_ON_TIMER, /* 2  - PD2 */
NOT_ON_TIMER,    /* 3  - PD3 */ 
NOT_ON_TIMER, /* 4  - PB0 */
NOT_ON_TIMER, /* 5  - PB1 */
NOT_ON_TIMER, /* 6  - PB2 */
TIMER0A, /* 7  - PB3 */ // PWM

TIMER1A, /* 8  - PD5 */ // PWM
TIMER2B, /* 9  - PD6 */ // PWM
TIMER0B, /* 10 - PB4 */ // PWM
NOT_ON_TIMER, /* 11 - PB5 */
NOT_ON_TIMER,     /* 12 - PB6 */
NOT_ON_TIMER,     /* 13 - PB7 */
NOT_ON_TIMER,     /* 14 - PA0 */
NOT_ON_TIMER,     /* 15 - PA1 */

NOT_ON_TIMER, /* 16 - PA2 */
NOT_ON_TIMER, /* 17 - PA3 */
NOT_ON_TIMER, /* 18 - PA4 */
NOT_ON_TIMER, /* 19 - PA5 */
NOT_ON_TIMER, /* 20 - PA6 */
NOT_ON_TIMER, /* 21 - PA7 */
NOT_ON_TIMER, /* 22 - PC0 */
NOT_ON_TIMER, /* 23 - PC1 */

NOT_ON_TIMER, /* 24 - PC2 */
NOT_ON_TIMER, /* 25 - PC3 */
NOT_ON_TIMER, /* 26 - PC4 */
NOT_ON_TIMER, /* 27 - PC5 */
NOT_ON_TIMER, /* 28 - PC6 */
NOT_ON_TIMER, /* 29 - PC7 */
TIMER1B, /* 30 - PD4 */ // PWM
TIMER2A /* 31 - PD7 */ // PWM
};
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 26, 2011, 03:54 am
Success!!
To make it work, I stripped out the pins_arduino.c file in the arduino-0022 folders area and changed it to the listing below.

I renamed the pins_arduino.c in the arduino-extras folders area to a name that didn't start with pins.

If there is a way to make the #ifdef's work for other processors, I'd like some direction on making that work.
For now, I am only compiling correctly for "my" 1284 and have to revert to naming files to use '328 Duemilanoves.
8) 8) 8)!

On to more testing!

Code: [Select]

/*
heavily modified to only support an atmega1284 as used in the"Bobuino"

pins_arduino.c - pin definitions for the Arduino board
  Part of Arduino / Wiring Lite

  Copyright (c) 2005 David A. Mellis

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General
  Public License along with this library; if not, write to the
  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  Boston, MA  02111-1307  USA

  $Id$
*/

#ifndef _AVR_IO_H_
#include <avr/io.h>
#endif
//#include "wiring_private.h"
#ifndef Wiring_h
#include "wiring.h"
#endif
#ifndef Pins_Arduino_h
#include "pins_arduino.h"
#endif

// On the Bobuino board, digital pins are also used
// for the analog output (software PWM).  Analog input
// pins are a separate set.

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

#define PA 1
#define PB 2
#define PC 3
#define PD 4


// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing)
const uint16_t PROGMEM port_to_mode_PGM[] =
{
NOT_A_PORT,
    &DDRA,
&DDRB,
&DDRC,
&DDRD
};

const uint16_t PROGMEM port_to_output_PGM[] =
{
NOT_A_PORT,
&PORTA,
&PORTB,
&PORTC,
&PORTD
};

const uint16_t PROGMEM port_to_input_PGM[] =
{
NOT_A_PORT,
&PINA,
&PINB,
&PINC,
&PIND
};

const uint8_t PROGMEM digital_pin_to_port_PGM[] =
{
PD, /* 0  PD0 */
PD, /* 1  PD1 */
PD, /* 2  PD2  */
PD, /* 3  PD3  */
PB, /* 4  PB0  */
PB, /* 5  PB1  */
PB, /* 6  PB2  */
PB, /* 7  PB3  */

PD, /* 8  PD5  */
PD, /* 9  PD6  */
PB, /* 10 PB4  */
PB, /* 11 PB5  */
PB, /* 12 PB6  */
PB, /* 13 PB7  */
PA, /* 14 PA0  */
PA, /* 15 PA1  */

PA, /* 16 PA2  */
PA, /* 17 PA3  */
PA, /* 18 PA4  */
PA, /* 19 PA5  */
PA, /* 20 PA6  */
PA, /* 21 PA7  */
    PC, /* 22 PC0  */
PC, /* 23 PC1  */

PC, /* 24 PC2  */
PC, /* 25 PC3  */
PC, /* 26 PC4  */
PC, /* 27 PC5  */
PC, /* 28 PC6  */
PC, /* 29 PC7  */
PD, /* 30 PD4  */
PD  /* 31 PD7  */
};

const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] =
{
_BV(0), /*D0: 0, port D */
_BV(1), /*D1: 1, port D */
_BV(2), /*D2: 2, port D */
_BV(3), /*D3: 3, port D */
_BV(0), /*D4: 0, port B */
_BV(1), /*D5: 1, port B */
_BV(2), /*D6: 2, port B */
_BV(3), /*D7: 3, port B */

_BV(5), /*D8: 5, port D */
_BV(6), /*D9: 6, port D */
_BV(4), /*D10: 4, port B */
_BV(5), /*D11: 5, port B */
_BV(6), /*D12: 6, port B */
_BV(7), /*D13: 7, port B */
_BV(0), /*D14: 0, port A */
_BV(1), /*D15: 1, port A */

_BV(2), /*D16, 2, port A */
_BV(3), /*D17: 3, port A */
_BV(4), /*D18: 4, port A */
_BV(5), /*D19: 5, port A */
_BV(6), /*D20: 6, port A */
_BV(7), /*D21: 7, port A */
_BV(0), /*D22: 0, port C */
_BV(1), /*D23: 1, port C */

_BV(2), /*D24, 2, port C */
_BV(3), /*D25: 3, port C */
_BV(4), /*D26: 4, port C */
_BV(5), /*D27: 5, port C */
_BV(6), /*D28: 6, port C */
_BV(7), /*D29: 7, port C */
_BV(4), /*D30: 4, port D */
_BV(7)  /*D31: 7, port D */
};

const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
{
NOT_ON_TIMER, /* 0  - PD0 */
NOT_ON_TIMER, /* 1  - PD1 */
NOT_ON_TIMER, /* 2  - PD2 */
NOT_ON_TIMER,    /* 3  - PD3 */ 
NOT_ON_TIMER, /* 4  - PB0 */
NOT_ON_TIMER, /* 5  - PB1 */
NOT_ON_TIMER, /* 6  - PB2 */
TIMER0A, /* 7  - PB3 */ // PWM

TIMER1A, /* 8  - PD5 */ // PWM
TIMER2B, /* 9  - PD6 */ // PWM
TIMER0B, /* 10 - PB4 */ // PWM
NOT_ON_TIMER, /* 11 - PB5 */
NOT_ON_TIMER,     /* 12 - PB6 */
NOT_ON_TIMER,     /* 13 - PB7 */
NOT_ON_TIMER,     /* 14 - PA0 */
NOT_ON_TIMER,     /* 15 - PA1 */

NOT_ON_TIMER, /* 16 - PA2 */
NOT_ON_TIMER, /* 17 - PA3 */
NOT_ON_TIMER, /* 18 - PA4 */
NOT_ON_TIMER, /* 19 - PA5 */
NOT_ON_TIMER, /* 20 - PA6 */
NOT_ON_TIMER, /* 21 - PA7 */
NOT_ON_TIMER, /* 22 - PC0 */
NOT_ON_TIMER, /* 23 - PC1 */

NOT_ON_TIMER, /* 24 - PC2 */
NOT_ON_TIMER, /* 25 - PC3 */
NOT_ON_TIMER, /* 26 - PC4 */
NOT_ON_TIMER, /* 27 - PC5 */
NOT_ON_TIMER, /* 28 - PC6 */
NOT_ON_TIMER, /* 29 - PC7 */
TIMER1B, /* 30 - PD4 */ // PWM
TIMER2A /* 31 - PD7 */ // PWM
};
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 26, 2011, 04:04 am
Great job, congrats!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 26, 2011, 04:31 am
Thanks! Just made up DB9 to 3-pin female header cable, writing a sketch now to check out the serial port.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 26, 2011, 05:42 am
Serial port testing works!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: graynomad on Jul 26, 2011, 06:36 am
Don't you just love breathing life into a new board? When it works of course :)

It's looking real good Bob.

______
Rob
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 26, 2011, 06:58 am
Yeah, when it works! I am 100% confident in the hardware, getting the software to play nice is the tricky part.
Since I unique-a-fied my pins_arduino.c file for just this board, I have some fooling around to do now to use my '328 boards.

Anyway, back to an RTC sketch.
Tomorrow,  I guess, contacts are getting pretty dry ...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 26, 2011, 07:07 am

Don't you just love breathing life into a new board? When it works of course :)


Well, if it does not work, well then you have not breathed life into it ;-)

So everyone, Bob has worked his butt off on this board. The least we can all do is buy one from him!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 26, 2011, 07:14 am
  :D Thanks for the plug!  XD
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mnmis on Jul 26, 2011, 02:15 pm
Here is the pins_arduino.c that I have been using that works with many processors.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 26, 2011, 03:27 pm
Thanks mnmis.
This section (actually the 2 above it, but the end results are obvious in this one) show the resulting pin mapping from PA-1 ... PD-7 to the D0-D31 that show up on the actual IO.  My board uses them somewhat differently.
I will modify this to reflect mine & check it out. I had the hardest time getting this info pulled in by the IDE, finally resorting to removing everything but my 1284 needs.

If I had understood how this worked  when I was assigning pin usage on the board, I may have assigned pin usage differently.
As it was, I tried to match pin usages to reflect the Duemilanove pin usage on shield headers for maximum compatibility.

Code: [Select]

const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
{
NOT_ON_TIMER, /* 0  - PB0 */
NOT_ON_TIMER, /* 1  - PB1 */
NOT_ON_TIMER, /* 2  - PB2 */
TIMER0A,      /* 3  - PB3 */
TIMER0B,                 /* 4  - PB4 */
NOT_ON_TIMER, /* 5  - PB5 */
NOT_ON_TIMER, /* 6  - PB6 */
NOT_ON_TIMER, /* 7  - PB7 */
NOT_ON_TIMER, /* 8  - PD0 */
NOT_ON_TIMER, /* 9  - PD1 */
NOT_ON_TIMER, /* 10 - PD2 */
NOT_ON_TIMER, /* 11 - PD3 */
TIMER1B,      /* 12 - PD4 */
TIMER1A,      /* 13 - PD5 */
TIMER2B,      /* 14 - PD6 */
TIMER2A,      /* 15 - PD7 */
NOT_ON_TIMER, /* 16 - PC0 */
NOT_ON_TIMER,   /* 17 - PC1 */
NOT_ON_TIMER,   /* 18 - PC2 */
NOT_ON_TIMER,   /* 19 - PC3 */
NOT_ON_TIMER,   /* 20 - PC4 */
NOT_ON_TIMER,   /* 21 - PC5 */
NOT_ON_TIMER,   /* 22 - PC6 */
NOT_ON_TIMER,   /* 23 - PC7 */
NOT_ON_TIMER,   /* 24 - PA0 */
NOT_ON_TIMER,   /* 25 - PA1 */
NOT_ON_TIMER,   /* 26 - PA2 */
NOT_ON_TIMER,   /* 27 - PA3 */
NOT_ON_TIMER,   /* 28 - PA4 */
NOT_ON_TIMER,   /* 29 - PA5 */
NOT_ON_TIMER,   /* 30 - PA6 */
NOT_ON_TIMER   /* 31 - PA7 */
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mnmis on Jul 26, 2011, 04:49 pm
CrossRoads,

Keeping pin compatibly across the different processors isn't too high on my priority.

I just keep track of the pin differences and update the code when necessary.

Mnmis
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 27, 2011, 12:03 am
mnnis,
That seemed to work.
I copied in my pin order, spot checked a couple.
If pito hadn't mentioned the arrays in the file & what they represented, I woudn't have figured this out.
I am not sure why having the 1284 info separate from this file, in the arduino-extras folder, didn't work either.

So, I am moving on. RTC I2C testing next, then finding something I can talk to via SPI, and finally checking out the SD cards.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 27, 2011, 01:55 am
8)..the best way to test the spi is to read/write the sdcards.. quite curious how to work with two sdcards in parallel.. ]:)

Btw, for testing purposes the "Bitlash" is a really useful tool. It takes ~29kB (together with sdfat) and then you must not upload a sketch everytime, when debugging hw (it is a cli_like interpreter/scripting language)..

http://bitlash.net/wiki/start

there is a sdcard support built in..p.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on Jul 27, 2011, 02:06 am

...The least we can all do is buy one from him!



Sign me up!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 27, 2011, 05:21 am
@pito,
The cards each have their own SS line and are individually accessed.

I am getting a weird error from the compiler for this code to read the 8 registers on the DS1307:
Code: [Select]


 // Reset the register pointer  
 Wire.beginTransmission(RTC_address);  
 Wire.send(0x00);  
 Wire.endTransmission();  
 
 Wire.requestFrom(RTC_address, 8 );  
 seconds = Wire.receive();  
 minutes = Wire.receive();  
 hours = Wire.receive();  
 day_week = Wire.receive();  
 date_month = Wire.receive();  
 month = Wire.receive();  
 year = Wire.receive();  
 sqwe = Wire.receive();

The same variables all compile okay for writing to the registers earlier in the sketch.

This line is highlighted:
 Wire.requestFrom(RTC_address, 8 );  

Quote

RTC_I2C_test.cpp: In function 'void loop()':
RTC_I2C_test:166: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
C:\Program Files\Arduino-0022\libraries\Wire/Wire.h:53: note: candidate 1: uint8_t TwoWire::requestFrom(int, int)
C:\Program Files\Arduino-0022\libraries\Wire/Wire.h:52: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t)
RTC_I2C_test.cpp: At global scope:
RTC_I2C_test:215: error: expected declaration before '}' token
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Coding Badly on Jul 27, 2011, 05:28 am

How is RTC_address declared?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 27, 2011, 06:02 am
RTC_address declared as a byte.

byte RTC_address = 0x68; // 1101 000
// 0 1101 000, 0x68, or 1101 000 0 0xD0 ??
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 27, 2011, 06:08 am
Hmm, looks like it needs to an int, compiles now.
Thanks for the idea to look at that.
Pressing on ...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 27, 2011, 07:56 am
Woohoo, I2C & RTC Work, as does Square Wave Output (demonstrated via flashing LED).
Code: [Select]

/*
Test of RTC DS1307 via I2C.
Counts
Seconds,
Minutes,
Hours,
Date of the Month,
Month,
Day of the week, and
Year with Leap-Year

56 bytes battery backed RAM
Square Wave Output, can connect to INT2/D6 or PD7
*/

#include <Wire.h>

//variables
byte seconds_address = 0x00;
byte seconds; // bit 7 = Clock Halt, Enabled = 0, Halt = 1
// bits 6-5-3 = tens of seconds 0-6,  bits 3-2-1-0 = units of seconds, 0-9
byte minutes_address = 0x01;
byte minutes;  // bits 6-5-4 = tens of minutes, bits 3-2-1-0 = units of minutes
byte hours_address = 0x02;
byte hours;  // 7=0. 6 = 1 for 12 hr, 0 for 24 hr.
// bit 5: 12 hr mode = AM(0)/PM(1). 24 hr mode = upper tens of hrs
// bit 4 =  lower tens of hrs, bits 3-2-1-0 = units of hours (0-9)
byte day_week_address = 0x03;
byte day_week = 0; // range 01-07
byte date_month_address = 0x04;
byte date_month = 0; // range 01-31
byte month_address = 0x05;
byte month = 0; // range 01-12
byte year_address = 0x06;
int year = 0; // upper byte 0-9, lower byte 0-9
byte square_address = 0x07;
byte sqwe = 0;  // square wave enable
// Out-0-0-Sqwe-0-0-RS1-RS0
// Out, Sqwe = 0/0 - Square wave output = 0
// Out, Sqwe = 1/0 - Square wave output = 1
// Out, Sqwe = 0/1 or 1/1 - Square wave output per RS1/RS0
// RS1/RS0 = 00 = 1 Hz
// RS1/RSo = 01 = 4 KHz
// RS1/RS0 = 10 = 8 KHz
// RS1/RS0 = 11 = 32 KHz
byte RTC_ram_address = 0x08; //range = 08-63, 0x08-0x3F

int RTC_address = 0x68; // 1101 000

byte incomingCommand = 0;
byte RTC_write_command = 0;
byte RTC_read_command = 0;
byte RTC_ram_command = 0;
// use F0xx, F1xx,F2xx, F3xx, F4xx, F5xx, F6xx, F7xx
// to send one register write commands
// use E0xx to read registers back
// use C0xx to read RAM back
byte incomingRegister = 0;
byte RTC_register = 0;
byte incomingData = 0;
byte new_data = 0;
byte outgoingData = 0;
int delay_time = 100;

unsigned long currentMillis = 0;
unsigned long previousMillis = 0;
unsigned long duration = 5000;

void setup() {
  Wire.begin(); // no address, we are master
  Serial1.begin (57600); 
  Serial1.flush();
  currentMillis = millis(); 
}

void loop() {

  if (Serial1.available() >1){
    incomingCommand = Serial1.read();
    //incomingRegister = Serial.read();
    incomingData = Serial1.read();
    Serial1.print ("command ");
    Serial1.println (incomingCommand & 0xF0, HEX);
    Serial1.print ("register ");
    Serial1.println(incomingCommand & 0x0F, HEX);
    Serial1.print ("data ");
    Serial1.println (incomingData, HEX);
  }
  // *******************************************
  RTC_write_command = incomingCommand & 0xF0;  // mask off high byte
  if (RTC_write_command == 0xF0){  // e033check for Write command
    RTC_register = incomingCommand & 0x0F;  // mask off low btye
    incomingCommand = 0;
    new_data = incomingData;
    Serial1.print (" Sending a command ");
    switch (RTC_register){
    case 0: // write seconds
        Serial1.println ("Seconds ");
      Wire.beginTransmission(RTC_address); // select device
      Wire.send(seconds_address);          // queue the register
      Wire.send(new_data);                  // queue data
      Wire.endTransmission();            // send it
      delay (delay_time);
      break;
    case 1: // write minutes
    Serial1.print ("Minutes ");
      Wire.beginTransmission(RTC_address); // select device
      Wire.send(minutes_address);          // queue the register
      Wire.send(new_data);                  // queue data
      Wire.endTransmission();            // send it
      delay (delay_time);
      break;
    case 2: // write hours
        Serial1.print ("Hours ");
      Wire.beginTransmission(RTC_address); // select device
      Wire.send(hours_address);          // queue the register
      Wire.send(new_data);                  // queue data
      Wire.endTransmission();            // send it
     delay (delay_time);
      break;
    case 3: // write day
        Serial1.print ("Day ");
      Wire.beginTransmission(RTC_address); // select device
      Wire.send(day_week_address);          // queue the register
      Wire.send(new_data);                  // queue data
      Wire.endTransmission();            // send it
     delay (delay_time);
      break;
    case 4: // write date of month
        Serial1.print ("Day of Month ");
      Wire.beginTransmission(RTC_address); // select device
      Wire.send(date_month_address);          // queue the register
      Wire.send(new_data);                  // queue data
      Wire.endTransmission();            // send it
     delay (delay_time);
      break;
    case 5: // write month
        Serial1.print ("Month ");
      Wire.beginTransmission(RTC_address); // select device
      Wire.send(month_address);          // queue the register
      Wire.send(new_data);                  // queue data
      Wire.endTransmission();            // send it
     delay (delay_time);
      break;
    case 6: // write year
        Serial1.print ("Year ");
      Wire.beginTransmission(RTC_address); // select device
      Wire.send(year_address);          // queue the register
      Wire.send(new_data);                  // queue data
      Wire.endTransmission();            // send it
     delay (delay_time);
      break;
    case 7: // write square wave
        Serial1.print ("Square Wave ");
    Serial1.println (RTC_register, HEX);
      Wire.beginTransmission(RTC_address); // select device
      Wire.send(square_address);          // queue the register
      Wire.send(new_data);                  // queue data
      Wire.endTransmission();            // send it
     delay (delay_time);
      break;
    case 8: // write RAM
        Serial1.print ("RAM ");
    Serial1.println (RTC_register, HEX);
      Wire.beginTransmission(RTC_address); // select device
      Wire.send(RTC_ram_address);          // queue the register
      Wire.send(new_data);                  // queue data
      Wire.endTransmission();            // send it
     delay (delay_time);
      break;
      // all others,do nothing
      Serial.println ("Invalid command ");
    }  // end Switch
  } // end if command == F
  // ************************************

  currentMillis = millis();
  if ( (currentMillis - previousMillis) >= duration){
    previousMillis = currentMillis; 
    // Reset the register pointer 
    Wire.beginTransmission(RTC_address); 
    Wire.send(0x00); 
    Wire.endTransmission();   

    Wire.requestFrom(RTC_address, 8 ); 
    seconds = Wire.receive(); 
    minutes = Wire.receive(); 
    hours = Wire.receive(); 
    day_week = Wire.receive(); 
    date_month = Wire.receive(); 
    month = Wire.receive(); 
    year = Wire.receive(); 
    sqwe = Wire.receive();

    // Seconds
    // bit 7 = Clock Halt, Enabled = 0, Halt = 1
    // bits 6-5-3 = tens of seconds 0-6,  bits 3-2-1-0 = units of seconds, 0-9

    // Hours
    // 7=0. 6 = 1 for 12 hr, 0 for 24 hr.
    // bit 5: 12 hr mode = AM(0)/PM(1). 24 hr mode = upper tens of hrs
    // bit 4 =  lower tens of hrs, bits 3-2-1-0 = units of hours (0-9)

    Serial1.print ("Hrs " );
    Serial1.print (hours, HEX);
    Serial1.print (" Mins ");
    Serial1.print (minutes, HEX);
    Serial1.print (" Secs ");
    Serial1.print (seconds, HEX);
    Serial1.print (" Day ");
    Serial1.print (day_week, HEX);
    Serial1.print (" Date ");
    Serial1.print (date_month, HEX);
    Serial1.print (" Month ");
    Serial1.print (month, HEX);
    Serial1.print (" Year 20");
    Serial1.print (year, HEX);
    Serial1.print (" Square Wave ");
    Serial1.println (sqwe, HEX);

  }
}

Moniter output:

Hrs 1 Mins 54 Secs 27 Day 4 Date 27 Month 7 Year 2011 Square Wave 10
Hrs 1 Mins 54 Secs 32 Day 4 Date 27 Month 7 Year 2011 Square Wave 10
Hrs 1 Mins 54 Secs 37 Day 4 Date 27 Month 7 Year 2011 Square Wave 10
Hrs 1 Mins 54 Secs 42 Day 4 Date 27 Month 7 Year 2011 Square Wave 10
Hrs 1 Mins 54 Secs 47 Day 4 Date 27 Month 7 Year 2011 Square Wave 10

Tomorrow, SPI ...  And see if the clock is running fast ...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 27, 2011, 08:08 am
@pito, was that cap on XTAL1 of the RTC suppose to make it go faster, slower, anything?
Has a 22pF cap now.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 27, 2011, 10:14 am
..as I wrote:
1. do not deploy any cap
2. if the clock goes fast then start to add a cap. The bigger the cap the slower the clock
3. if the clock goes slow (and none cap there) exchange the xtal
4. the cap would be typically 0 .. 15pf, but it depends on the xtal used
P.

PS: as far as I can remeber the clock system on arduino works in the way the arduino's internal clock is used (there is a Timer.c for sys time) and the internal clock is synchronised by the external RTC in a specific regular intervals (to be set, e.g. 300sec). The sdfat lib rely on the internal clock..
...
     setSyncProvider(RTC.get);   // the function to get the time from the actual RTC
     if(timeStatus()!= timeSet)
      Serial.println("Unable to sync with the RTC");
     else
      Serial.println("RTC has set the system time");  
      setSyncInterval(300);         // set the number of seconds between re-sync of time
      SdFile::dateTimeCallback(dateTime);
...
You have to link the time through a dateTime() callback function in order to use it with FAT.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 27, 2011, 10:38 am
@ two sdcards to run in parallel: frankly, not sure the arduino sdfat is prepared for two sdcards connected (two cards selects is not enough, though). Imagine you have two cards, opened, one for read, the second for write. You need 2 buffers, and the sdfat driver in basically two different states (two different instances of the sdfat driver).. It might be a challenge.. :smiley-roll-sweat:
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: tastewar on Jul 27, 2011, 02:29 pm

@ two sdcards to run in parallel: frankly, not sure the arduino sdfat is prepared for two sdcards connected (two cards selects is not enough, though). Imagine you have two cards, opened, one for read, the second for write. You need 2 buffers, and the sdfat driver in basically two different states (two different instances of the sdfat driver).. It might be a challenge.. :smiley-roll-sweat:


My understanding was that the main idea was to be able to support either card -- one might not populate both card holders, but this gave the user the choice of which style. And I gather that given the wealth of pins, it made sense for the hardware to support both simultaneously, even if it's a "future" on the software side.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 27, 2011, 04:09 pm
.. yes, you are right.. I am thinking about the future (as I passed the exercise with one sdcard already..)- how to run both cards simultanously.. maybe the latest sdfat supports more than one card opened.. if not, maybe chan's fatfs..p.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: fat16lib on Jul 27, 2011, 08:18 pm
The current version of SdFat can't support multiple SD cards.  You could have cards in both sockets and access one at a time by closing all files, and calling sd.init(speed, chipSelect) to switch cards.

I have a development version that mostly works with multiple cards.  You can have files open on all cards at the same time.

It uses multiple instances of the SdFat class. 

This is what a program that copies a file from one card to another looks like:
Code: [Select]
#include <SdFat.h>
#include <SdFatUtil.h>
SdFat sd1;
SdFat sd2;
uint8_t buf[100];
void setup() {
  Serial.begin(9600);
  PgmPrintln("type any character to start");
  while (!Serial.available());
  if (!sd1.init(SPI_FULL_SPEED, 10)) {
    PgmPrintln("Sd1:");
    sd1.initErrorHalt();
  }
  if (!sd2.init(SPI_FULL_SPEED, 9)) {
    PgmPrintln("Sd2:");
    sd2.initErrorHalt();
  }
  PgmPrintln("FreeRam: ");
  Serial.println(FreeRam());
  sd1.ls();
  PgmPrintln("-------------");
  sd2.ls();
  SdFile file1;
  sd1.chdir();
  if (!file1.open("TEST.BIN", O_READ)) {
    sd1.errorHalt("file1");
  }
  sd2.chdir();
  SdFile file2;
  if (!file2.open("COPY.BIN", O_WRITE | O_CREAT | O_TRUNC)) {
    sd2.errorHalt("file2");
  }
  uint32_t t = millis();
  while (1) {
    int n = file1.read(buf, sizeof(buf));
    if (n == 0) break;
    if (n < 0) sd1.errorHalt("read1");
    if (file2.write(buf, n) != n) sd2.errorHalt("write2");
  }
  t = millis() - t;
  PgmPrintln("File size: ");
  Serial.println(file2.fileSize());
  PgmPrintln("Copy time: ");
  Serial.print(t);
  PgmPrintln(" millis");
  file2.close();
}
void loop() {}



I may post a beta in a week or two.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 27, 2011, 09:03 pm
..great news!!.. there is a lot of space in the 1284p to run many instances of it.. thanks! p.
PS: will the new sdfat support 2 cards run on the same SPI? Or, do we need a separate SPI for each card??
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 27, 2011, 09:23 pm
The SD card socket on the top of the board has a seperate Slave Select from the uSD card socket on the bottom of the board.
(If a uSD card socket is mounted on the of the board in place of a SD card socket, the bottom uSD card socket can not be installed, they both use the same physical alignment hole.)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mowcius on Jul 27, 2011, 09:28 pm
Quote
(If a uSD card socket is mounted on the of the board in place of a SD card socket, the uSD card socket can not be installed, they both use the same physical alignment hole.)

I'm sure you can get away with cutting off the alignment pin and soldering it carefully...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: fat16lib on Jul 27, 2011, 09:39 pm
SdFat expects all cards to be on the same SPI bus.  On the 1284P this is PB4 - PB7.

Each card has a separate chip select.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 27, 2011, 09:41 pm
..this is a good message for us.. :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 27, 2011, 10:27 pm
"I'm sure you can get away with cutting off the alignment pin and soldering it carefully..."

Probably, is just 2 little plastic nubs - but they also have the same SS signal, that'd be a little trickier (doable, but trickier) to cut the trace and add a jumper wire.
I will have the top sockets share the same SS signal next time.
I suppose I could have an SD socket as an option for the bottom as well.
Title: Re: Atmel 1284 "Bobuino", SD Cards
Post by: CrossRoads on Jul 28, 2011, 03:35 am
I am running the SDFat Quickstart file.

It starts, I get the messages, I enter my pin #, then nothing happens.
Should I be doing something else?

Quote
SD chip select is the key hardware option.
Common values are:
Arduino Ethernet shield, pin 4
Sparkfun SD shield, pin 8
Adafruit SD shields and modules, pin 10
The default chip select pin number is pin 4

Enter the chip select pin number: 30

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 28, 2011, 01:53 pm
..you have to add to the  sd2pinmap.h (in the sdfat lib folder) the 1284p definitions..

...for example

//------------------------------------------------------------------------------
#elif defined(__AVR_ATmega1284P__)

// Two Wire (aka I2C) ports
uint8_t const SDA_PIN = 17;
uint8_t const SCL_PIN = 16;

// SPI port
uint8_t const SS_PIN   = 4; //12;
uint8_t const MOSI_PIN = 5; //13;
uint8_t const MISO_PIN = 6; //14;
uint8_t const SCK_PIN  = 7; //15;

static const pin_map_t digitalPinMap[] = {
  {&DDRA, &PINA, &PORTA, 0},  // A0  0   ADC0
  {&DDRA, &PINA,...................

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 28, 2011, 02:59 pm
@crossroads: maybe off the topic:
1. which microsdcard socket you use (the TFP09-12-2B ?)
2. the two positioning holes are large enough ?
(looking for the eagle lib part so asking whether it worked fine..).P.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 28, 2011, 04:35 pm
pito,
Thanks for #351, fat16lib wrote back to me also that sd2pinmap.h would need to change. Will check that out when I get home.  Looks like I need to mimic the contents of what I put in pins_arduino.c (all 32 IO pins ? Or just the 4 pins used for SPI ?)

uSD connecter, I used the Molex connecter that dipmicro sells, they have a library symbol for it also.
http://www.dipmicro.com/store/CON-MICROSD1
"MicroSD/TransFlash push/push connector. This connector is designed for SMT PCB mount, extensive use without mounting may loosen the pins. The free Eagle library provided by Roman Vaughan from Auckland, New Zealand is with his permission available here. " (actual link shows up on page)

Mounted nicely, even tho it was hand soldered (by my wife, very nice touch).  Haven't tried it with a card yet.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 28, 2011, 05:18 pm
..put there everything as you may see with the other mcu's there..
the sdcard shall then work when connected properly.. those demos wait on "type any character to start" so you have to push the button  :)
Run sdinfo.pde and you may see then what is your card like. In the older sdfat versions there is sdfatbench.pde - it measures the r/w speeds.. I would recommend you to have a look on the examples from older versions of sdfat as well..

Thanks for sdcard socket info, I've seen tons of those sockets on ebay and it seems it is the one I'll order.
P.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 28, 2011, 07:00 pm
Thanks pito, am looking forward to checking that out after work.
Robert
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 29, 2011, 07:14 am
Okay, with fat16lib's & pito's help I was came up with the following change to Sd2PinMap.h

Code: [Select]

#elif defined(__AVR_ATmega1284P__)
// add this if use these other chips
// ||defined(__AVR_ATmega644P__) || defined(__AVR_ATmega324P__)

// ATMEL ATMEGA1284P / BOBUINO
//
// Make it agree with the as-built hardware & pins_arduino.c
//
//                    +---\/---+
//  INT0 (D 4)  PB0  1|        |40  PA0 (AI 0 / D14)
//  INT1 (D 5)  PB1  2|        |39  PA1 (AI 1 / D15)
//  INT2 (D 6)  PB2  3|        |38  PA2 (AI 2 / D16)
//   PWM (D 7)  PB3  4|        |37  PA3 (AI 3 / D17)
//   PWM (D 10) PB4  5|        |36  PA4 (AI 4 / D18)
//  MOSI (D 11) PB5  6|        |35  PA5 (AI 5 / D19)
//  MISO (D 12) PB6  7|        |34  PA6 (AI 6 / D21)
//   SCK (D 13) PB7  8|        |33  PA7 (AI 7 / D22)
//              RST  9|        |32  AREF
//              VCC 10|        |31  GND
//              GND 11|        |30  AVCC
//            XTAL2 12|        |29  PC7 (D 29)
//            XTAL1 13|        |28  PC6 (D 28)
//  RX0 (D 0)   PD0 14|        |27  PC5 (D 27) TDI
//  TX0 (D 1)   PD1 15|        |26  PC4 (D 26) TDO
//  RX1 (D 2)   PD2 16|        |25  PC3 (D 25) TMS
//  TX1 (D 3)   PD3 17|        |24  PC2 (D 24) TCK
//  PWM (D 30)  PD4 18|        |23  PC1 (D 23) SDA
//  PWM (D 8 )  PD5 19|        |22  PC0 (D 22) SCL
//  PWM (D 9)   PD6 20|        |21  PD7 (D 31) PWM
//                    +--------+
//
// NOT_ON_TIMER, /* 0  - PD0 */  
// NOT_ON_TIMER, /* 1  - PD1 */
// NOT_ON_TIMER, /* 2  - PD2 */
// NOT_ON_TIMER,   /* 3  - PD3 */  
// NOT_ON_TIMER, /* 4  - PB0 */
// NOT_ON_TIMER, /* 5  - PB1 */
// NOT_ON_TIMER, /* 6  - PB2 */
// TIMER0A, /* 7  - PB3, PWM */
// TIMER1A, /* 8  - PD5, PWM */
// TIMER2B, /* 9  - PD6, PWM */
// TIMER0B, /* 10 - PB4, PWM */
// NOT_ON_TIMER, /* 11 - PB5 */
// NOT_ON_TIMER,   /* 12 - PB6 */
// NOT_ON_TIMER,   /* 13 - PB7 */
// NOT_ON_TIMER,   /* 14 - PA0 */
// NOT_ON_TIMER,   /* 15 - PA1 */
// NOT_ON_TIMER, /* 16 - PA2 */
// NOT_ON_TIMER, /* 17 - PA3 */
// NOT_ON_TIMER, /* 18 - PA4 */
// NOT_ON_TIMER, /* 19 - PA5 */
// NOT_ON_TIMER, /* 20 - PA6 */
// NOT_ON_TIMER, /* 21 - PA7 */
// NOT_ON_TIMER, /* 22 - PC0 */
// NOT_ON_TIMER, /* 23 - PC1 */
// NOT_ON_TIMER, /* 24 - PC2 */
// NOT_ON_TIMER, /* 25 - PC3 */
// NOT_ON_TIMER, /* 26 - PC4 */
// NOT_ON_TIMER, /* 27 - PC5 */
// NOT_ON_TIMER, /* 28 - PC6 */
// NOT_ON_TIMER, /* 29 - PC7 */
// TIMER1B, /* 30 - PD4, PWM */
// TIMER2A /* 31 - PD7, PWM */


// Two Wire (aka I2C) ports
uint8_t const SDA_PIN = 23;  // C1 23
uint8_t const SCL_PIN = 22;  // C0 22

// SPI port
  uint8_t const SS_PIN = 18;   // D 30
// uint8_t const SS_PIN = 21;  // D 31 Swap when testing the other SD card

  uint8_t const MOSI_PIN = 6;  // D 11  MOSI
  uint8_t const MISO_PIN = 7;  // D 12  MISO
  uint8_t const SCK_PIN =  8;  // D 13  SCK

have also tried the SPI section above as:
Code: [Select]

// SPI port
  uint8_t const SS_PIN = 30;   // D 30
// uint8_t const SS_PIN = 31;  // D 31 Swap when testing the other SD card

  uint8_t const MOSI_PIN = 11;  // D 11  MOSI
  uint8_t const MISO_PIN = 12;  // D 12  MISO
  uint8_t const SCK_PIN =  13;  // D 13  SCK

and the actual port to pin mapping:
Code: [Select]

static const pin_map_t digitalPinMap[] = {
 {&DDRD, &PIND, &PORTD, 0},  // D0  0
 {&DDRD, &PIND, &PORTD, 1},  // D1  1
 {&DDRD, &PIND, &PORTD, 2},  // D2  2
 {&DDRD, &PIND, &PORTD, 3},  // D3  3
 {&DDRB, &PINB, &PORTB, 0},  // B0  4
 {&DDRB, &PINB, &PORTB, 1},  // B1  5
 {&DDRB, &PINB, &PORTB, 2},  // B2  6
 {&DDRB, &PINB, &PORTB, 3},  // B3  7
 {&DDRD, &PIND, &PORTD, 5},  // D5  8
 {&DDRD, &PIND, &PORTD, 6},  // D6  9
 {&DDRB, &PINB, &PORTB, 4},  // B4 10
 {&DDRB, &PINB, &PORTB, 5},  // B5 11
 {&DDRB, &PINB, &PORTB, 6},  // B6 12
 {&DDRB, &PINB, &PORTB, 7},  // B7 13
 {&DDRA, &PINA, &PORTA, 0},  // A0 14
 {&DDRA, &PINA, &PORTA, 1},  // A1 15
 {&DDRA, &PINA, &PORTA, 2},  // A2 16
 {&DDRA, &PINA, &PORTA, 3},  // A3 17
 {&DDRA, &PINA, &PORTA, 4},  // A4 18
 {&DDRA, &PINA, &PORTA, 5},  // A5 19
 {&DDRA, &PINA, &PORTA, 6},  // A6 20
 {&DDRA, &PINA, &PORTA, 7},  // A7 21
 {&DDRC, &PINC, &PORTC, 0},  // C0 22
 {&DDRC, &PINC, &PORTC, 1},  // C1 23
 {&DDRC, &PINC, &PORTC, 2},  // C2 24
 {&DDRC, &PINC, &PORTC, 3},  // C3 25
 {&DDRC, &PINC, &PORTC, 4},  // C4 26
 {&DDRC, &PINC, &PORTC, 5},  // C5 27
 {&DDRC, &PINC, &PORTC, 6},  // C6 28
 {&DDRC, &PINC, &PORTC, 7},  // C7 29
 {&DDRD, &PIND, &PORTD, 4},  // D4 30
 {&DDRD, &PIND, &PORTD, 7}   // D7 31

};

and commented out 1284 in the 644/1284 part:
Code: [Select]

#elif defined(__AVR_ATmega644P__)||\
     defined(__AVR_ATmega644__)
// || defined(__AVR_ATmega1284P__)
// Sanguino


Result with either set of SPI pins is the sketches (SdFormatter, Bench, QuickStart) get to this line

 if (!card.init(spiSpeed, chipSelect)) {

and stop.

What am I missing still?

If I run "Blink" with D11, 12, 13, 30 I can see the lines toggling at the SD socket on the right pins, so I know the signals are getting there.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 29, 2011, 10:37 am
..this works with mine (my own board!):

PS: the evidence provided by the toggling the "arduino_lines" with a help of some arduino functions within the Blink demo may not necessarily mean the sdfat uses those "arduino_line" numbers internally.. I think the SPI is hardwired into the sdfat.. So as I've written in #351 do use 4,5,6,7 (the magic numbers  :smiley-eek:), and restart IDE..

PS1: with pin/lines mapping from (vanilla):           #include "pins_duino644.cxx"

PS2: .. provided you are using the PB4 as the SS !!

As I can see from the schematics you are using PD4 for the top sdcard and PC6 for the bottom sdcard as the SS. Is that correct??
If yes, then based on above PS1 (double check the count,pls):
SS_top card: PD4 -> 12                  (12,5,6,7)
SS_bottom card: PC6 -> 21            (21,5,6,7)

It may differ of course when using other pin mapping as in PS1: !

Code: [Select]
//------------------------------------------------------------------------------
#elif defined(__AVR_ATmega1284P__)
// ala BahBots & Sanguino

// Two Wire (aka I2C) ports
uint8_t const SDA_PIN = 17;
uint8_t const SCL_PIN = 16;

// SPI port
uint8_t const SS_PIN   = 4; //12;
uint8_t const MOSI_PIN = 5; //13;
uint8_t const MISO_PIN = 6; //14;
uint8_t const SCK_PIN  = 7; //15;

static const pin_map_t digitalPinMap[] = {
 {&DDRA, &PINA, &PORTA, 0},  // A0  0   ADC0
 {&DDRA, &PINA, &PORTA, 1},  // A1  1   ADC1
 {&DDRA, &PINA, &PORTA, 2},  // A2  2   ADC2
 {&DDRA, &PINA, &PORTA, 3},  // A3  3   ADC3
 {&DDRA, &PINA, &PORTA, 4},  // A4  4   ADC4
 {&DDRA, &PINA, &PORTA, 5},  // A5  5   ADC5
 {&DDRA, &PINA, &PORTA, 6},  // A6  6   ADC6
 {&DDRA, &PINA, &PORTA, 7},  // A7  7   ADC7
 {&DDRB, &PINB, &PORTB, 0},  // B0  8
 {&DDRB, &PINB, &PORTB, 1},  // B1  9
 {&DDRB, &PINB, &PORTB, 2},  // B2 10 AIN0 INT2
 {&DDRB, &PINB, &PORTB, 3},  // B3 11 AIN1 OC0A (PWM)
 {&DDRB, &PINB, &PORTB, 4},  // B4 12   SS   OC0B (PWM)
 {&DDRB, &PINB, &PORTB, 5},  // B5 13   MOSI ICP3
 {&DDRB, &PINB, &PORTB, 6},  // B6 14   MISO OC3A (PWM)
 {&DDRB, &PINB, &PORTB, 7},  // B7 15   SCK  OC3B (PWM)
 {&DDRC, &PINC, &PORTC, 0},  // C0 16 SCL
 {&DDRC, &PINC, &PORTC, 1},  // C1 17 SDA
 {&DDRC, &PINC, &PORTC, 2},  // C2 18 TCK
 {&DDRC, &PINC, &PORTC, 3},  // C3 19 TMS
 {&DDRC, &PINC, &PORTC, 4},  // C4 20 TDO
 {&DDRC, &PINC, &PORTC, 5},  // C5 21 TDI
 {&DDRC, &PINC, &PORTC, 6},  // C6 22 TOSC1
 {&DDRC, &PINC, &PORTC, 7},  // C7 23 TOSC2
 {&DDRD, &PIND, &PORTD, 0},  // D0 24 RXD0
 {&DDRD, &PIND, &PORTD, 1},  // D1 25 TXD0
 {&DDRD, &PIND, &PORTD, 2},  // D2 26 RXD1
 {&DDRD, &PIND, &PORTD, 3},  // D3 27 TXD1
 {&DDRD, &PIND, &PORTD, 4},  // D4 28 OC1B (PWM)
 {&DDRD, &PIND, &PORTD, 5},  // D5 29 OC1A (PWM)
 {&DDRD, &PIND, &PORTD, 6},  // D6 30 OC2B (PWM) ICP
 {&DDRD, &PIND, &PORTD, 7}   // D7 31 OC2A (PWM)
};
//------------------------------------------------------------------------------
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: fat16lib on Jul 29, 2011, 03:56 pm
There are five important pin types for SPI on an avr processor.  These are SS, SCK, MISO, MOSI, and chip select.

On the 1284P these definitions must map like this
Code: [Select]

uint8_t const SS_PIN   = <pin number for PB4>;
uint8_t const MOSI_PIN = <pin number for PB5>;
uint8_t const MISO_PIN = <pin number for PB6>;
uint8_t const SCK_PIN  = <pin number for PB7>;

SS is not the same as chip select and must be defined as above.  For SPI to work correctly on an avr, SS must be either set to output mode or held high in input mode http://atmel.com/dyn/resources/prod_documents/doc2585.pdf (http://atmel.com/dyn/resources/prod_documents/doc2585.pdf).

SdFat sets SS to output mode even if SS is not chip select.

Chip select for a SPI device can be any pin.  SdFat uses SS by default:
Code: [Select]
/** The default chip select pin for the SD card is SS. */
uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;

The above definition is only used when the chip select pin is not specified in the init() call.

The definitions for this array must match the way you setup The Arduino pins_arduino.c and pins_arduino.h files.
Code: [Select]
static const pin_map_t digitalPinMap[] = {
These definitions are currently used for software SPI in SdFat and other libraries associated with SdFat.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 29, 2011, 04:30 pm
.. can we somehow bitbang the SPI (softspi) to be used with sdfat?

and would not be better then to define everything at one place like :

#define SS_ISNOT_CS

uint8_t const CS1_PIN   = <pin number for PXY>;
uint8_t const SS_PIN   = <pin number for PB4>;
uint8_t const MOSI_PIN = <pin number for PB5>;
uint8_t const MISO_PIN = <pin number for PB6>;
uint8_t const SCK_PIN  = <pin number for PB7>;
uint8_t const  SD_CHIP_SELECT_PIN = CS1_PIN;

when the SS is not being used as the CS (but must be set to output or the input pulled high), and the SS shall be then set properly inside the sdfat as well..

@crossroads - then you have to set SS to output when not used as the CS, and it may work..
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: fat16lib on Jul 29, 2011, 05:30 pm
Most users don't need to know about SS, SCK, MOSI, and MISO.  I set SS to output and set it high in init().  That makes SdFat work with boards that don't use SS as chip select for the SD.  If another SPI device uses SS as chip select this disables it.

The only time you need to worry about another SPI devices is if it uses a pin other than SS for chip select.  You must set chip select high on that device before calling SdFat::init().

I don't want users to edit Sd2PinMap.h  It is generated by a program that I run.

You are an exception since you are making your own board.  You will always need to edit Sd2PinMap.h since the 1284P is defined to be a Sanguino in Sd2PinMap.h.

Early versions of SdFat had SD_CHIP_SELECT_PIN in the same file as SS_PIN, SCK_PIN, MOSI_PIN, and MISO_PIN.  Users thought they could change the pin numbers any way they wanted.  That caused a lot of problems.

I wish I could remove the definition for SD_CHIP_SELECT_PIN and require users to call
Code: [Select]
 sd.init(SPI_FULL_SPEED, chipSelect);
if chip select is not SS.

I plan to move the definition of SD_CHIP_SELECT_PIN to SdFatConfig.h and have a policy that users should only edit SdFatConfig.h.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Coding Badly on Jul 29, 2011, 06:46 pm
Quote
I wish I could remove the definition for SD_CHIP_SELECT_PIN and require users to call


Why is that not possible?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 29, 2011, 07:35 pm
..if you track "chipselect" in the sdfat you may see it has udergone an evolution:
..
uint8_t const SS_PIN = 53;
uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
bool init(uint8_t sckRateID = SPI_FULL_SPEED,
    uint8_t chipSelectPin = SD_CHIP_SELECT_PIN);
chipSelectPin_ = chipSelectPin;
digitalWrite(chipSelectPin_, LOW);

.. so you have to touch a lot of files then..
P.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 29, 2011, 08:16 pm
Ok.  I think I understand.

In Sd2PinMap.h I need to set these 4 pins as SS, MOSI, MISO, SCK
//   PWM (D 10) PB4  5
//  MOSI (D 11) PB5  6
//  MISO (D 12) PB6  7
//   SCK (D 13) PB7  8

Then in any SdFat sketch I run I need to set the PB4 pin as an output.
Then somewhere else this gets called

uint8_t const  SD_CHIP_SELECT_PIN = SS_PIN;
Does that need to go in the sketch as well?
Or does this go into Sd2PinMap.h also, with SS_PIN replaced by the physical pin # (18) or by the mapped name (30)?

I have PB4 connected to the shield header so that a user can have 'normal' SPI operations to an external device and not impact the SD card.

Thanks for the additional clarifications. Didn't realize what I had gotten myself into software-wise with my desire to implement increased hardware flexibility.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 29, 2011, 08:38 pm
..the easiest way to test yor sdcard-hw "today" is to go with my setup (see my post, sanguino like) and to use pb4 as the chipselect (take it from the jumper J3-pin3 and apply accordingly  :smiley-roll-sweat:)...

sw trap - the biggest issue with arduino is the attempt to make everything "automated" so in the near future the wrappers will be 99% of an application volume... fortunately sw-wise is everything doable..  :P

.. I'm currently working with pic32mx so I am observing carefully those guys with chipkit (arduino "clone" based on pic32mx).. they are in much worse situation than you.. :smiley-roll:
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: fat16lib on Jul 29, 2011, 09:11 pm
Forget you ever knew about
Code: [Select]

uint8_t const SD_CHIP_SELECT_PIN = SS_PIN;

Don't edit any files except Sd2PinMap.h !!!!!!!!!

I think you had SS_PIN wrong.  It looks like it should be pin 10 if that is PB4.

If you get Sd2PinMap.h setup correctly, this sketch will write "Hello World!" to the file HELLO.TXT.
Code: [Select]

#include <SdFat.h>

SdFat sd;

SdFile file;

// set 30 to whatever your chip select pin is
uint8_t chipSelect = 30;
//------------------------------------------------------------------------------
void setup() {
 Serial.begin(9600);

 if (!sd.init(SPI_FULL_SPEED, chipSelect)) sd.initErrorHalt();

 if (!file.open("HELLO.TXT", O_WRITE | O_CREAT | O_TRUNC)) {
   sd.errorHalt("open");
 }

 file.println("Hello World!");

 file.close();
 
 Serial.println("Done!");
}
//------------------------------------------------------------------------------
void loop() {}

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: fat16lib on Jul 29, 2011, 09:46 pm
pito,

Sd2PinMap.h has nothing to do with chip select.

You don't need to edit any files for chip select.

It is set in the init call.  See the sketch I posted.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 29, 2011, 10:01 pm
@fat16lib: nope, I am not going to edit any file!! One year ago I spent so much time/effort/stress to get my atmega32 and atmega1284p running arduino (bootloader, pinmappings, etc) that I am still under medication (post traumatic stress disorder symptoms..) ;)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: retrolefty on Jul 29, 2011, 10:06 pm
Quote
I am not going to edit any file!! One year ago I spent so much time to get my atmega32 and atmega1284p running arduino (bootloader, pinmappings, etc) that I am still under medication (post traumatic stress disorder symptoms..)


I hope this Bobuino project doesn't suffer such a outcome.  :D
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 29, 2011, 10:50 pm
@fat16lib;

"I think you had SS_PIN wrong.  It looks like it should be pin 10 if that is PB4."

PB4 is physical pin 5 (part of SPI group of pins 5-6-7-8), mapped to arduino D10.
Do I use the physical pin, or the mapped pin?

I am leaving work in a couple minutes, hope to try this around 6PM (east coast).

I have not changed other files (undid changes in SD2card.h I think it was), am using stock files with only changes in Sd2PinMap.h.

@lefty, I think I am close!  After getting this to work, will get the uSD to work on its own chip select line.
Then will ask about how to select one or the other in a sketch.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 29, 2011, 11:00 pm
"PB4 is physical pin 5 ..mapped to arduino D10" - this is like "at four o'clock the five o'clock tea will be served.."    :~
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: fat16lib on Jul 29, 2011, 11:18 pm
You use the Arduino pin number for SS_PIN. 

So this will set the SS pin high in output mode.

Code: [Select]

pinMode(SS_PIN, OUTPUT);
digitalWrite(SS_PIN, HIGH);


Same for SCK_PIN, MISO_PIN, and MOSI_PIN.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 30, 2011, 12:44 am
Hello World works!

// Two Wire (aka I2C) ports
uint8_t const SDA_PIN = 23;  // C1 23
uint8_t const SCL_PIN = 22;  // C0 22

// SPI port
  uint8_t const SS_PIN =   10;  // physical 5, D 10  SS
  uint8_t const MOSI_PIN = 11;  // physical 6, D 11  MOSI
  uint8_t const MISO_PIN = 12;  // physical 7, D 12  MISO
  uint8_t const SCK_PIN =  13;  // physical 8, D 13  SCK

Thanks very much for all the help :) :)
Going to try some of the other example now...

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 30, 2011, 12:49 am
Congratulation!  :)
That's one small step for you, one giant leap for arduino community!
What the bench.pde says?
Title: Re: ATMEL Mega1284P evaluation board available
Post by: mowcius on Jul 30, 2011, 12:51 am
The thread title has been annoying me for ages - if people now reply to this one then it's spelt right :D

Still nice work on it all.
Title: Re: ATMEL Mega1284P evaluation board available (for mowcius!)
Post by: CrossRoads on Jul 30, 2011, 12:54 am
Full speed Bench test:
Card is 16 GB Sandisk Ultra SDHC, 15 MB/S

Settings: SPI_FULL_SPEED

How do these results look? I have nothing to compare to.
Need to get a uSD card to test the other socket.

Quote

Type any character to start
Free RAM: 15252
Type is FAT32
File size 5MB
Starting write test.  Please wait up to a minute
Write 150.37 KB/sec

Starting read test.  Please wait up to a minute
Read 280.82 KB/sec
Done
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 30, 2011, 01:07 am
Can't run Quickstart - it won't accept a 2 digit ChipSelect entry, it tries using 3 instead of 30.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: fat16lib on Jul 30, 2011, 01:17 am
QuickStart expects line at a time input like the Arduino IDE.  If no characters are available after 10 ms it assumes it has read the line.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 30, 2011, 01:31 am
So I need to type 3-enter-0-enter really quick? ;)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: fat16lib on Jul 30, 2011, 01:38 am
No, your terminal emulator needs to send line at a time.

The Arduino IDE collects the line in the PC as you type it.  When you hit send it sends the characters with no delay between characters.  By default it does not send a new line so I just wait for no characters available for 10 ms.

I first waited for a new line but you never see one.

I made QuickStart work with the Arduino defaults so it would be easy for new users.

What are you using for a terminal?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 30, 2011, 01:44 am
..the speeds seems to be normal, the limitation is the spi_clk speed (max 9MHz on your board) and fcpu, sandisk is the fastest as I can see some results (see   http://www.microchip.com/forums/m574511-print.aspx    with some nice pictures on comparision of various sdcards vs. fstypes vs. spi speeds, run on pic32 - but the mcu does not matter here)..
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 30, 2011, 03:31 am
I am using the IDE serial monitor.
Must have been the way I typed, as its working now.
Or maybe I needed one more enter to restart when it didn't work.


Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 30, 2011, 03:32 am
SdFormatter works!
Kinda disappointed - my "16 GB" card is ony 15.915GB
and only 14.8 GB in "real" gigabytes (2^32 or whatever a G is)

I feel much better about proceeding with the building of up tp 8 more on Sunday (maybe 9, If I have enough parts).
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: cyclegadget on Jul 30, 2011, 04:26 am


...The least we can all do is buy one from him!



Sign me up!


If there is a list I would like to be on the list 2!

Mark
Title: Re: ATMEL Mega1284P evaluation board available
Post by: CrossRoads on Jul 30, 2011, 04:33 am
@pito,
Are the pins for uSD pretty much the same as SD?
I went out & bought a 2GB uSD card. It works in the adapter it came with in the SD socket, but does not work in the uSD socket.
I am starting to think the eagle library is not correct.

Here's the way the library has the pins - yet on the SD card, the pins are more or less flipped the other way,
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 30, 2011, 05:03 am
You guys ok with just one working SD socket? I am pretty sure the library for the uSD has the pins swapped end for end.

Can anyone confirm?

Here's a blog with definition of the pins.

http://elasticsheep.com/2010/01/reading-an-sd-card-with-an-atmega168/
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 30, 2011, 06:53 am

You guys ok with just one working SD socket? I am pretty sure the library for the uSD has the pins swapped end for end.

Can anyone confirm?

Here's a blog with definition of the pins.

http://elasticsheep.com/2010/01/reading-an-sd-card-with-an-atmega168/


I know I could be shot for pointing this out, but if the iossue is that the pins for the uSD card are hooked up backwards, well that's fixable in software (DUCKING)...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 30, 2011, 07:10 am
Ha ha, never thought I'd hear that from a software guy! XD

But in this case, sadly is not true.

Here's why:
Needs to be, What it is
1 NC            NC
2 NC            Data Out
3 CS            GND
4 Data IN      SCK
5 +5V           +5V
6 SCK          Data In
7 GND          CS
8 Data Out    NC
9 NC            NC

Everything comes from hardware SPI tho, so it can't be faked in software.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 30, 2011, 07:25 am
Oh that's a shame, so you need new PCBs. That sucks. But hey, how many designes work ont he first try?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 30, 2011, 07:26 am
Oh wait, was the problem that the lib is wrong, or could it be that Eagle didn't mirror the bottom layer when you made the gerbers?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 30, 2011, 07:33 am
I believe the Library is wrong.  I have the same socket top & botom, they mirror each other, both have CS in the wrong place.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 30, 2011, 11:14 am
:smiley-sleep:
.. I ordered this (with an assumption I will use your eagle lib):
1. the first picture shows "SD mode" 4bit
2. the second "SPI mode"
3. the third - maybe the corrected version (double check)
4. new lib (the original one has the numbering wrong and the pads were count from left to right, top view) - double check as I am doing this while I sleep..
PS: the case gnds are shown intentionally as 4,3,2,1  :smiley-sleep:

PS1: BTW, that is not an error in the lib - top side in Boston means bottom side in Auckland..  :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 30, 2011, 05:28 pm
Thanks Pito, I'll see if I can get that in and get some new boards ordered today.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 30, 2011, 05:34 pm
..wait a while before you order new boards.. it could be more to fix there.. P.
PS1:
-what I generally miss are the pullups on the sdcards pins like CS, datain,..
-pullups on the carddetect, writeprotected..
-add the sense (carddetect) on the microsd as well (and the pullup)
-add pullups on any RX, RX1 and alike lines which may float when the cable is not connected
-I would not use A7 for WP of sdcard1 but for cardetect (sense) of the usdcard
..maybe more
-try to load the power supplies with a few hundred mAps (when applicable) and see if it works stable (when inserting sdcards, when formating sdcards, etc)
- I would add few 10-20uF ceramic caps to the sdcards vcc33

PS2: did you ever put a shield into this Mother of all boards?
If I were you I would assemble one more board and ask somebody to use it intensively for 1-2weeks in some harsh environment (various shields etc.). Then I would consider the second batch.. Moreover, you planned only one sdcard, did'n you?  :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Jul 30, 2011, 08:41 pm
Pito, how about the internal pullups?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 30, 2011, 08:49 pm
pullups- ..if the software sets them up then ok.. what if not?? I do not know, what I am suggesting to you is to think on all possible variants or potential issues, before you order new boards.. simply do use the board as-is, try various applications and you may see what is missing..
The new sdfat supporting more than one card will be not ready within 2 weeks so you do not need to have two cards there yet..P.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Jul 31, 2011, 02:13 am
@pito,
I am doing a little re-arrangiing, wiring the top SD & uSD in parallel, adding a 2nd SD to the bottom & wiring it in parallel to the bottom SD.
Each side will have its own chip select, which is seperate from the shield slave select.
Quote
-what I generally miss are the pullups on the sdcards pins like CS, datain,..

The 2 chip selects have 10K pullups to Vcc33 for the SPI signal buffer chip. I am not putting any additional load on the MISO, MOSI, and SCK lines.
Quote

-pullups on the carddetect, writeprotected..,..

Will rely on the internal pullups for that. It is just a switch closure, no active signal behind it.
Quote

-add the sense (carddetect) on the microsd as well (and the pullup),..

I have removed the WP signal and instead used A6 and A7 as the top and bottom card detect/sense
I have read (perhaps prior Skyjumper posts?) that reading that the software can write the card even if it selected.
Quote

-add pullups on any RX, RX1 and alike lines which may float when the cable is not connected,..

I don't see the need for that. If your cable is not there, you will not get good data anyway. And then its just exrta load when you want to use that pin with a shield.
Quote

-I would not use A7 for WP of sdcard1 but for cardetect (sense) of the usdcard,..

See above
Quote

..maybe more
-try to load the power supplies with a few hundred mAps (when applicable) and see if it works stable (when inserting sdcards, when formating sdcards, etc),..

3.3V Reg is good fror 400mA, not worried about that one.

Quote

- I would add few 10-20uF ceramic caps to the sdcards vcc33,..

Alread has a 100uF cap on the input, 100nF on the output, and 100nF at the buffer chip
Quote

PS2: did you ever put a shield into this Mother of all boards? ,..

Haven't used it with one (I don't have any) but we used a adafruit shield to  hold the header pins in place, so alignment is correct.
I also used Blink to toggle all outputs, leading to the revised pins_arduino.c for this board.
Quote

If I were you I would assemble one more board and ask somebody to use it intensively for 1-2weeks in some harsh environment (various shields etc.). Then I would consider the second batch.. Moreover, you planned only one sdcard, did'n you?,..

Am assembling 8 or 9 more tomorrow, will then have some to play with  besides the 2 I built to start for debugging.
They will not have the uSD shield. Rev 18 boards will have that option.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Jul 31, 2011, 12:23 pm
.. RX pullups - worst case scenario - imagine an application which, after a reset, checks (within a specific time interval) whether it gets in a character via usart, or not. If yes it jumps to a bootloader/monitor/shell, when not it continues to the application.. A logical 0 at RX means a new character comes in then.. ]:)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Aug 01, 2011, 05:52 am
Ok, here it is!  The "Bobuino", an ATMega1284 based design which expands on the Arduino Duemilanove design with more IO pins, RealTime Clock with battery backup, Secure Data Card socket, and RS232 driver.

After a hard of day of soldering & soldering with my friend Skyjumper and his reflow oven and the "CrossRoads Electronics team" (my engineer wife,  my son and I  :D ), I now have 10 Bobuinos ready for sale. Qantity is limited to the 10 pictured here; price for the first 10 is $80 each. If there's enough interest, I'll build some more.
For that $80, you get all these fanastic features plus USPS flatrate shipping to your US location (need to get some electrostatic bags too):

1. Atmega1284P processor featuring 4 Kbyte EEPRPOM, 16 Kbyte SRAM, 128Kbyte Flash Memory; 2 hardware UARTS; 32 IO lines; and 40 pin DIP package, easily replaceable when you blow it up.  Will be preprogrammed with a bootloader, and I'll also send the modified pins_arduino.c and Sd2PinMap.h files for use with the fat16lib's SdFat library. Use them as is, or cut & paste the relevant sections into your files.
2.  Female headers that accept standard shields. All shield pins are accessed normally: Vin, +5, +3.3V (50mA max), Reset, Gnd, D0-D13, A0-A3, A4-A5 (** see #24 below), and 2 addtional analog pins, A6-A7 (** see #25 below). D10-11-12-13 are the SPI pins. D10 is free to used as the Shield's SPI ChipSelect/SlaveSelect line.  Activity "L" LED connected to D13 via series 1K resister (about a 3mA load when High).
3. Jumper to select if RTC Square Wave output goes to D6 (INT2) or D31 (PD7).  SqWave is not connected to anything when no jumper is installed.
4. DS1307 Real time clock with 13.768KHz crystal oscillator, connected to dedicated I2C pins SCL/SDA, and with 10K pullup resistors, for access to Year, Month, Day of Month, Day of Week, Hours (24  hour format, or 0-12 with AM/PM indication), Minutes, Seconds. Square wave can be off; or the open drain output with 10K pullup resister can be software selected to output 1Hz, 4kHz, 8kHz, 32kHz.   CR2032 3V Lithium batter is installed in a Tyco battery holder on the back of the board.
5. 5.5/2.1mm Barrel jack for wallwart. Will include 7.5V, 1000mA switching regulator for an additional $5, or use your existing 7.5VDC to 12VDC wallwart. Input DC goes thru a reverse polarity protection diode to become Vin to the 5V regulator and to the header shield.
6.  5V, 800mA linear regulator, mounted on expanded thermal pads (connected top & bottom).
7. 3 holes (shown pictured with 0.025", 0.1" pitch pins for testing) to connect to external Vin, Gnd, +5V. Option: remove the regulator and install,or connect to, a leaded part with heatsink (MC33269T-5.0, TO-220 package) if planning to supply power from up to a 20VDC source, or your favorite switching regular to supply 5VDC.
8.  3 pins with Jumper to select 5V from regulator or 5V from USB to supply the rest of the board.  If no jumper is installed, 5V must come in from the Analog header (#2). 5V Power Indicater LED "PWR" located near the "L" LED.
9. FTDI FT232RL chip to connect Rx0/Tx0 to USB connector.  Rx0/Tx0 are also D0/D1 and connect to the shield. 4 holes adjacent are for 0.025"/0.1" pitch pins, intended to be used to  "bitbang" a bootloader in using the adjacent FT232RL chip.  (Pins shown pictured for testing only, jumper cable to ICSP header needed). Rx and Tx activity LEDs located adjacent to the chip.
10. USB-B Mini connector, connects Rx0/Tx0 to PC via FT232RL chip. USB's Vbus (5v) goes thru a 500mA polyfuse.
11.  3 pins with jumper to connect, or not, DTR from FT232RL chip to Reset capacitor.
12. Reset switch.
13. ICSP header pins for connecting AVR ICSP type bootloader, such as from MDFLY.com.
14. Holes for connecting 315/434MHZ type Rx or Tx module (one or the other), plus an antenna wire. Up to user to confirm that signals agree with their part.  If not, an adapter cable will be needed to match the pins (Vcc, Gnd, Antenna, and D9) to an offboard module. Intended to be used with VirtualWire.
15. 3.3V, 400mA regulator with thermal pad area (top & bottom), supplies the SD Socket only.
16.  74AC125 3.3V driver chip to convert ATMega SPI pins to 3.3V.   D30 (PD4) is dedicated to the SD socket chip select.
17. MAX232 driver chip for Rx1/Tx1.
18. Jumpers to connect MAX232 IO to Rx1/Tx1. Rx1/Tx1 are also D2/D3 and Int0/Int1 and connect to the shield.
19.  FCI push-push SD card socket (micro-SD with appropriate adapter). Works great with Fat16lib's SdFat library.  D30 must be set as ChipSelect.
20. 16 MHz crystal oscillator and 22pF caps.
21. RS232 header. Connect to DB9 Pins 2, 3, and 5 (Gnd) for RS232 operation. Requires jumpers (see #18) to be installed.
22. JTAG header.
23.  8-pin IO header, connects to PC0-7. Accessed as D22-D29.  PC0 and PC1 are also SCL & SDA.
24. Jumpers to select function connected to shield header pins A4/A5. One side connects A4/D18 and A5/D19, the other side connects SDA and SCL. Nothing connected if no jumpers are installed. 
25.  Female Analog header for shield. Extended 2 pins for A6/D20 and A7/D21.

(picture of board with arrows to features)
(picture of 10 boards, boards with ATMega installed have been bootloaded and have been checked out, the others have started testing and will ship less the 2 jumper fields noted unless requested otherwise).

PM me for details where to send Paypal payment and address to send card to. All cards will have all IO lines tested, RS232 serial interface tested, RTC tested, and SD card tested.  I expect to be bootloading and downloading sketches/testing all this week (and install a component or two more, think we were short a 16 MHz crystal and 4 header shields when we packed up).

(wow, that took a while to type up!)

Thanks!
Robert
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Aug 01, 2011, 05:05 pm
..can you show us Skyjumper's reflow oven, pls?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: bubulindo on Aug 01, 2011, 05:10 pm
Delicious... GREAT WORK!!!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: mmcp42 on Aug 01, 2011, 05:16 pm
excellent looking board
bet you're well pleased with self!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Aug 01, 2011, 06:31 pm
@pito,
I have some pictures, one might be the boards cooling in the oven. Will check when I get home.

@buulindo, mmcp42,

We sacrificed a bare board to make a  jig to hold the thru hole connecters straight for soldering,  makes the board look very sharp having everything all lined up nice & neat.
I am very pleased with the way the boards turned out. The FTDI chip has turned out to be a total pain in the ass, requiring touch up on every board. I think next go round will look into maybe putting paste down and no part for the oven reflow phase, then use hot air rework tool to clean up any shorts between pads, and then put the chip on. That's definitely not a hobby friendly package.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Aug 02, 2011, 06:31 am
@pito,
Turns out I Don't have pictures - only a shortcut to a desktop folder!  Blew that one. Will get them soon.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: skyjumper on Aug 02, 2011, 08:53 am

@pito,
Turns out I Don't have pictures - only a shortcut to a desktop folder!  Blew that one. Will get them soon.


Apparently that's my fault, sorry :-(

I'll shoot a pic of my oven and post it.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: leo72 on Aug 02, 2011, 07:06 pm
Hello Robert!
What a beautiful card!!! Awesome :smiley-eek:
Very very nice work.  ;)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Aug 03, 2011, 02:56 am
Thanks Leo. I translated another post, looking for "core files".
I have posted the changes I made to boards.txt and pins_arduino.c for the D0-D31 assignment to pins that I used, and to a SdFat library file also.
If folks there want to use the Sanguino files for the 644 that might be more straightforward.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Erik on Aug 06, 2011, 11:33 am
hi, i'm erik and been following the great work in this topic for a while because this board is exactly what i need, please tell me how to buy a board.
erik

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: cyclegadget on Aug 06, 2011, 11:36 am
Eric, read the last paragraph of CrossRoads's post.

PM me for details where to send Paypal payment and address to send card to. All cards will have all IO lines tested, RS232 serial interface tested, RTC tested, and SD card tested.  I expect to be bootloading and downloading sketches/testing all this week (and install a component or two more, think we were short a 16 MHz crystal and 4 header shields when we packed up).



Moderator edit: Trimmed the unnecessarily large quote.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Aug 06, 2011, 05:23 pm
Thanks Erik.
Let me investigate shipping costs to Europe.
Do I need to include a piece of paper in the shipment saying it is Not Leadfree?

Robert
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: stevemarple on Aug 17, 2011, 08:34 am
This looks like a very nice board. I'm sure there's a market for boards based around the 644P/1284P. I only found this thread recently, by which time I had already got a design for a shield-compatible strip board version using the 644P (http://blog.stevemarple.co.uk/2011/08/introducing-calunium-arduino-clone.html).
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Aug 17, 2011, 09:29 am
Yes, a small market. Have delivered 4 of them so far.
Search for "Hacking the uno" for how it started...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Erik on Aug 17, 2011, 09:56 am
Well unless one stumbles on this topic nobody knows of the existance of this Mega1284P Bobuino board, maybe a mail to http://hackaday.com/ (http://hackaday.com/) would draw the needed attention.
Erik
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: cyclegadget on Aug 17, 2011, 03:23 pm

  I received my board from CrossRoads a couple weeks ago. I think it very well built, and it is loaded with features! To name 2, the RTC clock, and the memory card slot would normally have to be bought separately and would take more room on an Uno. It has so many I/O's that to me, it is almost like the Mega!

In summary, I am very happy with my purchase and I will put the Bobuino to good use. It is a excellent platform to learn with and use in a future project!

Mark
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: brucethehoon on Aug 17, 2011, 11:56 pm
Crossroads,
Congrats on the board and the hackaday mention! 
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Aug 18, 2011, 06:52 am
Thanks!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: cowasaki on Sep 01, 2011, 09:38 pm
Bob,

Did you do anything with the software?  Step by step instructions for modifying the IDE?  Got my board working eventually, it's just a shame that there is no built in support.  It looks a great bit of kit though.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Sep 02, 2011, 02:04 am
What? I sent you an e-mail, same as the other folks who bought a board, with a document with directions needed to make it work - location of my zip file that has all the files I modified, example sketches, links to needed libraries.  I sent it a 2nd time when I updated it slightly. I hadn't  heard anything back from you, figured you were all set. The e-mails didn't bounce, so I assumed your e-mail was good.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: anon10500 on Sep 04, 2011, 03:27 pm
Are there any links in web or is it closed source? |Thanks
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Sep 05, 2011, 12:46 am
Links for the Bobuino?
There are these 2
http://www.crossroadsfencing.com/BobuinoRev17/
http://www.crossroadsfencing.com/BobuinoRev17/List%20of%20Bobuino%20Rev17%20features.pdf

The schematics & board layout have been posted in this thread several times as I worked stuff out.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: anon10500 on Sep 10, 2011, 11:47 pm
I read whole thread, so much info to consume. Anyway I see you have used the core files from avr-developers which is based on version 20, but I think you can also use the latest core from github, which seems to be named as Arduino 1, because Arduino devs merged the updates from avr-developers core. I try that one when I receive the stencils  :0 (not bobuino but a 1284p chip based board).
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Sep 11, 2011, 12:56 am
Please post how that works out, I am up for improvement if possible.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Nadir on Sep 11, 2011, 04:52 am
I made small modifications on version arduino-1.0-beta4 and it works well on my Atmega1284.

Board definition is;
Code: [Select]
atmega1284.name=Bobuino W/ ATmega1284P

atmega1284.upload.protocol=arduino
atmega1284.upload.maximum_size=131072
atmega1284.upload.speed=57600

atmega1284.bootloader.low_fuses=0xFF
atmega1284.bootloader.high_fuses=0xDC
atmega1284.bootloader.extended_fuses=0xFD
atmega1284.bootloader.path=sanguino
atmega1284.bootloader.file=ATmegaBOOT_168_atmega1284p.hex
atmega1284.bootloader.unlock_bits=0x3F
atmega1284.bootloader.lock_bits=0x0F

atmega1284.build.mcu=atmega1284p
atmega1284.build.f_cpu=16000000L
atmega1284.build.core=arduino
atmega1284.build.variant=Bobuino



pins_arduino.h file in folder "C:\arduino-1.0-beta4\hardware\arduino\variants\Bobuino"
Code: [Select]
/*
  pins_arduino.h - pin definitions for the Arduino board
  Part of Arduino / Wiring Lite

  Copyright (c) 2005 David A. Mellis

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General
  Public License along with this library; if not, write to the
  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  Boston, MA  02111-1307  USA

  $Id: pins_arduino.c 254 2007-04-20 23:17:38Z mellis $
*/

#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <avr/pgmspace.h>

#define NUM_DIGITAL_PINS            32
#define NUM_ANALOG_INPUTS           8
#define analogInputToDigitalPin(p)  ((p <   8) ? (p) + 24 : -1)
#define analogInputPinToBit(p)      ((P >= 24) ? (p) - 24 : -1)
#define digitalPinHasPWM(p)         ((p) == 3 || (p) == 4 || (p) == 12 || (p) == 13 || (p) == 14 || (p) == 15)

const static uint8_t SS   = 4;
const static uint8_t MOSI = 5;
const static uint8_t MISO = 6;
const static uint8_t SCK  = 7;

const static uint8_t SDA  = 17;
const static uint8_t SCL  = 16;
const static uint8_t LED  = 13;

const static uint8_t A0   = 24;
const static uint8_t A1   = 25;
const static uint8_t A2   = 26;
const static uint8_t A3   = 27;
const static uint8_t A4   = 28;
const static uint8_t A5   = 29;
const static uint8_t A6   = 30;
const static uint8_t A7   = 31;

//  Bit        7        6        5        4       3         2       1        0
// PCMSK3 = PCINT31, PCINT30, PCINT29, PCINT28, PCINT27, PCINT26, PCINT25, PCINT24
// Dg.Pin     15        14       13      12        11       10      9        8 PCICRBit = 1
// PCMSK2 = PCINT23, PCINT22, PCINT21, PCINT20, PCINT19, PCINT18, PCINT17, PCINT16
// Dg.Pin     23        22       21      20        19       18      17       16 PCICRBit = 2
// PCMSK1 = PCINT15, PCINT14, PCINT13, PCINT12, PCINT11, PCINT10, PCINT9,  PCINT8
// Dg.Pin     7         6         5       4        3         2      1         0 PCICRBit = 0
// PCMSK0 = PCINT7,  PCINT6,  PCINT5,  PCINT4,  PCINT3,  PCINT2,  PCINT1,  PCINT0
// Dg.Pin     31       30        29      28       27       26       25       24 PCICRBit = 3
#define digitalPinToPCICR(p)    (((p) >= 0 && (p) <= 31) ? (&PCICR) : ((uint8_t *)0))
#define digitalPinToPCICRbit(p) (((p) <= 7) ? 0 : (((p) <= 15) ? 1 : (((p) <= 23) ? 2 : 3)))
#define digitalPinToPCMSK(p)    (((p) <= 7) ? (&PCMSK1):(((p) <= 15) ? (&PCMSK3):(((p) <= 23) ? (&PCMSK2):(((p) <= 31) ? (&PCMSK0):((uint8_t *)0)))))
#define digitalPinToPCMSKbit(p) (((p) <= 7) ? (p) : (((p) <= 15) ? ((p) - 8) : (((p) <= 23) ? ((p) - 16) : ((p) - 24))))

#ifdef ARDUINO_MAIN

// ATMEL ATMEGA1284
//
//                      +---\/---+
//          (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 (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
//INT0 RX1 (D 10) PD2 16|        |25  PC3 (D 19) TMS
//INT1 TX1 (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
//                      +--------+
//

// these arrays map port names (e.g. port B) to the
// appropriate addresses for various functions (e.g. reading
// and writing)
const uint16_t PROGMEM port_to_mode_PGM[] = {
NOT_A_PORT,
(uint16_t) &DDRA,
(uint16_t) &DDRB,
(uint16_t) &DDRC,
(uint16_t) &DDRD,
};

const uint16_t PROGMEM port_to_output_PGM[] = {
NOT_A_PORT,
(uint16_t) &PORTA,
(uint16_t) &PORTB,
(uint16_t) &PORTC,
(uint16_t) &PORTD,
};

const uint16_t PROGMEM port_to_input_PGM[] = {
NOT_A_PORT,
(uint16_t) &PINA,
(uint16_t) &PINB,
(uint16_t) &PINC,
(uint16_t) &PIND,
};

const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
// PORTLIST
// -------------------------------------------
PB, // PB 0 **  0 ** D  0
PB, // PB 1 **  1 ** D  1
PB, // PB 2 **  2 ** D  2
PB, // PB 3 **  3 ** D  3 PWM
PB, // PB 4 **  4 ** D  4 PWM SS
PB, // PB 5 **  5 ** D  5 MOSI
PB, // PB 6 **  6 ** D  6 MISO
PB, // PB 7 **  7 ** D  7 SCK
PD, // PD 0 **  8 ** D  8 RX0
PD, // PD 1 **  9 ** D  9 TX0
PD, // PD 2 ** 10 ** D 10 RX1
PD, // PD 3 ** 11 ** D 11 TX1
PD, // PD 4 ** 12 ** D 12 PWM
PD, // PD 5 ** 13 ** D 13 PWM
PD, // PD 6 ** 14 ** D 14 PWM
PD, // PD 7 ** 15 ** D 15 PWM
PC, // PC 0 ** 16 ** D 16 SCL
PC, // PC 1 ** 17 ** D 17 SDA
PC, // PC 2 ** 18 ** D 18 TCK
PC, // PC 3 ** 19 ** D 19 TMS
PC, // PC 4 ** 20 ** D 20 TDO
PC, // PC 5 ** 21 ** D 21 TDI
PC, // PC 6 ** 22 ** D 22
PC, // PC 7 ** 23 ** D 23
PA, // PA 0 ** 24 ** D 24 AI 0
PA, // PA 1 ** 25 ** D 25 AI 1
PA, // PA 2 ** 26 ** D 26 AI 2
PA, // PA 3 ** 27 ** D 27 AI 3
PA, // PA 4 ** 28 ** D 28 AI 4
PA, // PA 5 ** 29 ** D 29 AI 5
PA, // PA 6 ** 30 ** D 30 AI 6
PA  // PA 7 ** 31 ** D 31 AI 7
};

const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] =
{
_BV(0), /*  0, PB0 */
_BV(1), /*  1, PB1 */
_BV(2), /*  2, PB2 */
_BV(3), /*  3, PB3 */
_BV(4), /*  4, PB4 */
_BV(5), /*  5, PB5 */
_BV(6), /*  6, PB6 */
_BV(7), /*  7, PB7 */
_BV(0), /*  8, PD0 */
_BV(1), /*  9, PD1 */
_BV(2), /* 10, PD2 */
_BV(3), /* 11, PD3 */
_BV(4), /* 12, PD4 */
_BV(5), /* 13, PD5 */
_BV(6), /* 14, PD6 */
_BV(7), /* 15, PD7 */
_BV(0), /* 16, PC0 */
_BV(1), /* 17, PC1 */
_BV(2), /* 18, PC2 */
_BV(3), /* 19, PC3 */
_BV(4), /* 20, PC4 */
_BV(5), /* 21, PC5 */
_BV(6), /* 22, PC6 */
_BV(7), /* 23, PC7 */
_BV(0), /* 24, PA0 */
_BV(1), /* 25, PA1 */
_BV(2), /* 26, PA2 */
_BV(3), /* 27, PA3 */
_BV(4), /* 28, PA4 */
_BV(5), /* 29, PA5 */
_BV(6), /* 30, PA6 */
_BV(7)  /* 31, PA7 */
};

const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
{
NOT_ON_TIMER, /* 0  - PB0 */
NOT_ON_TIMER, /* 1  - PB1 */
NOT_ON_TIMER, /* 2  - PB2 */
TIMER0A, /* 3  - PB3 */
TIMER0B, /* 4  - PB4 */
NOT_ON_TIMER, /* 5  - PB5 */
TIMER3A, /* 6  - PB6 */
TIMER3B, /* 7  - PB7 */
NOT_ON_TIMER, /* 8  - PD0 */
NOT_ON_TIMER, /* 9  - PD1 */
NOT_ON_TIMER, /* 10 - PD2 */
NOT_ON_TIMER, /* 11 - PD3 */
TIMER1B, /* 12 - PD4 */
TIMER1A, /* 13 - PD5 */
TIMER2B, /* 14 - PD6 */
TIMER2A, /* 15 - PD7 */
NOT_ON_TIMER, /* 16 - PC0 */
NOT_ON_TIMER, /* 17 - PC1 */
NOT_ON_TIMER, /* 18 - PC2 */
NOT_ON_TIMER, /* 19 - PC3 */
NOT_ON_TIMER, /* 20 - PC4 */
NOT_ON_TIMER, /* 21 - PC5 */
NOT_ON_TIMER, /* 22 - PC6 */
NOT_ON_TIMER, /* 23 - PC7 */
NOT_ON_TIMER, /* 24 - PA0 */
NOT_ON_TIMER, /* 25 - PA1 */
NOT_ON_TIMER, /* 26 - PA2 */
NOT_ON_TIMER, /* 27 - PA3 */
NOT_ON_TIMER, /* 28 - PA4 */
NOT_ON_TIMER, /* 29 - PA5 */
NOT_ON_TIMER, /* 30 - PA6 */
NOT_ON_TIMER /* 31 - PA7 */
};

#endif

#endif


And I added the two lines for Atmega1284 to wiring_analog.c
Code: [Select]
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
if (pin >= 54) pin -= 54; // allow for channel or pin numbers
#elif defined(__AVR_ATmega1284P__)
if (pin >= 24) pin -= 24; // allow for channel or pin numbers
#else
if (pin >= 14) pin -= 14; // allow for channel or pin numbers
#endif


And two lines to wiring_private.h
Code: [Select]
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#define EXTERNAL_NUM_INTERRUPTS 8
#elif defined(__AVR_ATmega1284P__)
#define EXTERNAL_NUM_INTERRUPTS 3
#else
#define EXTERNAL_NUM_INTERRUPTS 2
#endif
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Sep 11, 2011, 06:47 am
Ok, I could see using that - I'd have to make adjustments to make it match my usage:

Code: [Select]

// ATMEL ATMEGA1284P / BOBUINO
//
//                    +---\/---+
//  INT0 (D 4)  PB0  1|        |40  PA0 (AI 0 / D14)
//  INT1 (D 5)  PB1  2|        |39  PA1 (AI 1 / D15)
//  INT2 (D 6)  PB2  3|        |38  PA2 (AI 2 / D16)
//   PWM (D 7)  PB3  4|        |37  PA3 (AI 3 / D17)
//   PWM (D 10) PB4  5|        |36  PA4 (AI 4 / D18)
//  MOSI (D 11) PB5  6|        |35  PA5 (AI 5 / D19)
//  MISO (D 12) PB6  7|        |34  PA6 (AI 6 / D20)
//   SCK (D 13) PB7  8|        |33  PA7 (AI 7 / D21)
//              RST  9|        |32  AREF
//              VCC 10|        |31  GND
//              GND 11|        |30  AVCC
//            XTAL2 12|        |29  PC7 (D 29)
//            XTAL1 13|        |28  PC6 (D 28)
//  RX0 (D 0)   PD0 14|        |27  PC5 (D 27) TDI
//  TX0 (D 1)   PD1 15|        |26  PC4 (D 26) TDO
//  RX1 (D 2)   PD2 16|        |25  PC3 (D 25) TMS
//  TX1 (D 3)   PD3 17|        |24  PC2 (D 24) TCK
//  PWM (D 30)  PD4 18|        |23  PC1 (D 23) SDA
//  PWM (D 8 )  PD5 19|        |22  PC0 (D 22) SCL
//  PWM (D 9)   PD6 20|        |21  PD7 (D 31) PWM
//                   +--------+
//
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: anon10500 on Sep 11, 2011, 11:57 am
@Nadir

Thank you very much, you even included Timer 3

Edit: Could you upload ATmegaBOOT_168_atmega1284p.hex somewhere? thanks
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Nadir on Sep 11, 2011, 02:22 pm
The link is http://code.google.com/p/brewtroller/downloads/detail?name=Sanguino1284P.zip&can=2&q= (http://code.google.com/p/brewtroller/downloads/detail?name=Sanguino1284P.zip&can=2&q=) which I have downloaded.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Sep 11, 2011, 04:35 pm
Sure,
http://www.crossroadsfencing.com/BobuinoRev17/ATmegaBOOT_1284P_16MHz.hex

Right-click, save target as, renameto .hex
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pito on Sep 12, 2011, 09:06 pm
Quote
Hi, any experience with the newest sdfat (multiple cards support) and two sdcards connected?
Thx.

No, I don't have a board with 2 sockets. Yet.
The first build only supports 1, the 2nd had incorrect uSD socket pinouts.
Have Rev 2 designed, but no cards purchased. Will handlle one of SD or uSD on either side of the board.

Suppose I could try an Adafruit shield for a 2nd one as a test.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: anon10500 on Sep 14, 2011, 01:51 am
Meh bootloader does not work:
Code: [Select]
avrdude: stk500_getsync(): not in sync: resp=0x00

Actually my device is 8MHz so I installed WinAVR and compiled bootloader code (from brewtroller) but no avail...

Programmer is FTDI breakout.

EDIT: Turns out common ground is needed for board and ftdi breakout. Also I attached 8Mhz bootloader which works at baudrate 38400.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: Zapro on Sep 16, 2011, 11:41 pm
Call me blind, but i cannot find the PCB layout for this exact board:

(http://www.crossroadsfencing.com/OnTargetMarineRPN4revB.jpg)

It's wonderfull, and i would like to toy a little with the layout ;-)

// Per.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Sep 17, 2011, 05:26 am
Ok, you are blind!
Layout is not posted, that was a paid job I did, I had permission to post the picture.
You can send a PM to skyjumper to ask him for the layout.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: madhunm on Oct 13, 2011, 10:28 pm
Hello all,

After reading through the 29 pages of this thread, and about another 50+ pages of other threads, I am still at a loss to understand how to bootload my '1284 based dev board.

I would really appreciate it if someone could please share a working bootloaders for the '1284 that works at 16MHz and 20MHz (I understand different bootloaders are needed)?

Thanks in advance,

Regards,
Madhu.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Oct 14, 2011, 04:49 am
I don't know about 20 MHz, but arduino bootloaders will work at 16 MHz.

Check out the core files here for 1284's.

www.avr-developers.com

skyjumper made this bootloader for me.
(right-click, save-target-as, rename to .hex if need to).

Then get yourself an AVR ISP such as this to load the bootloader into it.

http://www.mdfly.com/index.php?main_page=product_info&cPath=5&products_id=415

add these 2 lines to programmers.txt to use it in the IDE. Tools:Burn Bootloader: w/ MDFLY
Code: [Select]

usbasp.name=MDFLY
usbasp.protocol=usbasp


and add a section like this in boards.txt
Code: [Select]

##############################################################
atmega1284p.name=Arduino-Bobuino 1284p      <<< this will show up in the IDE boards list

atmega1284p.upload.protocol=stk500
atmega1284p.upload.maximum_size=129024
atmega1284p.upload.speed=38400

atmega1284p.bootloader.low_fuses=0xFF
atmega1284p.bootloader.high_fuses=0xDC
atmega1284p.bootloader.extended_fuses=0xFD
atmega1284p.bootloader.path=Bobuino              <<< change to your path
atmega1284p.bootloader.file=ATmegaBOOT_1284P_16MHz.hex
atmega1284p.bootloader.unlock_bits=0x3F
atmega1284p.bootloader.lock_bits=0x0F

atmega1284p.build.mcu=atmega1284p
atmega1284p.build.f_cpu=16000000L
atmega1284p.build.core=arduino


Can you follow all that?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: madhunm on Oct 14, 2011, 03:19 pm
Hi Crossroads,

Thanks a million for all this. I was able to make changes to reflect my programmer in the IDE (AVR910).

I also replaced the pins_arduino.C with the one you have created and that it works fine.

Thank you so much yet again,
Madhu.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: maniacbug on Nov 12, 2011, 05:33 am

Sure,
http://www.crossroadsfencing.com/BobuinoRev17/ATmegaBOOT_1284P_16MHz.hex

Right-click, save target as, renameto .hex


Hey, is the source for this bootloader available?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Nov 12, 2011, 09:25 am
Need to ask Skyjumper for that, he has the source and the makefiles and what not.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Dec 18, 2011, 05:38 pm
Quote from: CrossRoads link=topic=61126.msg568492#msg568492

Check out the core files here for 1284's.

www.avr-developers.com


Is there a list of files needed strictly for the 1284p, rather then the complete package for all the processors?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 18, 2011, 05:52 pm
Not that I know of.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Dec 18, 2011, 07:40 pm
Are there any plain basic 1284 boards with UNO foot print? The Bobuino is cool but way more features then I need. Essentially need UNO foot print, more RAM then 328 offers and shield compatibility. Be connecting Ethernet shield and a GSM shield. Much prefer on board USB over external FTDI.

I have an UNO32 which is PIC32 based. Great little board and compatible with shields. But libraries have quite a few gaps. What I am doing should be fairly simple to due with Arduino environment. Right now seems much less of a path of resistance then delving into MPLAB and Microchip Ethernet stack.

But with the RAM requirement exceeding what the 328 has to offer the 1284 is an appealing choice. I've looked at adding SPI RAM or FRAM, but I'd rather have less parts count.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 18, 2011, 07:55 pm
You want a bare Bobuino board & just populate the parts you need?
Leave off the SD parts, RTC, extra IO pins, etc.
I could order a batch of PCBs, you build up what you  need.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: stevemarple on Dec 18, 2011, 08:19 pm

Are there any plain basic 1284 boards with UNO foot print? The Bobuino is cool but way more features then I need. Essentially need UNO foot print, more RAM then 328 offers and shield compatibility. Be connecting Ethernet shield and a GSM shield. Much prefer on board USB over external FTDI.


The only board I know of with the Uno footprint is this one, http://www.thaieasyelec.net/index.php/Arduino/ATmega32-Dev-Board-Arduino-Diecimila-Compatible-DIP-28-DIP-40-/p_133.html, but it's out of stock and the corresponding Thai page seems to indicate it has been "retired", http://www.thaieasyelec.com/Development-Board/Arduino/Dev-Board/Arduino-Diecimila-Compatible-DIP-28-DIP-40-ATmega32.html.

If you want something that's fully shield compatible (including the location of the ISP header - essential for using the Ethernet shield) then I think my Calunium (http://blog.stevemarple.co.uk/2011/11/calunium-pcb-version.html) board is the only other option. The footprint is similar to the Mega2560 footprint (same length, a bit wider). All the files and software are available on Github (https://github.com/stevemarple/Calunium) under a CC license. I had 10 PCBs made by Iteadsutdio (http://iteadstudio.com/store/index.php?main_page=product_info&cPath=19_20&products_id=175) for $25, and delivery was just $5. You only need to populate a few and the cost each is about the same as the Uno. You will need an FTDI cable.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Dec 18, 2011, 10:46 pm

The only board I know of with the Uno footprint is this one, http://www.thaieasyelec.net/index.php/Arduino/ATmega32-Dev-Board-Arduino-Diecimila-Compatible-DIP-28-DIP-40-/p_133.html, but it's out of stock


This is certainly a very interesting board. Too bad it is no longer available.


You want a bare Bobuino board & just populate the parts you need? I could order a batch of PCBs, you build up what you  need.


Thank you for the offer. But the board is quite a bit larger then what I would like. I will spend some time on whipping up a board. See how rusty my Eagle skills are. If it becomes too much effort I might just take you up on that offer.

Reading various post here and on hackaday there appears some interest in a much more basic 1284p board. Perhaps doing it would be a worthwhile effort. I also though of creating a very basic vinciDuino or Leonardo clone. Not that I need one but just for practice as it would be low parts count and low cost.

As for USB connectivity with the 1284p, are there any reasons to prefer a mega8u2 (or is it mega8u4?) over a FTDI chip? I think the FTDI chip works out to be about double the cost, at least in very small quantities.

Also, I prefer TQFP over DIP. I tend to not socket DIP but solder them straight to the board in most cases, especially with in circuit programming.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 19, 2011, 01:18 am
So what you want is a simplified version of this board I did for skyjumper then.
(http://www.crossroadsfencing.com/OnTargetMarineRPN4revB.jpg)
or this, haven't done the pins_arduino.h file changes yet, this design was made to be pin compatible with existing shields unlike the new Leonardo, which appears to have been designed for ease of routing, with the hardware ports all broken up.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Dec 19, 2011, 01:39 am
On the Leonardo clone I'd like to do away with external power, only USB. Perhaps as simple as it gets while still having shield compatibility. Yes, I noticed the unusual pin assignment on Leonardo. No surewhat to do there just yet.

On the 1284p I am thinking a whole lot simpler as well.The TQFP 1284p and either an AVR USB TQFP or FTDI for USB. Simple power switching via jumper. Maybe a switching buck converter instead of LDO linear. Have used small integrated switchers a lot in the past. They do work very well, IMHO. Depending on space could allow for either. No idea yet if or how to break out the additional IO pins. I don't need them but then for future might be nice to have them.

Hoping to have time to work on things this week. Having a Christmas break is nice and this design stuff is nothing but a hobby. Actually have a couple of amateur radio needs that got me started. But the GSM shield distracted from the original goal. Have this in my mind instead.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 19, 2011, 01:50 am
ATMega32U4 with USB only power, like this then.

Haven't stripped down a 1284 yet, would take me a few minutes.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 19, 2011, 08:21 am
Okay, I've been doing some tinkering.
Here's a schematic & layout for a DIP based Duemilanove style 366/644/1284 board.
Its intended to have the 1284  mounted on socket strips, so there are a couple of caps underneath the part.
http://www.dipmicro.com/store/HDR40X1FM
(http://www.dipmicro.com/img/1/HDR40X1FM.jpg)

I'll do a version with a surface mount part also

If there is interest, I'll spring for a batch of 10 or 20 PCBs, and folks can obtain their owm material and build them as they wish.

The IO pins are as defined for my Bobuino, I'll post the files for that too, designed to be fully shield compatible.
The extra IO of the 1284 series are brought out to another connector. The Analog header has all 8 Analog inputs as well.
Jumper blocks: 
USB power or onboard regulator power. Regulator may  be surface mount, or thru hole part may be used.
Reset - jumper for reset from FTDI, or leave it open for no reset.
I2C: Jumper to have A4/A5 go to shield, or have SCL/SDA go to shield. SCL/SDA also available on the extra IO header.

There is an onboard 3.3V regulator as well, don't have to rely on the 50mA from the FTDI chip.

Board is a little longer then an UNO, due to the bigger chip.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: westfw on Dec 19, 2011, 09:34 am
Doesn't have the ISP connector in the right place, as required by ethernet shield (was that a requirement, or a suggestion by one of the responders?)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 19, 2011, 02:59 pm
Yeah, that could be a problem accomodating with the big chip.  I'll give it a shot tonight.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Dec 30, 2011, 07:30 pm
Well, I cooked up a board. The things a break at Christmas is good for. :)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 30, 2011, 08:07 pm
Where are the other IO pins?

I don't know where I posted it in here (or maybe I forgot) but I've the DIP version done with the ICSP relocated, SCL/SDA option in the new spot, and a 10 pin header for the extra IO pins.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: maniacbug on Dec 30, 2011, 08:09 pm

Well, I cooked up a board. The things a break at Christmas is good for. :)


Cool...  I want one  :smiley-mr-green:  

Hey but can you break out the rest of the pins??  You could make a 2-wide header that goes along an edge, kind of like Maple.

What is the big pad around U1 for?  A heat sink?  
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Dec 30, 2011, 09:19 pm
My primary objective for the 1284P is to get the additional RAM (and code space). Also needed to maintain the traditional Arduino dimensions and header locations, including ICSP. There is more then enough IO on an ATmega328 for my purposes.

When I thought out the board I made some compromises. The 32u4 board I did has a lot of empty space. Could have easily placed a regulator and just choose to not populate if not needed. Once my prototype is tested I just might re-spin with that.

For this board, I ended up with plenty of free space as well. I decided to add a regulator, not thinking of the available IO. In retrospect it may have been more sensitive to dump the regulator in favor of an additional header for the additional available IO. Or could have tried squeezing a bit more. But there is also a time constraint, really needed to get this done, more so then the 32u4 which was just a learning exercise.

So all considered, it is built with my particular specifications in mind. Once I get the boards in my hands might re-spin them anyways. Need to iron out whatever bugs I discover. Also depends if there is any larger interest in the two designs I did. For the 32u4 it would most certainly make sense to add a regulator, there is just so much empty space on the board. For the 1284p I'd be more inclined to drop the regulator and add a header for I/O. We shall see....

Right now I am just tickled by how easy it is to get prototype boards made. I've been pretty absent from this stuff since 2005 or so. Last board I made was a PIC based ethernet board. DIP chips and mix of 0805 and through hole parts. A single sided PCB made at home using toner transfer. Was looking at commercial boards, but cost then was much more for a single prototype run then it is today. If I remember correctly, back then the best deal I found was in excess of $50 for 2 boards. This may have been a bare board without silk screen too. Maybe I didn't look hard enough back then, but I don't think BatchPCB, Seeed Studio or DorkbotPDX were around those days. Anyways,  I have been pretty anxious to get a couple of interesting boards whipped up and getting them made. Now I need to wait for the mail man. :)

*man... How many times do I have to edit my post to fix the iPad typos? The auto correct of the iPad is as much of a curse as it is a blessing...
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Dec 30, 2011, 09:31 pm

Cool...  I want one  :smiley-mr-green:  

Hey but can you break out the rest of the pins??  You could make a 2-wide header that goes along an edge, kind of like Maple.

What is the big pad around U1 for?  A heat sink?  


Yes, played with a heat sink. My first time relying on board copper for heat sink. Used TO-220 and heavy duty metal in the past. So this board is a bit of an experiment to try a few things, and to keep a couple of projects moving that need more RAM then the 328 has to offer.

Will be playing with the board some more based on the outcome of the prototype and any suggestions and ideas I receive here.

I committed this one to being made. I'll be getting 10 boards in the mail. I only need 2. If the first build doesn't go up in smoke there'll be a few bare boards I am gladly willing to pass along.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 30, 2011, 09:42 pm
I've been using iteadstudio and buying 10, 20, 50 boards.
5cm x 5cm, $9.90
10cm x 10cm, $24.90
Shipping to east coast US  has been $5, about 3 weeks.
There pics at my signature link. Very good quality boards.

Keep seeing these guys in elektor magazine:

http://www.apcircuits.com/
might be worth looking into if in a hurry

I tried a quote, thinking of the '32U4 design that is kicking around elsewhere:
Two 1.5 x 0.75" boards, $19.60

"Basic Service: No soldermasks, no legends. Will ship the next business day."

Plus shipping:

"FEDEX is our EXCLUSIVE carrier. There is a minimum charge of $25.00 that covers most Prototype orders."

So that's a drawback!
Minimum sizes are also bigger that what iteadstudio will support:
trace width, trace spacing, hole sizes.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Dec 30, 2011, 09:50 pm

I've been using iteadstudio and buying 10, 20, 50 boards.
5cm x 5cm, $9.90
10cm x 10cm, $24.90
Shipping to east coast US  has been $5, about 3 weeks.
There pics at my signature link. Very good quality boards.


I ordered from Seeed Studios or FusionPCB. Did not know of iteadstudio. Looks like both have the same cost for boards, but shipping to Canada is $5 with iteadstudio and I paid $8. Not a dramatic difference, huge difference compared to BatchPCB or any other North American offer I have come across.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: stevemarple on Dec 30, 2011, 09:53 pm

My primary objective for the 1284P is to get the additional RAM (and code space). Also needed to maintain the traditional Arduino dimensions and header locations, including ICSP. There is more then enough IO on an ATmega328 for my purposes.
...
So all considered, it is built with my particular specifications in mind.


It looks good, different from Bob's (Crossroad's) Bobuino and also my Calunium, so between us there are a range of options for using the ATmega1284. I hope that somehow we can all collaborate to get the Arduino software fixed so that the SD and other libraries don't make assumptions over pin mapping but use the proper pin-mapping mechanisms implemented in v1.0.

How did you estimate the area needed for the PCB heatsink?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Dec 30, 2011, 09:56 pm

How did you estimate the area needed for the PCB heatsink?


Very unsophisticated.... just used the available space to maximum practical extend.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 30, 2011, 10:04 pm
Apcircuits: 80mm x 100mm - $73.

I think www.internationalcircuits.com will do 10 inch x 10 inch protoboards for $105 or similar.
Site says 10% discount for online orders too. skyjumper has been using them, they did yellow board at my signature link.
Got another board to post there also when I get home.

Regarding this:
"use the proper pin-mapping mechanisms implemented in v1.0"
I haven't looked at whats implemented for 324/644/1284, but I do know I disagree with pin mappings used for 32U4/Leonardo, compatibility with older shields disregarded and didn't need to be. Seems to be easier with the Variants folder now to implement a different mapping, need to look into that more.

Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Dec 30, 2011, 10:14 pm
Quote
Seems to be easier with the Variants folder now to implement a different mapping, need to look into that more.


I will have to figure that one out. It seems one can define everything there is to a custom board and place it in the sketches folder. No need to modify any of the original Arduino distributed file. I sure hope that is how it works.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: stevemarple on Dec 30, 2011, 10:14 pm

I've been using iteadstudio and buying 10, 20, 50 boards.
5cm x 5cm, $9.90
10cm x 10cm, $24.90


I second Iteadstudio (http://iteadstudio.com/store/). I've used them twice now and been happy on both occasions. To maximise yield I used more conservative design rules than the 8/8 mil they recommend. Rounded corners and cut-outs are supported.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: stevemarple on Dec 30, 2011, 10:27 pm

Quote
Seems to be easier with the Variants folder now to implement a different mapping, need to look into that more.


I will have to figure that one out. It seems one can define everything there is to a custom board and place it in the sketches folder. No need to modify any of the original Arduino distributed file. I sure hope that is how it works.


That's the theory. In practice some libraries make assumptions about the pin mapping based on microcontroller type. The SD library has its own pin mapping tables, for the ATmega1284 it assumes the Sanguino pin mapping. :( I've forked (https://github.com/stevemarple/Arduino) the Arduino software on Github to get the my mapping used for the SD library. I've tried to replace this mapping table by the Variants one, but haven't yet succeeded. It seems that the pin mapping tables in Variants are only included when compiling the sketch.ino file, and not when associated libraries are compiled (see the #ifdef ARDUINO_MAIN compiler conditional in the standard pins_arduino.h files).
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 31, 2011, 01:04 am
"The SD library has its own pin mapping tables, for the ATmega1284 it assumes the Sanguino pin mapping. "
So as long as you keep SS, MOSI, MISO,SCK as D10, 11,12,13, there is no problem.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 31, 2011, 01:39 am
Here's the 1284DIP layout I worked up.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Dec 31, 2011, 01:54 am

Here's the 1284DIP layout I worked up.


I think a lot of people like DIP. At least I noticed that there is a lot of asking for DIP versions whenever there's an interesting chip only in SMD. Personally I prefer SMD for anything with more then  28 pins. The DIP-40 seems a bit unwieldy. But that is just me....
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: maniacbug on Dec 31, 2011, 02:49 am

Here's the 1284DIP layout I worked up.


This is quite nice!  What do you suppose the BOM cost is on this layout?   $) $) $)

I was wondering about the DIP, too.  Curious why you put the MCU in as a DIP when everything else is SMD?

What is the X3 header for?

Are those totally independent LED's for application use on 22 & 23?  If so, that's awesome.

(Sorry for the rainbow, my son is 'helping' me with this post...)
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 31, 2011, 06:07 am
Don't know, wouldn't be bad.
ATMega1284 <$6 at Mouser.
10 boards ~$25 from itead studio
caps, resistors, leds in the pennies each range.
ft232rl $4.50
headers, shop around
power connector, crystal, can be had from dipmicro.com like 30 cents each
regulators are like 65 cents

Put in DIP cause that's the part that  usually get smoked! Also folks can do development, programming, pull it out & build into standalone item.
X3 lets FT232 be used to bitbang a bootloader into the part
http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html
Can likely be left off with wide availabilty of AVR programmers such as
http://www.mdfly.com/index.php?main_page=product_info&cPath=5&products_id=415

Looks like plenty of room that thruhole parts could be used for many parts instead, make assembly easier.
FTDI chip only available as SMD.
The Rx/Tx LEDs are driven by the FTDI chip, user does not have control there.
I've often thought of just leaving the FTDI chip & part off and gluing a part like this onto the board instead,
http://www.ebay.com/itm/USB-2-0-TTL-UART-6PIN-Module-Serial-Converter-CP2102-/290643946254?pt=LH_DefaultDomain_0&hash=item43abbaab0e
(Hey look at that, right from Boston too)
that would lower the cost as well.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: maniacbug on Dec 31, 2011, 06:55 am

I've often thought of just leaving the FTDI chip & part off and gluing a part like this onto the board instead,
http://www.ebay.com/itm/USB-2-0-TTL-UART-6PIN-Module-Serial-Converter-CP2102-/290643946254?pt=LH_DefaultDomain_0&hash=item43abbaab0e
(Hey look at that, right from Boston too)
that would lower the cost as well.


Wow that's cheap!  Yeah, I would leave it off.  The normal route is get an FTDI cable or a breakout board from Sparkfun.  The thing is, you only need as many FTDI chips as you want to have units connected to the computer at once.  Putting them on every board is BOM waste, IMO.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Dec 31, 2011, 08:32 am
Unexpectedly I did have more time to work on this today. Added a 5x2 header for the IO I had not brought out. Also added a jumper for selection of power source, instead of shottky diode.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: stevemarple on Dec 31, 2011, 04:56 pm

"The SD library has its own pin mapping tables, for the ATmega1284 it assumes the Sanguino pin mapping. "
So as long as you keep SS, MOSI, MISO,SCK as D10, 11,12,13, there is no problem.


Are you sure? Your Bobuino_directions.doc file states: "And finally download & install the SdFat library
http://code.google.com/p/sdfatlib/downloads/detail?name=sdfatlib20110702.zip&can=2&q=
and use  this file C:\Arduino-0022\libraries\SdFat\Sd2PinMap.h". Your Bobuino17.zip file contains a modified Sd2PinMap.h file with a Bobuino-specific mapping. Maybe you've forgotten about these changes?

Actually I made a mistake in my post, I used the '644 initially and the SD library does assume the Sanguino mapping (http://sanguino.cc/useit) in this case. There's no specific mapping in Sd2PinMap.h for the ATmega1284, it falls back to using the mapping for the ATmega328, ie SPI on D10-D13 (ie PORTB2-PORTB5). The ATmega1284 needs PORTB4-PORTB7.

Either way some modification to SD/utility/Sd2PinMap.h is needed.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Dec 31, 2011, 09:16 pm
Huh! I totally forgot about that.
You're right, I copied the Sanguino portion and redid it for my '1284 usage, and commented '1284 out of the Sanguino part:
Code: [Select]

#elif defined(__AVR_ATmega1284P__)
// add this if use these other chips
// ||defined(__AVR_ATmega644P__) || defined(__AVR_ATmega324P__)

// ATMEL ATMEGA1284P / BOBUINO
//
// Make it agree with the as-built hardware & pins_arduino.c
//
//                      +---\/---+
//  INT0 (D 4)  PB0  1|        |40  PA0 (AI 0 / D14)
//  INT1 (D 5)  PB1  2|        |39  PA1 (AI 1 / D15)
//  INT2 (D 6)  PB2  3|        |38  PA2 (AI 2 / D16)
//   PWM (D 7)  PB3  4|        |37  PA3 (AI 3 / D17)
//   PWM (D 10) PB4  5|        |36  PA4 (AI 4 / D18)
//  MOSI (D 11) PB5  6|        |35  PA5 (AI 5 / D19)
//  MISO (D 12) PB6  7|        |34  PA6 (AI 6 / D21)
//   SCK (D 13) PB7  8|        |33  PA7 (AI 7 / D22)
//              RST  9|        |32  AREF
//              VCC 10|        |31  GND
//              GND 11|        |30  AVCC
//            XTAL2 12|        |29  PC7 (D 29)
//            XTAL1 13|        |28  PC6 (D 28)
//  RX0 (D 0)   PD0 14|        |27  PC5 (D 27) TDI
//  TX0 (D 1)   PD1 15|        |26  PC4 (D 26) TDO
//  RX1 (D 2)   PD2 16|        |25  PC3 (D 25) TMS
//  TX1 (D 3)   PD3 17|        |24  PC2 (D 24) TCK
//  PWM (D 30)  PD4 18|        |23  PC1 (D 23) SDA
//  PWM (D 8 )  PD5 19|        |22  PC0 (D 22) SCL
//  PWM (D 9)   PD6 20|        |21  PD7 (D 31) PWM
//                    +--------+
//


and
Code: [Select]

// SPI port
   uint8_t const SS_PIN =   10;  // physical 5, D 10  SS
   uint8_t const MOSI_PIN = 11;  // physical 6, D 11  MOSI
   uint8_t const MISO_PIN = 12;  // physical 7, D 12  MISO
   uint8_t const SCK_PIN =  13;  // physical 8, D 13  SCK


vs this modified portion for Sanguino, where the D#s for the pins do not follow the Arduino at all

Code: [Select]

#elif defined(__AVR_ATmega644P__)||\
      defined(__AVR_ATmega644__)
// || defined(__AVR_ATmega1284P__)
// Sanguino

// SPI port
uint8_t const SS_PIN = 4;
uint8_t const MOSI_PIN = 5;
uint8_t const MISO_PIN = 6;
uint8_t const SCK_PIN = 7;













Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: adilinden on Jan 20, 2012, 06:45 am
Got my boards... today another version of my 1284p creation arrived. This is version 0.2 without the additional IO pins brought out to a non-standard header.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: fm on Jan 21, 2012, 12:01 am
Well, that board just looks great! Let us know how it goes!
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Mar 06, 2012, 07:46 am
'1284 DIP version of Duemilanove with options for USB/Serial interface PCB is ready!
Will take shields, and has 2 hardware serial ports and 12 additional IO (2 more analog/digital, 10 digital) than a '328.
Can have an FTDI Basic/FTDI Cable plugged temporarily plugged on for downloading sketches,
Can have one of these from Mouser put on for permanent use
http://www.mouser.com/ProductDetail/mikroElektronika/MIKROE-483/?qs=sGAEpiMZZMuNcqZxhMNT3znYT0k8AsjH
or none at all, up to the user.
The '1284 pins are broken out per maniacbugs Arduino mod here, select Bobuino as the board type.
https://github.com/maniacbug/mighty-1284p
Only a couple of surface mount parts - the regulators and the USB polyfuse.
50 boards available if you want some.
Prices shipped to US locations, mailed in letter size envelopes for qtys 1, 2, 3, and small boxes in qty 4 & above due to size & stacked thickness.

1-lot $4.50
2-lot $6.75
3-lot $9.25
5-lot $17.00
10-lot $28.25

International, will have to check.
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: pixelatedpic on Feb 03, 2014, 07:42 pm
hi,
nice work and i am also trying to boot load atmega1284p. Can i get the boot loader?
Title: Re: ATMEL Mega1284P evaluation board avalible
Post by: CrossRoads on Feb 03, 2014, 07:48 pm
Will post a file when I get homr.