can I use SoftwareSerial on ATmega 1284P ? if so whats are the pins that I should use ?
2 Hardware serial ports aren't enough?
Are there restrictions on the pins needed for software serial?
http://arduino.cc/en/Reference/SoftwareSerial It says that..
The library has the following known limitations:
If using multiple software serial ports, only one can receive data at a time. Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69). Not all pins on the Leonardo support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
I need to use MAX485 to communicate via RS485, it didn't work with the hardware serial even in mega 2560 board. but works on above pins in Mega 2560
There are 3 hardware interrupts on the 1284P, and all pins support PCINTs, Pin Change Interrupts.
I checked this but my RS485 Module Doesn't work with any pins. I think that this is already use 2 hardware interrupts pins as Hardware Serial.
I'am using this for RS485
kasun: can I use SoftwareSerial on ATmega 1284P ? if so whats are the pins that I should use ?
any io pins can be used for soft serial. its only necessary to tell the routines youve chosen what pins to use.
there are many other advantages to using soft serial too. in addition to pin conflicts it allows fine tuning baud better than uart and makes possible other configurations like idle low polarity or odd bit counts. in fact in some cases you can emulate rs485 without need for the special hardware in your photo. simple connect two io bits directly.