-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > > I'm not arguing about convention, here. > > Brendan: > > I admire your independent thinking; it's nice to see someone > discarding the usual assumptions and starting over from > more-or-less basic principles. Thanks :) > It's useful to keep in mind, though, that when you see a design > feature common to nearly all microcontrollers, it probably > exists > for reasons other than arbitrary "convention". Respecting your professional opinion, I should point out that that is not always the case. Witness the convention across the microcontroller board of using register or acumulator oriented operations where a stack would be far more effective. Now, of course, the reason for that is that it's easier for programmers to understand, but at the same time, your system takes a performance hit for staying in the game that way. > > I hope you can see that there are other functional schemes that > > could use a full RAM clear in the reset process. I don't think > > there'd be much loss there, but there might be very little gain. > > I'll leave that analysis to the professional chip designers. > > As a professional chip designer, I agree that a full RAM clear > IS generally needed on reset. However, I don't think it should > automatically be performed by the hardware. Perhaps, then, a RAMCLR instruction which will dump all the RAM on the processor? Or all of it except for a protected zone? > I mean, even the 18F's RAM can be cleared in fewer than 12 > software instructions. Even if the micro cleared all RAM > automatically on reset, that 12-instruction routine would > probably be in most programs anyway, in order to clear RAM when > necessary under other circumstances (e.g., WDT reset). Fair enough, though I haven't been able to figure out why a routine like this would be implemented in the first place. It sounds to me like exactly the kind of coding practice that we are commonly advised to avoid: why do you need to clear all the RAM, when you should be assuming that it's all full of garbage anyways? Well, now that I think about it, I can see some potential uses, like a large data array that needs to be full of 0s, but in general, I can't really see the need for something like that at all... - --Brendan - --- "Rejection out of hand of all but one's favoured alternative may cost you dearly in one way or another." -Russell McMahon -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.8 for non-commercial use iQA/AwUBPWLKaAVk8xtQuK+BEQJPJwCgrPreMONw2wLWfx6UobJ9/5VfGXAAoI2Q aDcP3xn2vCV/5PNg3yWh6LP7 =KgA8 -----END PGP SIGNATURE----- -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads