another bizarre architecture

This looks really weird to me...

formatting link

Does it resemble anything you've ever seen? It looks truly ghastly to program. For example, allowing printf() to use floats adds 3500 bytes to a program binary.

John

Reply to
John Larkin
Loading thread data ...

MAXQ is aimed at very low power consumption applications. They have been trying desperately to sell it to us. Unfortunately for any real project we've considered, MSP430 is indistinguishable from MAXQ power- wise. We have a lot of investment in ARM, AVR and MSP430; MAXQ is just "yet another proprietary microcontroller" with no really compelling feature. No sale.

Reply to
larwe

On a sunny day (Wed, 31 Jan 2007 11:03:03 -0800) it happened John Larkin wrote in :

That last example: Remember Z80 compare increase and repeat? And that was one instruction. It also has otir (out increase and repeat). Well, OK, I guess their system works..... But I sort of do not see the advantage. It is faster then PIC io... but many processors allow direct access to io / or memory [mapped io], also with indexes. Anyways you can program your own in FPGA, opencores.org has a processor generator. Each his own processor :-) OK, now to write all the assemblers and compilers.

Reply to
Jan Panteltje

Just another small 16-bitter. From Maxim, which sounds like never use it.

It looks truly ghastly to

Coding at low level is a task of compiler. BTW, do they provide decent tools for MAXQ?

For example, allowing printf() to use floats adds 3500 bytes

I'd say this is not unusual for the printf() overhead.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

It looks more like writing a cpu's microcode than traditional assembly language. Which might be fun if you're into that sort of thing.

Reply to
Jim Stewart

This is a lot different than the PIC code I am used to. However, there must be some advantage to it. I don't see where you get your reference to the printf() function, however. That would be a function of a C compiler.

Paul

Reply to
Paul E. Schoen

And it's from Maxim.... usually a distinct disadvantage, availabilitywise

Reply to
Mike Harrison

Rowley and IAR have C compilers - I've played with the IAR one and it seems to be exactly like their other compilers with no obvious problem. Also Phyton (but I never heard of them before). Maxim supplies a free IDE with assembler. Very standard sort of arrangement.

Agreed, very standard.

Reply to
larwe

They have one of the strangest ways of documenting opcodes I have seen, which I think makes it looks stranger that it really is. It does mean users have a learning curve to climb, unless you want to operate purely, and only, in C - which places its own restrictions on what you can do.

They claim low power, but the MAXQ2000 has a very poor mA/MHz offset,

- yes, it's OK at 20MHz, but only drops Icc a few %, as the clock drops to 1MHz - so at lower clocks, it quickly looks plain lousy. Hard to believe someone pitching a low power uC, would make that mistake.

They seem to be targeting the DataACQ markets, so the core specs matter less than the peripherals - eg there are (very) few uC offering

16 bit ADCs + LCD + 16*16 to 40 bit MAC, so if you really need those features, the core will be a "don't care".

As a general mechant uC ?, nope...

-jg

Reply to
Jim Granville

Its been out for a while now - I don't see advantage over more established cores like MSP430 and ARM. And lots of disadvantages.

Then don't do that! The full printf is quite powerful (and complicated internally). An integer-only version can be made quite compact and is still quite powerful. If you are determined to use floating point you can pass the integer and fractional parts as separate parameters to the function, using a format string that combines them visually.

--

John Devereux
Reply to
John Devereux

It is extremely simple.

formatting link

Don't be a puts(). You have to convert binary to ASCII, denormalize, deal with leading and trailing zeros, decimal points, and so on.

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Reply to
Spehro Pefhany

Monkeys with typewriters. Most of the functions say nothing about what they do, and many are effectively or entirely comment-free. This is the Microsoft philosophy: the only documentation is the code itself.

Fixed-point 64-bit to formatted ascii string is maybe a page of assembly for the 68K. Might run over a page with zero supression and commas every 3 digits.

John

Reply to
John Larkin

The company I work for is big enough (and Maxim is desperate enough) that Maxim would make a supply shortage someone else's problem, not ours - as long as the foundry was physically operational :)

But I hear you. The problem is, all vendors are the same. Vendor A screws up five things in a row and goes on the "design 'em out!" shitlist. Vendor B comes in with replacement products, and all is sweetness and light. Three years later, Vendor B screws up five things in a row and goes on the "design 'em out!" shitlist. Vendor C comes in with replacement products, and all is sweetness and light... { ... } ... repeat until you run out of vendors and then Vendor A comes in with replacement products, Purchasing kisses and makes up with their rep, and all is sweetness and light...

... for another three years.

Reply to
larwe

On a sunny day (Wed, 31 Jan 2007 17:04:14 -0800) it happened John Larkin wrote in :

No, you have to be able to read 'C'!!!!!! I sort of like that link, maybe it is because I used DJ Delorie's C compiler djgpp on MS DOS many many years ago... :-)

formatting link

Reply to
Jan Panteltje

To even tell what the intent of a 100-line function is? The fact that the comments are so few, and generally misspelled, suggest that what's going on here is beyond simple inarticulateness.

Face it: the current state of software is an unholy mess, and the paradigm doesn't work. Windows source code looks like this.

John

Reply to
John Larkin

I use C, it's now probably my 'mother tongue' for programming and I have to agree with John on this. The comments are too sparse and worse in the one other function I looked at (to see if more complex functions were done better), the file header comment was completely wrong. It's the sort of file where if you already know what's happening and what it's supposed to do you can follow it but if you are new to it or have been away for a long enough period to have forgotten then you will be in for a hard time. The functions assume a lot of knowledge that is not in the files and there are no pointers external references containing the missing information.

Robert

Reply to
Robert Adsett

On a sunny day (Thu, 01 Feb 2007 08:53:47 -0800) it happened John Larkin wrote in :

OK, I will face it, I have heard your argument before, but I happily write many hundreds of lines of C code without additional explaining text before each line (that is what you want). Long ago I have learned: Write your code so it is readble, so not something like:

double pnurk(double a, souble b) { double c;

c = b / a;

return b / a; }

but:

BOOL calculate_current(double resistance, double voltage, double *current) { if(debug) { fprintf(stderr,\ "calculate_current: arg resistance, voltage\n",\ resistance, voltage); }

if(resistance < 0.0) { fprintf(stderr,\ "My-Program: calculate_current():\n\ Your resistance is negative (%.2f), you must be kidding right? Aborting.\n",\ resistance);

return SUCKS; }

*current = voltage / resistance;

if(debug) { fprintf(stderr, "calculate_current(): calculated current=%.2f\n", *current); }

return OK }

Sorry could not resist.

So in a program you can then know what it does. Of course the example is very simple, but if you are consistent most of the time you need no more text, use the right variable names.

And use spaces.....

return a/b*c%25+15; // sucks

In the link we were talking about it is 100% clear to me at least what happens. If you have a look at gcc, and libc.info (the reference in Linux) you can look up all these functions. I cannot say anything about the MS soft... MS is C++ so, and so silly that Visual Studio. I program in Linux with 9 rxvt terminals, libc.info open in one of these, with the source in a normal text editor in an other rxvt, and run the code in a third rxvt. And switch between the virtual screens with ctrl-cu left-right-up-down. rarely run out of (9) rxvts. No mouse, only mouse when I test GUI stuff, and even then started from rxvt.

Anyways I do not see your problem, but you are no programmaer I think, so I had very very hard time myself in the begining (>20 years ago) to understand C code... mathematical shock to see != and == etc.. :-)

Reply to
Jan Panteltje

What a shamefull nonportable, unsafe and murky piece of code.

This is a way to go:

CURRENT calculate_current(VOLTAGE voltage, RESISTANCE resistance) { CURRENT current;

if(fabs(resistance) < VERY_SMALL_NUMBER) { throw BAD_RESISTANCE; } else { current = voltage/resistance; } return current; }

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

You do realise that this is an implementation of the C standard library? The behaviour of the functions is spelled out, in detail, in the C standard, and any number of C reference books and online references.

What would you do, rewrite Windows XP in 68k assembler? :)

If Only...

--

John Devereux
Reply to
John Devereux

On a sunny day (Thu, 01 Feb 2007 19:02:07 GMT) it happened Vladimir Vassilevsky wrote in :

You are naorrw minded.

exit

Reply to
Jan Panteltje

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.