Show Posts
Pages: 1 2 [3] 4 5 ... 57
31  Using Arduino / Programming Questions / Re: SoftwareSerial problem , but only on 1284p on: March 30, 2013, 01:18:46 am
I made a lot of progress...

As I mentioned, I had modified the SoftwareSerial library under Arduino v0.22 to work with what at the time we called the Sanguino which was based on the 644P, and has the same pin out as the 1284P.

maniacBug had released his 1284P support, and I had asked him to do a version that matched the pin out nomenclature of the AVR Developers 1284P support, which he did. So i don;t know if the issue I had related to the Maniacbug 1284P or the AVR Dvelopers 1284P, but I'll get to the bottom of it.

In case anyone is interested, the changes I made are in pins_arduino.h. I have not checked yet to make sure i didn't break anything else. I suspect I probably did, but we'll see.

Here is the original:

Code:
#define digitalPinToPCICR(p)    (((p) >= 0 && (p) < NUM_DIGITAL_PINS) ? (&PCICR) : ((uint8_t *)0))
#define digitalPinToPCICRbit(p) (((p) <= 7) ? 1 : (((p) <= 15) ? 3 : (((p) <= 23) ? 2 : 0)))
#define digitalPinToPCMSK(p)    (((p) <= 7) ? (&PCMSK2) : (((p) <= 13) ? (&PCMSK0) : (((p) <= 21) ? (&PCMSK1) : ((uint8_t *)0))))
#define digitalPinToPCMSKbit(p) ((p) % 8)

Here are my changes:

Code:
#define digitalPinToPCICR(p)    (((p) >= 0 && (p) <= 31) ? (&PCICR) : ((uint8_t *)0))
#define digitalPinToPCICRbit(p) (((p) <= 7) ? 1 : (((p) <= 15) ? 3 : (((p) <= 23) ? 2 : 0)))
#define digitalPinToPCMSK(p)    (((p) <= 7) ? (&PCMSK1) : (((p) <= 15) ? (&PCMSK3) : (((p) <= 23) ? (&PCMSK2) : (((p) <= 31) ? (&PCMSK0) : ((uint8_t *)0)))))
#define digitalPinToPCMSKbit(p) (((p) <= 7) ? (p) : (((p) <= 15) ? ((p) - 8) : (((p) <= 23) ? ((p) - 16) : ((p) - 24))))
32  Using Arduino / Programming Questions / Re: SoftwareSerial problem , but only on 1284p on: March 30, 2013, 12:35:55 am
I suspect this related to pin change interrupts. I now recall that I had to modify the original SoftwareSerial library to support the 1284P, so I'm now chasing this in the new library :-(
33  Using Arduino / Programming Questions / SoftwareSerial problem , but only on 1284p on: March 30, 2013, 12:02:32 am
Hi All...

I am playing with the Seed Studio Bluetooth shield, bought up the road at Radio Shack. I am testing it on two different boards, an Uno and my own 1284P board.

On the Uno, the code below works well, letting me exchange text with my Android phone.

On the 1284P board, I can send text to the phone, but data sent from the phone is not displayed on the terminal, leading me to believe that it is not actually being received.

I have checked the schematic and verified that the pins are correct. I even reversed which were the TX and RX pins, and of course rejumpered the shield, and the problem remained the same, indicating that there is not a hardware problem. I have also tried it with and without the internal pullup enabled.

Any ideas?

Thanks...

Code:
#include <SoftwareSerial.h>   //Software Serial Port

// Use these for 1284P board
#define RxD 14
#define TxD 15

// Use these for Uno
//#define RxD 6
//#define TxD 7

#define DEBUG_ENABLED  1
 
SoftwareSerial blueToothSerial(RxD,TxD);
 
void setup()
{
  Serial.begin(9600);

  pinMode(RxD, INPUT);
  digitalWrite(RxD, HIGH); // enable pullup

  pinMode(TxD, OUTPUT);
 
  setupBlueToothConnection();
}
 
void loop()
{
  char recvChar;

  while(1){
    if(blueToothSerial.available()){//check if there's any data sent from the remote bluetooth shield
      recvChar = blueToothSerial.read();
      Serial.print(recvChar);
    }
    if(Serial.available()){//check if there's any data sent from the local serial terminal, you can add the other applications here
      recvChar  = Serial.read();
      blueToothSerial.print(recvChar);
    }
  }
}
 
void setupBlueToothConnection()
{
  blueToothSerial.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400
  blueToothSerial.print("\r\n+STWMOD=0\r\n"); //set the bluetooth work in slave mode
  blueToothSerial.print("\r\n+STNA=SeeedBTSlave\r\n"); //set the bluetooth name as "SeeedBTSlave"
  blueToothSerial.print("\r\n+STOAUT=1\r\n"); // Permit Paired device to connect me
  blueToothSerial.print("\r\n+STAUTO=0\r\n"); // Auto-connection should be forbidden here
  delay(2000); // This delay is required.
  blueToothSerial.print("\r\n+INQ=1\r\n"); //make the slave bluetooth inquirable
  Serial.println("The slave bluetooth is inquirable!");
  delay(2000); // This delay is required.
  blueToothSerial.flush();
}
34  Using Arduino / Project Guidance / Re: Looking for Bluetooth shield that uses I2C or SPI on: March 29, 2013, 03:00:20 pm

Really?
35  Using Arduino / Project Guidance / Looking for Bluetooth shield that uses I2C or SPI on: March 29, 2013, 02:37:42 pm
Hi All...

I have been searching for an Arduino bluetooth shield that uses either SPI or I2C to talk to the Arduino board. So far all I have been able to find are shield that use either the hardware UART or a few GPIO pins and SoftwareSerial.

Does anyone know of a BT shield that uses I2C or SPI?

Thanks...

36  Using Arduino / General Electronics / Force a sealed device to restart - Ideas? on: March 27, 2013, 02:41:26 am
Hi All...

I have a device with an ARM Cortex M3 processor sealed in plastic, and its firmware is stuck in an infinite loop. There is no way to reset it without breaking it open, which will destroy it. Any ideas on how to stop it so when it comes back on it can restart? Maybe freeze spray? The battery will eventually run dead, but tis going to be a while...
37  Using Arduino / Microcontrollers / Re: Problem with custom Atmega2560 board, cannot use FT232 for Serial comms on: March 18, 2013, 04:37:10 pm

I have them set to newline right now, but that is really for when you hit the Send button. That doesn't apply to something like the ASCIItable sketch.

It could... The ASCII table sketch write line after line of text, so if you had a CR but not a NL I can see it just overwriting the top line over and over, with the last line being blank and the display output possibly being subject to how the terminal app buffers. I usually do CRLF but a NL should at least dump text upward as it wraps around. So that should be good.


38  Using Arduino / Microcontrollers / Re: Problem with custom Atmega2560 board, cannot use FT232 for Serial comms on: March 18, 2013, 03:54:34 pm
One more simple thing to check, and I realize Nick you really know your stuff so I hesitate to ask, but have you tried to change the end of line conventions? Unix (Mac) and Windows use different EOL conventions. So try making sure you get a CR and a LF after each line? I read your post again and this really feels like a terminal issue on the Mac,
39  Using Arduino / Microcontrollers / Re: Problem with custom Atmega2560 board, cannot use FT232 for Serial comms on: March 18, 2013, 03:49:59 pm
Nick, can you tell us what your fuses are set to? I have a circuit (designed by the same guy) that works perfectly using the exact same chips.
40  Using Arduino / Microcontrollers / Re: Does optiboot handle loading of files > 64KB correctly? on: January 20, 2013, 04:45:50 pm
Any one have a link(s) to very large size arduino sketches ( say 100KB and 200KB that don't rely on using PROGMEM to attain their large size?

I think mine is 80k or 90k, not sure. I have not looked in a while. It uses very little PROGMEM. I can send it to you.
41  Using Arduino / Microcontrollers / Re: Does optiboot handle loading of files > 64KB correctly? on: January 20, 2013, 04:08:19 pm
Actually, as I dig deep into the dark recesses of my memory (a scary place) I do seem to recall that this was an issue with Optiboot and westfw and I had some communication about it, and it was fixed. I'll review my email, but I suggest you (1) make sure you have the latest optibiit and (2) review its source for comments about this issue. I'll do the same.
42  Using Arduino / Microcontrollers / Re: Does optiboot handle loading of files > 64KB correctly? on: January 20, 2013, 04:03:55 pm

The issue is testing loading of very large test sketches into boards such as the 1284P boards of different flavors and into arduino mega1280/2560 boards which don't have a modern opitboot bootloaders.

Lefty, what does that mean, "modern optiboot bootloaders" ?

My app (sketch) is much bigger than half the flash space in a 1284P and uses PROGMEM quite a bit. Optiboot loads and runs it perfectly.
43  Using Arduino / Project Guidance / Re: What radio transceiver best meets these requirements? on: January 18, 2013, 03:47:46 pm
Well if the transmitter is just beaconing or repeatedly sending the same telemetry at fixed intervals, maybe every several seconds, and 1/3 of the packets get through, this is very acceptable. The idea is to send small packets of data and although an acknowledgement is very nice it may not be feasible under all conditions.

Fixed receiver does imply on shore, so I worded that badly. The receiver could be on a boat or on shore but typically will be within a few miles of the transmitter.

The key to this thing is small and watertight. An external antenna both potentially compromises water tightness and gets in the way. A 440MHz antenna is about 4 inches long, although there might be a way to design it so it is inside the enclosure.

To the poster who suggested deploying a balloon, that's a very cool idea, thanks!
44  Using Arduino / Project Guidance / Re: What radio transceiver best meets these requirements? on: January 18, 2013, 02:10:40 pm
Waves are a problem. The receiving antenna will typically be 45 to 50 feet above the surface. Radio at ~480 MHz will have a better chance of making it through than 2.4GHz, but needs more power. But also, as the device floats, it will find itself at the top of the wave as often as at the bottom.
 
45  Using Arduino / Project Guidance / Re: What radio transceiver best meets these requirements? on: January 18, 2013, 05:31:22 am
Yeah its a big challenge. Especially since I think the 480MHz might be the only global band available. And as you said, that means big antennas. I could live with 2 to 3 miles if I have to, but even that may not be doable.

Although, I believe that 480 MHz might be compatible with antennas used for near field communication... I realize the bigger the antenna the better (dipole vs 1/4 wave, 1/4 wave vs 1/8 wave and so on).
Pages: 1 2 [3] 4 5 ... 57