15 Commits

Author SHA1 Message Date
Andrew Gillham
0f81002bde Update firmware version to v0.07 in metadata. 2013-02-08 12:43:28 -08:00
Andrew Gillham
fb3aca55a0 Bump to v0.07 2013-02-08 12:42:29 -08:00
Andrew Gillham
851b7e0735 Add firmware version to metadata
Return the firmware version to the Logic Sniffer extended SUMP protocol
metadata request.  Now you can see what version is loaded on your
device.
2013-02-08 12:41:26 -08:00
Andrew Gillham
b1a43e57c7 Update device profile clockspeed.
The Mega also runs as 16MHz so update device.clockspeed to match.
2013-01-28 11:15:16 -08:00
Andrew Gillham
1f418098b2 Update device profile clockspeed & portdelay.
Set clock speed to 16MHz.  Hopefully this value works fine with the
client since the previous 100MHz was not the actual clockspeed anyway.
Also, adjust the device.open.portdelay to 1500ms.  People can test
their own device for the fastest value, but this should be a safer
default for most people and hopefully eliminates som frustration for
first time users.
2013-01-28 11:12:07 -08:00
Andrew Gillham
34aea7435d Update device profiles.
Add the 'device.receive.timeout' values required by the latest
LogicSniffer client application.
2013-01-28 10:58:23 -08:00
Andrew Gillham
f51d0bbb96 Improve pre-trigger sampling on below 500kHz sample rates.
The sample loop was not padded properly in the loop waiting for the
trigger to fire. As a result it was sampling at a much higher rate than
the post trigger sample rate.  I've added some delays and padded it out
a bit, it needs further measurement, but is usable now.
2012-02-27 14:36:17 -08:00
gillham
3a6329775c Merge pull request #3 from scottp/master
Correct long standing bug in the device profiles on github where the data was being reversed by the client due to the reverseOrder setting.  The sketch returns the data in the sampled order, but the client appears to expect it reversed, so the sense of the setting is backwards. Data is in the correct order based on a simple test program, even though the setting is "wrong".  Invert the comment as well.  Also increase the delay on the Mega as it doesn't always respond fast enough. Patches from scottp.
2012-02-27 12:27:45 -08:00
Scott Penrose
3c69ec10a1 ols.profile-*: Reverse IO order received in config
Fixed reverseOrder and comments

As per this post:
http://dangerousprototypes.com/forum/viewtopic.php?f=57&t=2432

The comment talking about device.samples.reverseOrder is reversed. I have
fixed the order and the comment and tested.
2012-02-03 15:57:04 +11:00
Scott Penrose
7173e83e14 ols.profile-aglam.cfg: Increased delay time
On testing a number of Arduino Mega boards, I found the device missing error.
Now it seems to be alwåays working if you set it to 2000.
2012-02-03 15:55:24 +11:00
Andrew Gillham
5ec7aa1b51 Fix ATmega168 comment. 2011-11-04 18:30:31 -07:00
Andrew Gillham
ebbc1fb945 Update to v0.06 supporting Arduino 1.0 only. 2011-11-04 18:22:35 -07:00
Andrew Gillham
bc32e9fde6 Update for Arduino 1.0 support.
Change file extension to .ino Change Serial.print(x, BYTE) to
Serial.write(x)
2011-11-04 18:19:59 -07:00
Andrew Gillham
6396054c16 Update for Arduino 1.0 support.
Change file extension to .ino Change Serial.print(x, BYTE) to
Serial.write(x)
2011-11-04 18:18:35 -07:00
Andrew Gillham
d8cd29d86a Revert "Revert c923ff1a0c8f512be1012a3c3925869505dbc53b^..HEAD"
This reverts commit cedcd4b685.
2011-11-04 17:38:28 -07:00
4 changed files with 92 additions and 58 deletions

7
README
View File

@@ -37,7 +37,7 @@ use these settings:
Sampling rate: 1MHz (or lower)
Channel Groups: 0 (zero) only
Recording Size:
ATmega186: 532 (or lower)
ATmega168: 532 (or lower)
ATmega328: 1024 (or lower)
ATmega2560: 7168 (or lower)
Noise Filter: doesn't matter
@@ -48,5 +48,8 @@ below 1MHz. 1MHz works for a basic busy wait trigger that doesn't store
until after the trigger fires.
Please try it out and report back.
Release: v0.04 August 3, 2011.
This master branch now supports Arduino 1.0 only.
Checkout branch logic_analyzer_v0_5 for Arduino 22 support.
Release: v0.07 February 8, 2013.

View File

@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: logic_analyzer.pde,v 1.17 2011-08-04 02:31:01 gillham Exp $
* $Id: logic_analyzer.ino,v 1.21 2012/02/27 20:19:44 gillham Exp $
*
*/
@@ -67,7 +67,7 @@
* Sampling rate: 1MHz (or lower)
* Channel Groups: 0 (zero) only
* Recording Size:
* ATmega186: 532 (or lower)
* ATmega168: 532 (or lower)
* ATmega328: 1024 (or lower)
* ATmega2560: 7168 (or lower)
* Noise Filter: doesn't matter
@@ -78,7 +78,7 @@
* until after the trigger fires.
* Please try it out and report back.
*
* Release: v0.04 August 3, 2011.
* Release: v0.07 February 8, 2013.
*
*/
@@ -147,19 +147,19 @@ void debugdump(void);
#define SUMP_SELF_TEST 0x03
#define SUMP_GET_METADATA 0x04
/* ATmega186: 532 (or lower)
/* ATmega168: 532 (or lower)
* ATmega328: 1024 (or lower)
* ATmega2560: 7168 (or lower)
*/
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#define DEBUG_CAPTURE_SIZE 7168
#define CAPTURE_SIZE 7168
#elif defined(__AVR_ATmega328__)
#define DEBUG_CAPTURE_SIZE 1024
#define CAPTURE_SIZE 1024
#define DEBUG_CAPTURE_SIZE 7168
#define CAPTURE_SIZE 7168
#elif defined(__AVR_ATmega328P__)
#define DEBUG_CAPTURE_SIZE 1024
#define CAPTURE_SIZE 1024
#else
#define DEBUG_CAPTURE_SIZE 532
#define CAPTURE_SIZE 532
#define DEBUG_CAPTURE_SIZE 532
#define CAPTURE_SIZE 532
#endif
#define DEBUG
@@ -239,10 +239,10 @@ void loop()
break;
case SUMP_QUERY:
/* return the expected bytes. */
Serial.print('1', BYTE);
Serial.print('A', BYTE);
Serial.print('L', BYTE);
Serial.print('S', BYTE);
Serial.write('1');
Serial.write('A');
Serial.write('L');
Serial.write('S');
break;
case SUMP_ARM:
/*
@@ -513,7 +513,7 @@ void captureMicro() {
* is done for any triggers, this is effectively the 0/100 buffer split.
*/
for (i = 0 ; i < readCount; i++) {
Serial.print(logicdata[i], BYTE);
Serial.write(logicdata[i]);
}
}
@@ -549,7 +549,7 @@ void captureMilli() {
delay(delayTime);
}
for (i = 0 ; i < readCount; i++) {
Serial.print(logicdata[i], BYTE);
Serial.write(logicdata[i]);
}
}
@@ -682,6 +682,12 @@ void triggerMicro() {
if (logicIndex >= readCount) {
logicIndex = 0;
}
else {
/* pad the same number of cycles as the above assignment (needs verification) */
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t");
}
delayMicroseconds(delayTime - 3);
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
/* PORTD = B10000000; */
}
PORTD = B00000000; /* debug timing measurement */
@@ -693,7 +699,10 @@ void triggerMicro() {
* This needs adjustment so that we have the right spacing between the
* before trigger samples and the after trigger samples.
*/
delayMicroseconds(delayTime);
delayMicroseconds(delayTime - 2);
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t");
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t");
__asm__("nop\n\t""nop\n\t""nop\n\t");
/* keep sampling for delayCount after trigger */
PORTD = B10000000; /* debug timing measurement */
@@ -728,7 +737,7 @@ void triggerMicro() {
if (logicIndex >= readCount) {
logicIndex = 0;
}
Serial.print(logicdata[logicIndex++], BYTE);
Serial.write(logicdata[logicIndex++]);
}
}
@@ -764,54 +773,69 @@ void setupDelay() {
*/
void get_metadata() {
/* device name */
Serial.print(0x01, BYTE);
Serial.print('A', BYTE);
Serial.print('G', BYTE);
Serial.print('L', BYTE);
Serial.print('A', BYTE);
Serial.write((uint8_t)0x01);
Serial.write('A');
Serial.write('G');
Serial.write('L');
Serial.write('A');
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
Serial.print('M', BYTE);
Serial.write('M');
#endif /* Mega */
Serial.print('v', BYTE);
Serial.print('0', BYTE);
Serial.print(0x00, BYTE);
Serial.write('v');
Serial.write('0');
Serial.write((uint8_t)0x00);
/* sample memory (1024) */
Serial.print(0x21, BYTE);
Serial.print(0x00, BYTE);
Serial.print(0x00, BYTE);
/* firmware version */
Serial.write((uint8_t)0x02);
Serial.write('0');
Serial.write('.');
Serial.write('0');
Serial.write('7');
Serial.write((uint8_t)0x00);
/* sample memory */
Serial.write((uint8_t)0x21);
Serial.write((uint8_t)0x00);
Serial.write((uint8_t)0x00);
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
Serial.print(0x1C, BYTE);
/* 7168 bytes */
Serial.write((uint8_t)0x1C);
Serial.write((uint8_t)0x00);
#elif defined(__AVR_ATmega328P__)
/* 1024 bytes */
Serial.write((uint8_t)0x04);
Serial.write((uint8_t)0x00);
#else
Serial.print(0x04, BYTE);
/* 532 bytes */
Serial.write((uint8_t)0x02);
Serial.write((uint8_t)0x14);
#endif /* Mega */
Serial.print(0x00, BYTE);
/* sample rate (1MHz) */
Serial.print(0x23, BYTE);
Serial.print(0x00, BYTE);
Serial.print(0x0F, BYTE);
Serial.print(0x42, BYTE);
Serial.print(0x40, BYTE);
Serial.write((uint8_t)0x23);
Serial.write((uint8_t)0x00);
Serial.write((uint8_t)0x0F);
Serial.write((uint8_t)0x42);
Serial.write((uint8_t)0x40);
/* number of probes (5 by default on Arduino, 8 on Mega) */
Serial.print(0x40, BYTE);
Serial.write((uint8_t)0x40);
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
Serial.print(0x08, BYTE);
Serial.write((uint8_t)0x08);
#else
#ifdef CHAN5
Serial.print(0x06, BYTE);
Serial.write((uint8_t)0x06);
#else
Serial.print(0x05, BYTE);
Serial.write((uint8_t)0x05);
#endif /* CHAN5 */
#endif /* Mega */
/* protocol version (2) */
Serial.print(0x41, BYTE);
Serial.print(0x02, BYTE);
Serial.write((uint8_t)0x41);
Serial.write((uint8_t)0x02);
/* end of data */
Serial.print(0x00, BYTE);
Serial.write((uint8_t)0x00);
}
/*
@@ -848,7 +872,7 @@ void debugprint() {
}
else {
Serial.print(savebytes[i], HEX);
Serial.print(' ', BYTE);
Serial.write(' ');
}
}
Serial.println("done...");
@@ -877,3 +901,6 @@ void debugdump() {
#endif /* DEBUG */

View File

@@ -7,7 +7,7 @@ device.description = Arduino Generic Logic Analyzer
# The device interface, SERIAL only
device.interface = SERIAL
# The device's native clockspeed, in Hertz.
device.clockspeed = 100000000
device.clockspeed = 16000000
# Whether or not double-data-rate is supported by the device (also known as the "demux"-mode).
device.supports_ddr = false
# Supported sample rates in Hertz, separated by comma's
@@ -39,13 +39,15 @@ device.capturesize.bound = false
device.channel.numberingschemes = DEFAULT
# Is a delay after opening the port and device detection needed? (0 = no delay, >0 = delay in milliseconds)
device.open.portdelay = 500
device.open.portdelay = 1500
# The receive timeout for the device (in milliseconds, 100 = default, <=0 = no timeout)
device.receive.timeout = 100
# Does the device need a high or low DTR-line to operate correctly? (high = true, low = false)
device.open.portdtr = true
# Which metadata keys correspond to this device profile? Value is a comma-separated list of (double quoted) names...
device.metadata.keys = "AGLAv0"
# In which order are samples sent back from the device? true = last sample first, false = first sample first
device.samples.reverseOrder = false
# In which order are samples sent back from the device? false = last sample first, true = first sample first
device.samples.reverseOrder = true
###EOF###

View File

@@ -7,7 +7,7 @@ device.description = Arduino Mega Logic Analyzer
# The device interface, SERIAL only
device.interface = SERIAL
# The device's native clockspeed, in Hertz.
device.clockspeed = 100000000
device.clockspeed = 16000000
# Whether or not double-data-rate is supported by the device (also known as the "demux"-mode).
device.supports_ddr = false
# Supported sample rates in Hertz, separated by comma's
@@ -39,13 +39,15 @@ device.capturesize.bound = false
device.channel.numberingschemes = DEFAULT
# Is a delay after opening the port and device detection needed? (0 = no delay, >0 = delay in milliseconds)
device.open.portdelay = 1000
device.open.portdelay = 2000
# The receive timeout for the device (in milliseconds, 100 = default, <=0 = no timeout)
device.receive.timeout = 100
# Does the device need a high or low DTR-line to operate correctly? (high = true, low = false)
device.open.portdtr = true
# Which metadata keys correspond to this device profile? Value is a comma-separated list of (double quoted) names...
device.metadata.keys = "AGLAMv0"
# In which order are samples sent back from the device? true = last sample first, false = first sample first
device.samples.reverseOrder = false
# In which order are samples sent back from the device? false = last sample first, true = first sample first
device.samples.reverseOrder = true
###EOF###