EmbeddedRelated.com
Forums

Using Visual C/C++ to do 8051 development

Started by Ed February 5, 2004
R Adsett wrote:

> In article <40265f48_3@mk-nntp-1.news.uk.worldonline.com>, > ian@ruffrecordsDOTworldonline.co.uk says... >> R Adsett wrote: >> >> > In article <rAh4j2BjNlJAFA2P@phaedsys.demon.co.uk>, chris@phaedsys.org >> > says... >> >> Personally I am with you on this one if it is over 64K and you can't >> >> use one of the parts over 64K linear addressing (of which there are >> >> quite a few now) you should move to a larger MCU The problem is that >> >> there is an investment in the tools and the current system that does >> >> not warrent porting to a new MCU >> > Are there really very many places now where a systems with 64K >> > addressing that needs more where it's actually easier and cheaper to >> > introduce bank switching than it is to switch to a processor with a >> > larger address range? >> > >> > Robert >> >> The only sort of thing I can think of where you would need perhaps more >> than 64K *code* (not data like screen text/graphics) would be some very >> complex algorithm or protocol (like ppp). >> > Not the answer to the question I meant to ask. There certainly are cases > where you have more than 64K code or data. But, given that you have a > system that used to fit within the 8051 address space w/o bank switching > and now doesn't, is it really easier to add bank switching than to switch > to a processor with a larger address space? > > I can see that the answer might be different for different circumstances > IE code or data explosion, amount of assembly, dependance on certain > peripherals, but I'm curious as to the reasoning behind implementing bank > switching rather than switching processors. > > Robert
I would explore other alternatives first. Don't forget the 8051 has a Harvard architecture so if you have lots of data for example there most of the 64K data space avaialable for it without the need to resort to bank switching. Ian
On Sun, 8 Feb 2004 20:15:19 +0000, Chris Hills <chris@phaedsys.org>
wrote:
>No, despite the Keil compiler being VERY efficient, there are many 8051 >programs that use more than 64K
Hi, yes, the Keil compiler is efficient (as efficient as my old PLM compiler). But the structure of code you build with it isn't. 8051 and C are not made for each other. The way you think is different. In C you think like working in a very stack-oriented processor, but the 8051 is very register based. That is why you get other programs and larger code. Pieter Hoeben http://www.hoeben.com
Pieter Hoeben wrote:

> 8051 and C are not made for each other. The way you think is > different. In C you think like working in a very > stack-oriented processor, but the 8051 is very register based. > That is why you get other programs and larger code.
I don't think this is strictly true. An important part of the process for embedded programming is to, where appropriate, maintain awareness of platform-imposed requirements. How a programmer thinks is under the control of the programmer, not the programming language. -- Morris Dovey West Des Moines, Iowa USA C links at http://www.iedu.com/c Read my lips: The apple doesn't fall far from the tree.