The perfect debugging tool

Graynomad:
Did I mention that there is 208 pins?

Haha - just adds to the fun doesn't it?

Man you are progressing fast, I hadn't looked at the post for a day or so.

Did I mention that I want one !?

Graynomad:
This post will self destruct in 30 seconds.

Did I make it, did I make it???

I know a guy in the US just attempting to use one of those 32bit Atmels with 3xx pins, in one of those packages with the pins underneath (brain has stopped on me...) - is that the next challenge?

How many layers is your PCB so far? are you going with 4 on this one?

Great work :slight_smile:
James

one of those packages with the pins underneath

Probably a BGA (Ball Grid Array).

is that the next challenge?

Not likely.

How many layers is your PCB so far? are you going with 4 on this one?

I really want to stay with 2 layers. I know everyone says it's no more expensive to go 4 but with the people I use it's double the price. What I don't know is if these chips need any special ground planing. I don't see why they would as all the fast stuff is internal but getting a really solid ground into the power pins may be an issue.

Maybe I should look into using a different fab house.

Did I mention that I want one !?

You're on top of the list, but I hope you don't need it next week :slight_smile:


Rob

Looking good. What is used to make the 3D drawing?

Some questions:

How does power get connected? Does it get all from the USB?
USB (& interface chip?) connector missing from the schematic?
Crystal, decoupling still to be added?
Can you add more ground pins with the SPIs, UARTs, other single pin things, so twisted pair contacts, coax, etc. can be used to make connections off board?

What is used to make the 3D drawing?

I use Altium, all that's included. I get most models from here

If they don't have what I need I make one in Altium, it's pretty primitive for that but with practice you can make a reasonable model.

How does power get connected? Does it get all from the USB?

I think I'll go 100% power from the USB, I hate wires and that's one less. Open to suggestions re barrel jacks etc though.

USB (& interface chip?) connector missing from the schematic?
Crystal, decoupling still to be added?

Yep, that's just the "front end" page, there's a second page that will have that stuff on it.

Re USB, there is no interface chip, the LPC comes with a full interface including PHY so in theory all you need are a couple of resistors and some ESD protection. I've downloaded the USB code but let's just say I'm not 100% certain I will get it to work as I've not done any low-level USB stuff before. (I'd really like someone who has to step in for this :))

SO, plan B.

The LPC has an inbuilt bootloader, pull a certain pin low on reset and it will connect to UART0 and run a monitor/boot loader. I will program using ISP but I need to implement this serial port anyway for in-field upgrades so my plan B is to use an FTDI cable on this port. In which case it will work more or less the same as an Arduino, programming and talking on the same serial port. This will only be a pain for developers though because users don't program the processor.

Can you add more ground pins with the SPIs, UARTs, other single pin things, so twisted pair contacts, coax, etc. can be used to make connections off board?

Will do.


Rob

New feature.

I'm trying to avoid feature creep and I've baulked at having the Quadd do much control because of the extra hardware required for multiplexing signals. But I just had a clever idea so it looks like I'll add some features to control the target Arduino hardware.

Still thinking but I should be able to turn around the buffers and have the Quad actually emulate the Arduino processor. This would be good for testing peripheral chips with no need for Arduino code.


Rob

I got an offline question along the lines of "that looks good, but what does it do?" and it reminded me that such a device is for a certain audience. If you've just bought you first Arduino and are trying to get the LED to blink you do not need something like this.

If you're experienced you probably do but you also probably have a lot of tools already. Still maybe this will consolidate them while providing a few extras. Either way it has to be easier than connecting 15 wires from 3 different tools.

If you're somewhere in the middle and you're happy with serial.print()s and staring at the chip wondering what it's thinking then it's not for you either.

But for intermediate to advanced developers who are not happy with chip staring I think this could be a good tool.

The following is an expanded version of my response email.

The Quadd plugs onto the Arduino headers, in general it does not “use” any pins and can coexist with any other shield. Your Arduino is totally separate in the sense that your current Arduino interface and programming method doesn’t change, however if the Quadd is configured appropriately you can easily view what your program is doing rather than staring at the chip and scratching your head.

As an example I though I’d try to illustrate a typical scenario, getting your Arduino working with another chip over ISP, let’s say the other chip is an IO port expander.

Firstly, after uploading your code you can view the SPI registers (with the inbuilt AVRmon program) on the Arduino to ensure they are correctly set. If not you can change them in situ without having to do a compile and upload.

You can do a timing analysis on the SPI signals to see if the bits are wiggling as expected, then when the fundamentals are working and you want to look at the data flow between chips you do a protocol analysis to see the traffic of bytes on the MISO and MOSI signals.

The only real difference between the two is that timing shows waveforms and state shows data, however with a suitably-written GUI the two display styles would merge to a large degree.

If things seem to be working but not quite, let’s say you get data from the IO expander but your serial.print() is reporting the wrong value, you can trigger on an IO expander input changing state and see what data was sent. If it is correct on the SPI lines then the Arduino code has a problem, of not then there’s an issue with the IO expander.

Another option is to let the Quadd take over the SPI lines. In this case you can disconnect the Arduino’s processor (the Quadd does this by holding the chip in a reset state so no need to do anything physical) and manually (or using pre-canned data) read and write the chip.

Accessing Arduino program debugging data

You don’t need to use serial.print() and open/close a serial monitor all the time. There will be a few ways for the Quadd to read data from the Arduino’s program.

• Newsoftserial. Pick any spare pin and transmit data, will work but overkill if all you want is some debug output.
• Debug serial. A very simple and small transmit-only serial function.
• Shiftout. Use the standard library function.
• SPI. Use the hardware SPI port.
• IPC RAM. If you don’t have a single spare pin the Arduino and the Quadd can agree on the location of a section of RAM (IPC, Inter Processor Communications) and both can read/write from/to this RAM. So if you organise your code to use this RAM for some variables then you don’t have to do anything on the target, the AVRmon monitor program will extract the values and display them. The RAM is simply an array in the Arduino memory.

Whichever method is used the data can be displayed in a permanently-open watch window.


Rob

Another idea.

Sorry guys I just can't stop myself despite my previous comments on feature creep.

As it stands the Quadd should work with any Arduino (or clone) that has standard headers, including the Mega. But what about the Fio/Nano/Pro/Pro mini and other "breadboard friendly" clones. Or even the Lilypad, the shape doesn't matter.

If the Quadd had a general-purpose interface shield all these features would work with the smaller boards.


Rob

Graynomad:
but then there's that "IDE over the web thing" and as far as I can see there's no provision for doing it any other way.

That's very wrong, I'd hate to see somebody avoid mbed because they are simply misinformed, the mbed is way better than the Arduino in every way

just grab arm-elf-gcc and the other stuff in the toolchain, and grab CMSIS from NXP (the equivalent of the Arduino "core" files), compile via makefile, drag-n-drop .bin file onto mbed

the online compiler is amazing, by the way, you can write a library or code, share it (documentation generation is automatic if you use comments), keep track of revisions, talk about it, import other people's libraries/program with a click, all in one place. The absolutely only downside is that it's online, but that makes sense, since most of the features are online, plus they have a sweet deal with ARM so they can let you use their super-optimized compiler for a low cost

Thanks for the heads up on that.

I'd hate to see somebody avoid mbed because they are simply misinformed

Then Mbed have a serious publicity problem. The "fact" that it needs to be used online is AFIAK the general perception and I just spent half an hour trawling Mbed.org and cannot find a single mention of anything about offline compiling. It may be there but I couldn't find it.

Frankly that should on a great big banner on the home page because it does look like a fantastic board but some of us here in the third world can't be online all the time :slight_smile:

just grab arm-elf-gcc and the other stuff in the toolchain

I already have the LPC express environment running, can I use that or get the tools from that install?

Are there any tutes on how to do this with example makefiles?

Do you have to drag and drop?

Can the makefile upload?

As I mentioned before I plan to use the 178x which is the big brother of the Mbed processor but as far as I can tell almost the same so code should port easily from one to the other. So getting an Mbed is a very attractive option, even if just as a prototyping tool to start with.

the mbed is way better than the Arduino in every way

It does look good from the technical aspect, how about the community? Is it as good as this one? It doesn't look as extensive but I haven't browsed the forum yet to get a feel for the helpfulness of the people there.


Rob

"But what about the Fio/Nano/Pro/Pro mini and other "breadboard friendly" clones. Or even the Lilypad, the shape doesn't matter.

If the Quadd had a general-purpose interface shield all these features would work with the smaller boards."

Users can use short wires like this to jumper over if the right pins are installed on the other parts:
http://www.pololu.com/catalog/product/1806 male-male, male-female, female-female available as standard packs
and housings as needed to plug onto the pins in question:
1x4, 1x6, 1x12, etc
Pololu - Crimp Connector Housings

Yep, even without a special board those wires can be used to interface any Arduino or clone large or small.

I'll look at pinouts for an adaptor but just having a bread board with rows of labeled sockets would be easy and universal.


Rob

Dang I hate having to deal with dual voltages. Whatever happened to the days when everything was 5v?

It's not practical to do a full emulation by turning the buffers around so I'm going for a "Chip tester". This will allow you to play with a new chip, say a port expander with an SPI interface, by connecting a few wires and "talking" to it with the debugger. This should allow you to generally play with the chip and get the command sequences right in "real time" without having to compile/upload every time.

On another front, due to a monumental stuff up by the LPC designers as far as I can tell ADC4 input and one of the USB connections are on the same pin and cannot be muxed to another. So you either have ADC4 or USB but not both. :0 I need the ADC so it looks like I'll be breaking out the FTDI chip. So much for using the internal USB and saving some hardware.

Schematics nearly done. Looks like a 4-layer board though :frowning:


Rob

I've made some big changes to this but I have a question for those used to debugging embedded micro hardware.

Given 16 bits of high-speed (hopefully 25MHz) storage that can be split between digital and analog what mix makes more sense?

8 bits AN (single ch)
8 bit DIG

or

10 bits AN (single ch)
6 bit DIG

Is dual AN channel really necessary?


Rob

I would keep 8 bits of digital to be able to capture byte transfers.
8-bit analog would be comparable to this one
http://www.pdamusician.com/dpscope/features.html
and that 8-bits seems to work fine for signals I have looked at.

OK I'll see how things fit, I'm very limited for connector space and that may make the decision for me.

What about one/two channels for a scope, personally I think one is enough and once again I have space limitations.


Rob

I find I use 2 a lot - one for the actual signal, and often a 2nd so I see where it is occurring with respect to something known.
Hmm, sounds more like a 2-channel logic analyzer that way, which is how I have been using my scope actually.
Yeah, I think for strictly analog I am usually looking at audio stuff and then 1 channel is enough.

Will you be able to do some of the stuff that Visual Analyzer does?
http://www.sillanumsoft.org/prod01.htm
This is only sound card based, I have found it helpful working out where noise is coming from in analog circuits.

Hmm, sounds more like a 2-channel logic analyzer that way

That's what I'm thinking, what I'm doing is primarily a digital tool but there are times when you want to see the relationship between the digital stuff and an analog signal. For serious analog you would still need a proper scope I think.

Will you be able to do some of the stuff that Visual Analyzer does?

I don't even know what most of that is :slight_smile: Analog is not my strong point. It won't be a priority but most of that is post processing that can be added at any point, I just need to be sure I get the hardware in place to sample what needs to be sampled.


Rob

Rob,
How about just making the board be able to output data for simplot then?
http://www.negtronics.com/simplot

The author Brijesh seems to be keeping it supported.
http://arduino.cc/forum/index.php/topic,58911.0.html

Still thinking about analog bits but I've pretty much decided to use a different enclosure, if I do this then I'll have a lot more room for connectors so that won't be the limiting factor any more.

Thanks for the simplot link, that also led me to a similar thing called NetworkViewer which is written in QT and therefore cross-platform.

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

Something like either of these is what I'd like to do, they just need about 10 more things added but they'd make a good start point. Nothing worse than looking at a blank screen wondering how to start.


Rob