I'm thinking about buying some Arduino development kits to migrate from my actual development platform (picaxe) to Arduino. I want to buy just what I need to develop my next project, but taking in consideration that I am a total ignorant of the Arduino capabilities I have some issues trying to decide what to buy. So I decided to explain you what I want to do and what I think I need (in terms of hardware) hoping to have some feedbacks.
Ok the idea is simple, over the serial cable my computer (or USBtoserial) I will send some commands to my Arduino Uno board: these commands are composed of several bits (defined in my own protocol); anyway, after my Arduino has received this commands it will take some actions, at the moment the only action that matters is to send a word to other Arduinos connected to a communication bus (need to decide if I2C, serial or TTL). This word is composed of 1000 bits, the firsts 8 bits are just the header (containing the address of the chip that will receive the data) and rest is just data (the actual length of this word is always fixed to 1000 bits).
So in summary this is what I will do:
For example, from the PC, I send the command over the serial cable: 110110111010101010011…….01101. This goes to the Arduino board who resend it to the communication bus where all the other micro controllers are always listening to the bus, they will read the first 8 bits and compares them to their own address: if it matches the micro controller address (stored in a variable), it will store the next bits on memory (if the power goes off I don’t need to save the informations, so it could be a volatile memory).
After that the micro will be waiting for a future command that will eventually tell him to output the data bits over an output pin. All the micro will only save one word of 1000 minus 8 bits at the time, so the memory is fixed for just 9992 bits.
I'm having problems to decide which small microcontroller to use, which communication protocol to use and some issues with the software. Taking is consideration that the distance between the first micro and the last one could be up to 7 meters I think that I2C is not the way to go, serial will be great but that means that I will need a serial to ttl converter on each micro (take in consideration that they could be up to 128 micros) so that can make the project to go out of my budget, TTL will be great but I never tried a communication via TLL over 7 meters, what do you think? I think a good cable will not drop so much voltage in 7 meters, also the speed I thinking to use is max 19200bits/s.
About the micros, my biggest concern is to choose the cheapest alternative because they will only receive data in one pin (serial data) saved in a volatile memory, and then output that data at a fixed rate over an output pin (to light up and off a led for example). I saw on internet that you could program the ATtiny with the arduino board, is this chip capable of doing what I need? Do I need an external memory to store the data? Or I can save it on a variable? (what memory you suggest?)
And my final question is about software, when I was using PicAxe, a very simple development kit for microcontrollers when I need to store a word over a serial input I just make this:
serin serpin,N2400,(27),seraddr, b4,b5
Where serin is the command to begin the serial acquisition, serpin is the number of the input pin I want to use and b4 and b5 are four bits variables so using they two I have a 8 bits word. The PicAxe platform is fixed with 10 4 bits vars (b0,b1…….b9) so it will be imposible to store a 1000 bits word without passing the information to an external memory. With the Attiny I can store that amount of data on a program var? What is the maximum I can store? At the point do you still think the attiny is the way to go?
Thanks so much for any feedback and suggestion!