Hi ... I want to extend the number of pins by connecting two arduino mega togather to control alot of led from one arduino ..... please any one can reply ??
That is a very poor way of getting extra pins. It is a common beginners mistake to think this is the answer.
You want to use either shift registers or port expanders to get extra I/O pins.
Shift register: 1USD(maybe less)/(8-3) pins = 0.2 usd per extra pin
Mega: 45 USD/(54-3) pins = 0.88 usd per extra pin
Please can you tell me how to connect it with arduino and how to programme it ??
I mean by ( it ) the ( port expander ) .
This is one of many port expanders
Connecting multiple microcontrollers is done by RX and TX (although as everyone mentioned its not very good) - TX of board A is connected to RX of board B and RX of board A is connected to TX of board B . Arduino mega has (I think) 3 pairs of RX TX .
Ok thank you guys
I want 1024 pins in only one arduino mega can I do it with mcp23017 IC ??
hsalame:
I want 1024 pins in only one arduino mega can I do it with mcp23017 IC ??
Oh come on don't be silly. You are a beginner, that is not a beginners requirement.
It means you need 64 of the port expander chips. As you can only have 8 addresses you will need to address them in 8 separate banks of 8.
Sure it can be done but not until you learn a hell of a lot more about electronics than you know now. Things don't scale up simply you know. And the skill level needed is way above your pay grade.
Ok ... how many I2C pins are there in arduino mega and where are them ?? ..... and how can I connect eight ( mcp23017 IC ) togather ??
hsalame:
Ok ... how many I2C pins are there in arduino mega and where are them ?? ..... and how can I connect eight ( mcp23017 IC ) togather ??
Arduino Mega schematic, there is the info. Research about I2C protocol, it allows to share one bus of information with many IC simultaneously.
You should do some research before asking, these information is available all over the internet, just ask specific questions. If you want real consulting service then you should pay someone to do your job.
hsalame:
Ok ... how many I2C pins are there in arduino mega and where are them ?? ..... and how can I connect eight ( mcp23017 IC ) togather ??
There is only one set of I2C pins, clock and data.
You can connect eight MCP23017 chips to this one set. On each MCP23017 there are three address lines. You wire them to +5V and ground so that no two chips has the same pattern. This gives each one a unique address.
However you wanted 1024 I/O pins. If you were to say why you wanted this many then there is a good chance that there are other techniques than simply using I/O pins.
There could be a way of getting that (absurd!) amount of I/O....
Connect 8 PCA9547 to an I2C bus, and then connect 8 PCA9555 on each bus multiplexer...
A PCA9555 hold 16 I/O, times 8 on each PCA9547, times 8 PCA9547 equals 1024 I/O!
But i'm not gonna touch that with a lightsaber!
Just wondering/pondering... WHY would you need 1024 I/O? And how did you think you could do this with 2 mega's?
That is what I was suggesting in reply #9
Grumpy_Mike:
That is what I was suggesting in reply #9
Well my apologies. In my youthful enthusiasm of "thinking I know something" I overlooked the contents of your post.
Glad my crazy idea wasn't all that bad (-ish).
I want 1024 I/O pins to connect them with 1024 led ... my project Created from 4 led on each board ( red , green , yellow and blue ) and I want 256 board ... when I send serial HIGH Value for any led the others led will get LOW value
hsalame:
I want 1024 I/O pins to connect them with 1024 led ... my project Created from 4 led on each board ( red , green , yellow and blue ) and I want 256 board ... when I send serial HIGH Value for any led the others led will get LOW value
So you don't want 1024 I/O pins, you want a 1024 port LED driver (combination).
Replace the PCA9555 with the PCA9635 then.
Word of caution: With 1024 LED's, each with about 15mA (Example) equals 15.36A when all lit... just saying...
Ok ... could you send me the circuit with arduino mega ? XD
hsalame:
Ok ... could you send me the circuit with arduino mega ? XD
I could, but it's against my principals.
Thing is, especially with I2C, is that there are many examples on the internet and on the forum.
When you ask for someone else to do all the work, you'll never learn.
When you find out how to do something yourself, you'll never forget.