Choosing the right atmega IC

Hi guys.
I was building my prototype on arduino mega 2560.
im in the stage where im starting to build my own board and i don`t need to use all of the 100 pin 2560 IC.

In my project i`m going to use 5v supply.
14 digital inputs
8 digital outputs
6 analog inputs
3pwn inputs
5(pwn?)inputs for lcd
TX/RX for communication with another IC.( if needed)

in total i need something around 36 I/0 in standalone mode meaning thet the 8 outputs will come from the chip,
or 24 if use with remote chip like atmega 168 with connected thru serial.
Can someone recommend something??

Any help is much appreciated.

Sounds like an atmega2560 would be ideal but are you up to the task of mounting it yourself?

Another option is the atmega328 but you'd have to use a bit of imagination to make better use of the I/O pins. With a little external logic you can use shift registers for your output and also use the same pins for input.

But I have to ask PWM Input? What's that about :slight_smile:

but are you up to the task of mounting it yourself?

yes i have the ability to work with smd smt and bga.

But I have to ask PWM Input? What's that about :slight_smile:

i should clarify. do i need PWM for lcd pins?? or standard I/O will work as well.

atmega 2560 is way to big. my project is in size of smart phone.
size is important.

mOskit:
yes i have the ability to work with smd smt and bga.
i should clarify. do i need PWM for lcd pins?? or standard I/O will work as well.

The only thing I've ever seen PWM used for with LCD is to dim the back light through software. You could include a pot to allow the light level to be adjusted, or simply use passive resistors if you just want to setup the level once and forget about it. You could also save a few pins by using an I2C backpack for the LCD.

atmega 2560 is way to big. my project is in size of smart phone.
size is important.

By the time you've added the extra logic I alluded to in my last post, anything else is going to be even bigger. Just use the pins you want and leave the rest unconnected. If you want to save a bit of power you can include pinMode(unusedPin, INPUT_PULLUP) for every pin you've left disconnected.

isnt there any atmega that has 64 legs?? im checking atmel website... there is a lot to choose from.My thoughts are... if i choose anything else, will i still be able to use arduino IDE to program.
I bought jtagice3 as well on auction but i`m to stupid yet to change enviroment. :slight_smile: heh

in any case, i saw on ebay 30pcs atmega 2560 for £147, thats about £5 each. if it will be to much hassle ill stay with it. unless i choose remote ic as well that ill use something else. i don`t want to use 16core wire and plug in such small case unless i use hdmi plug and socket(they are 19pins).
do you have any other option for connector?? slim connector?? my solenoid driver will be about 3,5 away from controller

ATMEGA128-16AU this is the chip i would like to use with hope that i can program it with arduino ide

mOskit:
ATMEGA128-16AU this is the chip i would like to use with hope that i can program it with arduino ide

I'm pretty sure you can but you'll likely have to download the core files for it.

A quick google and I find that there's a link Here for them.

Just out of curiosity I downloaded them and checked in the IDE. The problem I now have is that the list of boards I now have available is so long that it doesn't fit on the screen. So if I choose a board near the bottom of the list I can't see what I'm picking :slight_smile:

so this is it?? just the core file for chip i want and of you go??
I`ll check that as soon as i finish moving to another flat(hater) :slight_smile:

Are you able to check if any code compile with atmega128 or any other than what arduino puts on there boards?

Hmm.

No not quite. The trouble is there are issues with library support for it. Even some of the core libraries are just not written to accept that chip. I've tried compiling one of my typical sketches with it and there are issues. To be honest I just don't know how much work would be involved in getting it up and running. A lot would depend which library files you're using.

Look
http://www.chip45.com/products/crumbuino-128_arduino_compatible_atmega128_module_board_usb.php

they saying

the module can directly be used with the Arduino IDE as an e.g. Arduino Mega 2560 board.

Since the Arduino Software does not yet offer support for an ATmega128, we provide an extension to the Arduino Software. After installation you can select the Crumbuino-128 as target board and use it as usual.