I hope this isn't a repeat. I saw a similar post, but it was talking about the Leonardo and I'm curious if the same applies.
I'm working on a project that I thought might be a little easier to do on the Mega as the amount of pins and memory was greater and I didn't know what it would take.
I'm new to all this programming, Arduino, the whole 9 yards. But I'm curious if I were to hook up my SeeedStudio SD Card shield to the ICSP header, would that in turn free up pins 10-13 for more available pins for sensors? Ultimately, I would like to put this project onto the Uno, but once I throw in an RTC and a temp sensor,... As is, I have 4 available digital pins left and 5 analog. I know the temp sensor will go on the Analog end of it, but I keep expanding my idea as time goes on, so I want to make this as tight as possible.
On a '328P based card, 11-12-13, MOSI, MISO, SCK - are connected to the ICSP header.
You don't gain any pins.
Since they are the SPI pins tho, you can connect other SPI devices in parallel (like an SPI based RTC (vs I2C) ) and control it with another chip select line.
A4/A5 are the I2C pins.
All the analog pins can also be used as digital pins (A0-A5 are D14-D19).
xKoldFuzionx:
Ultimately, I would like to put this project onto the Uno, but once I throw in an RTC and a temp sensor,... As is, I have 4 available digital pins left and 5 analog. I know the temp sensor will go on the Analog end of it, but I keep expanding my idea as time goes on, so I want to make this as tight as possible.
If you start with a Mega, you might as well stay with a Mega. They don't cost much more, and trying to make it as tight as possible is probably a fatal mistake.
Unos can do a good job of handling a lot of not very much but I suspect you are you are working towards a little of a lot. In that event, it's not the pins that are the problem, it's the memory. As you add a clock, an SD card, etc., you add libraries. As a result, your 13k project transforms into a 33k project with amazing speed - and then you are either stuffed, or glad you've got a Mega.
CrossRoads:
On a '328P based card, 11-12-13, MOSI, MISO, SCK - are connected to the ICSP header.
You don't gain any pins.
Since they are the SPI pins tho, you can connect other SPI devices in parallel (like an SPI based RTC (vs I2C) ) and control it with another chip select line.
A4/A5 are the I2C pins.
All the analog pins can also be used as digital pins (A0-A5 are D14-D19).
Yeah, I was aware of the Analog pins able to be used as Digital, as well as the PWM pins being able to be used as Analog. So, I don't gain pins, and because of that, I would assume if I have say an SD shield hooked up to ICSP and nothing on 11,12,13, SS, that I wouldn't be able to use those pins individually for anything else. For instance if I wanted to use the LED on 13, it would interfere with the ICSP. Sorry if that is just repeating what you just said, I just want to make sure I understand so I'm on the same page with no confusion.
Obviously, the SS pin would have to be dedicated to that shield I'm trying to use.
Nick_Pyner:
If you start with a Mega, you might as well stay with a Mega. They don't cost much more, and trying to make it as tight as possible is probably a fatal mistake.
Unos can do a good job of handling a lot of not very much but I suspect you are you are working towards a little of a lot. In that event, it's not the pins that are the problem, it's the memory. As you add a clock, an SD card, etc., you add libraries. As a result, your 13k project transforms into a 33k project with amazing speed - and then you are either stuffed, or glad you've got a Mega.
My only concern was 1) getting a hold of a Mega chip, and 2) Surface mounting that chip to a board. I don't have much soldering experience. So the through hole of the 328P makes things a little easier. I like the idea of making things smaller and being able to fit all the extras on an SMD board, but but I look back to when I was a child and remember tearing apart radios, wondering how they worked. Maybe it's just me, but the old way of doing things seems more reliable. Through hole designs seemed to last longer than these SMD designs of today. Everything is built as a throw-away and I don't like that.
Maybe some of it is quality. Almost 30 years ago, people actually cared about the product they built and wanted it to last, knowing the consumer wanted it to last. If something you built broke in a month-6 months, the consumer would most likely NOT buy your product again. I know things have changed, but I guess as long as I buy quality parts, that would help too.
Another option is ATMega1284 - 32 IO, 128K flash, 16K SRAM (twice that of Mega2560), dual hardware serial.
DIP component, so easy to work with. http://www.crossroadsfencing.com/BobuinoRev17/
I have kits with onboard USB/Serial module as an option, or use male pins and connect an off-board FTDI Basic/compatible USB/Serial for downloading sketches when USB is not needed for an embeedded use.
CrossRoads:
Another option is ATMega1284 - 32 IO, 128K flash, 16K SRAM (twice that of Mega2560), dual hardware serial.
DIP component, so easy to work with. Cross Roads Electronics
I have kits with onboard USB/Serial module as an option, or use male pins and connect an off-board FTDI Basic/compatible USB/Serial for downloading sketches when USB is not needed for an embeedded use.
How much for that kit with components? I was looking at a Due, but again, the surface mount part kinda makes me nervous. Eventually, I'd like to learn to surface mount, but I like the idea also of being able to just swap out the IC if I need to. I could always program new code and then just swap the chip for an update, especially while testing it in the field. Would be much more convenient to swap the chip than pull the whole thing and lose testing time.
As I say at the website:
"Bare boards $5. Kits less the MIKROE-483 USB module $22, most folks go with offboard FTDI module to 6-pin header. $5.25 for USPS mailing to US address.
Assembled boards available upon request."
$10 more for the MIKROE-483. I have kits on hand, and I think 1 '483 module (I usually keep a few on hand, need to order some more I guess).
paypal to cardinalflyer at comcast dot net.
CrossRoads:
As I say at the website:
"Bare boards $5. Kits less the MIKROE-483 USB module $22, most folks go with offboard FTDI module to 6-pin header. $5.25 for USPS mailing to US address.
Assembled boards available upon request."
$10 more for the MIKROE-483. I have kits on hand, and I think 1 '483 module (I usually keep a few on hand, need to order some more I guess).
paypal to cardinalflyer at comcast dot net.
Most likely, I'll go with the kit minus the USB module. I think I'd like to use the 6-pin header as I'd like to try that.
Might be a little bit, I'm in-between jobs right now, but this is on the top of my list as soon as I get the money. I saved that link with you're email on it, so I will definitely hit you up as soon as I can. 16k RAM, huh? I can only imagine how quickly that will speed things up! LOL, I can't wait.
Right now, with the Mega, I'm taking pics and saving the data in just under 10 secs. To me, that's lightning fast, but with your board, it's gonna be like the speed of light!
I bought the 1284Ps as a 25 lot, brought the chip cost down to something like $5.25, $5.50.
Same with the rest of the kit - 25 kits, bulk buy to try & keep the overall cost down.
The 1284 has the same 8-bit core as the 2560, the larger SRAM should help if you are manipulating a large amount of data.
Ok, not too bad then. I only ask, cuz eventually I will have to build the circuit from the ground up to eliminate the board. So I'm just trying to keep tabs on pricing so I can order all this stuff when I get a working product.
I'm only transferring about 46k - 51k. So, not doing a lot, but enough to see a significant difference, IMO anyways.