|
From: Patrick E. <pa...@pa...> - 2001-07-16 03:13:55
|
On Sunday 15 July 2001 11:24, you wrote:
> I have been looking at the Atmel AVR series microcontrollers,
> especially now that Digikey is carrying them (page 194-195 of the
> current catalog). I would still like to make a compiler that would
> work with PIC series microcontrollers, but the page and bank issues
> seemed extremely difficult when I was seriously working on the
> compiler. The AVR series seem to have the benefits of the PIC
> products, but without the compiler-unfriendly bank and page issues.
> The one drawback to the AVR method is that it takes 2 instructions
> to do some of the jump instructions, but this seems like a small
> price to pay.
What are the price differences like between the AVRs and the PICs?
One of the things I like about the PIC is that they're pretty cheap
for the feature set they offer. I can't speak for other
microcontrollers though, since I haven't really looked that much.
I'm sure the page and bank issues can be worked out satisfactorily
through some creative design and tradeoffs. They're always somewhat
on my mind as I've been working. I'm sure solutions will eventually
present themselves to any problems we may encounter.
I've been thinking about somehow offering a virtual pseudo-linear
address space. This is a rather half baked idea, but perhaps it
would be possible to take the space requirements for various
variables, and organize them into chunks of memory within the same
page. That way, array and other multi-byte variable accesses could
be done without switching banks. This wouldn't lend itself
particularly well to working within a traditional stack though.
However, perhaps emulating the traditional stack isn't the best way
to work with the PICs.
Instead of implementing a basic system on a stack machine, perhaps
there could be a more general memory management system that deals
with either the specifics of the PICs or works with more stack based
systems like the AVR. This is going to require a more thought. Do
you have any ideas in the area of memory management? Do you see any
fatal flaws in the half-baked ideas here?
Thanks.
Patrick Earl
|