Show Posts
Pages: 1 [2] 3 4 ... 15
16  Development / Other Software Development / Re: Mods to HardwareSerial to handle 9-bit data on: February 19, 2012, 05:24:36 am
I am curious would it be difficult to change to 7-bit data? In some automotive applications I am lead to believe they use 7-bit but, don't quote me on that.
If you want 5 - 8 bits of serial data, have you considered this library?

It replaces the existing HardwareSerial and it's quite a bit faster and has configurable buffer sizes (transmit and receive).

http://arduino.cc/forum/index.php/topic,85207.0.html

Iain
17  Development / Other Software Development / Re: An alternative Serial Library for Arduino 1.0 on: February 19, 2012, 05:16:47 am
I played around with this when the library was first posted, trying to understand how it all worked.

The problem is not including HardwareSerial.h but using Serial, Serial1 etc.

The first time you call Serial.begin() you will pull in all the code in HardwareSerial. If you reference a library that calls Serial.print() etc you will also pull in the HardwareSerial code.

If it's your library that's causing the problem, the easiest fix is to add a variable to your library:

Code:
Stream* activeSerialPort;

and initialise it in setup()

Code:
#include <MyLib.h>

void setup()
{
  Serial.begin(115200);
  activeSerialPort = &Serial;
}

or if you switch to SerialPort:

Code:
#include <MyLib.h>
#include <SerialPort.h>

SerialPort<0, 64, 64> serialPort;

void setup()
{
  serialPort.begin(115200);
  activeSerialPort = &serialPort;
}

HardwareSerial and SerialPort inherit from Stream, so it just works. Remember that any calls in your library will change from Serial.print() to activeSerialPort->print() etc.

Hope that helps.

Iain
18  Using Arduino / Microcontrollers / Re: Can EEPROM be written via ISP without overwriting/impacting flash on: February 18, 2012, 04:50:26 am
Quote
What is automatically generated by the toolset and where does it get its input and in what format?

An EEP file.  It has the same format as a HEX file but is intended to be uploaded to EEPROM instead of Flash.  The "input" is from all variables marked with "EEMEM".

Ah! EEMEM. Didn't know about that. I guess it's like PROGMEM (which I did know about) but for EEPROM.

Thanks very much.

Iain
19  Using Arduino / Microcontrollers / Re: Can EEPROM be written via ISP without overwriting/impacting flash on: February 18, 2012, 03:29:43 am
A note of interest: The toolset is capable of automatically generating an EEPROM image.  The Arduino IDE does not support the feature so you will have to perform the last two steps from the command-line.
Could you expand on this please?

What is automatically generated by the toolset and where does it get its input and in what format?

Iain
20  Community / Website and Forum / Re: Update my Email Address on: January 31, 2012, 12:13:06 pm
On the top bar click on "Main site", and when you see the main page, click on "Profile".
On the profile page you should see a "change" link just on the left of the email.
Yes I can see that, now I know :-)

Quote
This is a UX design flaw that will be fixed with the next website redesign.
Thanks for explaining why.

Iain
21  Community / Website and Forum / Re: Update my Email Address on: January 31, 2012, 10:59:19 am
I couldn't see how to do this either. It's pretty odd. Perhaps the only way is to sign up again :-(
22  Development / Other Software Development / Re: Visual Micro - Arduino for Visual Studio on: January 30, 2012, 07:16:57 pm
Only 1 slight problem... If you don't have the latest and greatest in computers, then Visual Studio 2010 takes all day to get anything done. It is another piece of Microsoft bloatware.(for the record - I am a VB6 and Visual Studio 2000 user) I tried running VS 2010, and AVR Studio 5 and found them both to be agonizingly slow. Visual Studio 2008 isn't much better.

My experience with Visual Studio is that it needs LOTS of RAM.

Years ago when I upgraded from NT4 to Windows 2000 I had to upgrade my laptop's memory from 128MB to 256MB. Windows 2000 took more RAM and Visual Studio 6 no longer had enough memory to fit.

Similarly with Visual Studio 2008 I had to upgrade another laptop, from 1GB to 2GB this time, to prevent swapping and poor performance.

I found a good deal on ebay for second hand memory for my 7 year old laptop smiley

Perhaps your PC has insufficient RAM to run VS2010?

Iain
23  Using Arduino / Networking, Protocols, and Devices / Re: New I2C library available on: January 30, 2012, 04:42:44 pm
This allows me to print all device ID's s on the bus without a call to serial in the lib itself. Furthermore you can control the range of the scan process by making it parameterized.

But if you really must to write out messages in a library, require the caller to supply a Stream* parameter. That way, the caller can decide where the messages go.

Iain
24  Using Arduino / Displays / Re: Arduino Mega 1280 with LCD SG12864J4 on: January 25, 2012, 02:22:30 pm
Your wiring is wrong. You're following the tutorial for a completely different type of LCD. The tutorial you're following is for a character based LCD and you have a graphical LCD.

Assuming your GLCD module is KS0108 compatible, you need to download this library an follow the instructions in the documentation. That will get you a circuit that should work, assuming you've not already damaged your GLCD panel.

http://code.google.com/p/glcd-arduino/downloads/list

Iain
25  Development / Other Software Development / Re: Windows/Linux Eclipse plugin to compile and upload arduino sketches on: January 20, 2012, 03:38:43 pm
LiquidCrystal is one of the standard libraries supplied with Arduino v1.0 (and earlier I believe).

Iain
26  Development / Suggestions for the Arduino Project / Re: Delegate system for member function pointers on: January 19, 2012, 02:57:05 am
The problem is that "regular" C callbacks do not carry any state information. All class member functions have an implicit "this" parameter which means they can't be called by a C callback. Using delegates gets round the problem as it creates a callback that captures the "this" parameter.

It allows you to callback to a specific object. If you had a Mega with 4 serial ports in use, a C callback couldn't differentiate between the four serial ports but a delegate could, as it will capture the "this" parameter identifying which serial port it's related to.

Iain
27  Development / Suggestions for the Arduino Project / Re: Delegate system for member function pointers on: January 18, 2012, 01:29:00 pm
I'll make it a arduino lib with an example attached and post it for download in this thread. I'll try to get this done before the weekend.

Excellent. I look forward to trying it out.

Iain
28  Using Arduino / Microcontrollers / Re: New optiboot; beta testers welcome... on: January 18, 2012, 04:39:03 am
The optiboot website says Mega support coming soon. Does the current version support Megas? I'm really after faster uploads as it seems to take ages to program and my code is only 20k in size.

Iain
29  Using Arduino / Networking, Protocols, and Devices / Re: Very basic SPI (and C++?) questions on: January 16, 2012, 08:20:20 am
Paul,

Have you done a clean install with v1.0?

I did last month and I'm getting all the warnings, including unsigned / signed comparisons. I gather that if you upgrade it doesn't enable the warnings.

They seem to have fixed a lot of the library code so you only get a warning from Tone.cpp but I've "fixed" that in my library (http://arduino.cc/forum/index.php/topic,85840).

Iain
30  Development / Suggestions for the Arduino Project / Re: Delegate system for member function pointers on: January 16, 2012, 04:43:31 am
You've got to be using classes to want this. If you were, you'd know why it's useful.
Pages: 1 [2] 3 4 ... 15