I guess I could but I haven't been able to test this one on hardware. It takes some effort of course and I am a slow programmer/coder. I am trying to learn/get up to speed on these things. I want to also spend some time with the Android developers site. It's all new to me this android stuff.
is it possible to include pin14 and 15 to pin change interupt by adding them to code like this:
I'm trying to use pin 15 (rx3) for Softserial Rx on Mega....
is it possible to include pin14 and 15 to pin change interupt by adding them to code like this:
I'm trying to use pin 15 (rx3) for Softserial Rx on Mega....
Why on earth would you use software serial on a pin that supports HW serial?
That code is part of pins_arduino.h, you shouldn't be messing in there.
The 2561 has two serial ports, Serial and Serial1, can't you change your code to use one of those?
Otherwise, use AltSoftwareSerial or NeoSoftwareSerial on the pins for PORTB which have PCINT on them. (AltSoftSerial or NeoSoftSerial ? names are something like those)
Or maybe PORTD bits 0,1,2,3 for INTs 0,1,2,3, or PORTE bits 4,5,6,7 for INTs 4,5,6,7.
If you're using a Mega, then Serial, Serial1, Serial2, and Serial3 are all available. Software serial should be a last resort.
I have been working with what StanK posted (and Crossroads here and on an older thread) with good results on my 2561 custom board. I have tested:
Uart0
Uart1
Digital pins
ADC
I have had some trouble with the digital pins of port A appearing on port C and vice versa. Also A4 to A7 i.e port F, have a constant high voltage (5V) - this also appears on the ADC value and is like the internal pull up is enabled. The first 4 pins of port F i.e A0, A1, A2 and A3 work OK for ADC and digital.
Had some trouble with serial data not clocking properly so checked the clock fuses in boards.txt and updated the fuses and works great.
For all external clock sources I updated to:
low_fuses=0xff
high_fuses=0x99
while on the fuse calculator page I checked the internal clock sources and updated internal fuses to:
low_fuses=0xe2
high_fuses=0xd6
Note I have only checked the 16Mhz.
Have run software serial and attachedInterupt for pin change interrupt at the same time. With above fuse change the board uploads bootloader and can use the serial port programming also (with capacitor between DTR and reset).
You don't want those fuse settings for the external clock.
For the low fuse setting, you want tu use the full swing oscillator option. It drives the external oscillator with a little more power, resulting in a more stable and noise immune clock. Use 0xF7 for the low fuse.
For the high fuse; you probably don't need JTAG enabled. Boot flash section size does not need to be more than 512 words to fit Optiboot in there, and you do want to enable the boot reset vector. Do you want the EEPROM to be erased every time you upload something new? Probably not. Use 0xD6 for the high fuse.