6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Sep 28, 2024 11:19 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Nov 28, 2016 5:18 am 
Offline

Joined: Sat Jun 04, 2016 10:22 pm
Posts: 483
Location: Australia
Here's a bit of a PSA(At least, I like to think so).
WDCs 65c02 has WAI and STP instructions, acccording to its datasheet. The programming manual says that the 'c02 does not have them.

Maybe some errata on the programming manual is in order?


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 28, 2016 5:47 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8403
Location: Midwestern USA
DerTrueForce wrote:
Here's a bit of a PSA(At least, I like to think so).

WDCs 65c02 has WAI and STP instructions, acccording to its datasheet. The programming manual says that the 'c02 does not have them.

Maybe some errata on the programming manual is in order?

The manual is generally correct, as it was intended to cover the 6502 family, not specific iterations. These instructions are unique to WDC versions.

WDC added STP and WAI to the 65C02, 65C802 and 65C816 when they were converted to a static core design long ago (I don't recall the exact year anymore). The intent of these instructions is to accommodate applications in which the MPU may have nothing to do for a long period of time and it is desired to reduce power consumption to the absolutely lowest possible level. When STP or WAI is executed the internal clock is stopped in the high state, causing current consumption to fall into the micro-ampere range. As the 'C02 and '816 are fully static, the registers will retain their contents as long as the device remains powered. If the 'C02 or '816 is combined with low power static RAM that goes catatonic when not selected (which many such devices do), a small battery can sustain such a system for long periods of time. This is the basis for operating implanted medical devices, such as automatic defibrillators.

In normal programming, one would not use either of these instructions, as they cause a total cessation of activity until a hardware interrupt (in the case of WAI) or reset occurs. WAI preceded by SEI would be most useful to the hobbyist in a real-time data acquisition device, as interrupt latency is reduced to one clock period or less.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 28, 2016 7:16 am 
Offline

Joined: Sat Jun 04, 2016 10:22 pm
Posts: 483
Location: Australia
Oh. Well, that explains it. I have had thoughts of using them, though. Mostly WAI, in the way you mentioned, but for temporarily halting the CPU(that was while I was still going for a front panel), but I have an idea for a test program that would use STP.

But as you say, they're not exactly very useful, in general.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: