Trivial circuits for sbc

For discussing the 65xx hardware itself or electronics projects.
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Trivial circuits for sbc

Post by Dajgoro »

Well, when i started building my sbc, i just placed pull up resistors to the irq, nmi, rdy, so inputs, and left them "for later".
Now "later" has came so i first tried to build the automatic reset circuit when power comes up. I tried using 555, op amps, but i just didn't have any luck...
Now i need to build also multiple rdy and irq inputs, that should not be a problem...
But now my question are:
To which circuits should i give the control of the nmi input?
How can i use the so input?
How to make the auto reset circuit?

I hope this helps other too, since this is a "trivial pack"...
Also a funny fact, i have probably more that 200 ic, but i don't have a single or gate!
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

Quote:
To which circuits should i give the control of the nmi input?
I have one of my 65c22's (VIA1) on NMI\ and the rest of the peripheral ICs on IRQ\. I use T1 in VIA1 for the software real-time clock (RTC), giving 100 interrupts per second for the time of day and calendar. It only slows the computer down about 1%, including seeing if it's time to activate another task. If an application really needs to have it turned off to prevent jitter on the timing of other interrupts, I turn it off temporarily (ie, disable VIA1T1 interrupts). What I use the RTC for most is just timing key presses for debouncing, delay before auto-repeat, and auto-repeat rate, and maybe time-out on hardware error (like printer not ready), etc.. This prevents using delay loops that would keep the computer from doing other useful things while waiting. Using the RTC to schedule tasks or for timing actual hours and minutes and seconds is less common, and it has been years since the last time I used the calendar functions I wrote.

I have an "Abort" button on the same VIA which I can set up in software to cause an NMI to get the processor's attention. This lets you take back control from a crashed program, without resetting all the I/O ICs; so it's less drastic.

We're often told to reserve the NMI for something drastic like power going down; but in most systems the people on this forum are making, what happens in the last milliseconds before power is gone is of no concern. If you have a system that remembers things when it's off, it probably has batteries and can turn itself off in an orderly fashion. There's no time to store anything useful on a disc. If the 6522 used for the RTC goes on the 6502's NMI\, polling for interrupt sources on IRQ\ is simplified, and the RTC never misses a beat when other interrupts hit or are masked.
Quote:
How can i use the so input?
Most designers have respected its obscurity and left it alone.
Quote:
How to make the auto reset circuit?
Mine is at http://www.6502.org/users/garth/project ... chematic=1 . It uses one sixth of a 74xx14.
Edit: RST page in my 6502 primer: http://wilsonminesco.com/6502primer/RSTreqs.html
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Post by BigEd »

There's a video online(*) of Samuel's recent presentation of his single-board Forth machine. At one point he inputs a bad program, resets and continues where he left off. He points out he can do that because he has no destructive memory test. Maybe, in the absence of a fast peripheral like a disk drive which needs NMI's rapid response(+), you could use NMI to do a non-destructive reset into a monitor program. Then you don't need that 'Cold/Warm' prompt at reset time: just have one each Reset and Debug button.

(*) Ogg format: you may need to use VLC to play it.

(+) In Acorn's BBC micro, the NMI is used for the disk interface. It's rapid response because it's used only for one purpose, and the handling routine is in RAM so can be patched for each upcoming operation, whether a disk read or a disk write. More details

The SO pin is for even more rapid response: used in the C64's disk drive's firmware, for polling a single input in a tight loop which checks the overflow flag. I think very few systems use this: you can't do ordinary arithmetic and then check overflow if there's any chance some hardware will set the overflow flag mysteriously.

Cheers
Ed
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Post by Dajgoro »

Well, i was trying to make a Schmitt trigger from opamps and 555. I should give it another try.
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Post by Dr Jefyll »

Dajgoro wrote:
Well, i was trying to make a Schmitt trigger from opamps and 555. I should give it another try.
You might want to refer to the KIM-1 schematic. It uses a 556 (dual 555) in a nice, simple circuit that conditions a pair of pushbutton inputs to generate debounced NMI and RST signals. The schematic is on page 26 of the KIM-1 User Manual.


Regarding the SO input,
GARTHWILSON wrote:
Most designers have respected its obscurity and left it alone.
LOL!! Rather a droll remark, Garth -- I never knew you had such a dry wit. Thanks for the belly-laugh! :D

-- Jeff
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Post by BigDumbDinosaur »

BigEd wrote:
I think very few systems use this: you can't do ordinary arithmetic and then check overflow if there's any chance some hardware will set the overflow flag mysteriously.
That and SO is absent on the W65C816S. The use of SO is predicated on a busy loop watching the overflow bit until it changes. It does result in rapid response, but not as fast as using this sequence on a 'C02 or '816

Code: Select all

          SEI                   ;IRQs off
          WAI                   ;wait for IRQ...MPU will do nothing else while waiting

          ...IRQ handler follows...
In this code snippet, the IRQ handler immediately follows the WAI instruction. With IRQs off and WAI being executed, the MPU goes into a catatonic state like that produced by asserting /RDY, until an IRQ hits, at which time the instruction following WAI is executed. As near as I have been able to determine, response occurs within one clock cycle when /IRQ is asserted.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Post by Dajgoro »

What kind of power supply do you(all of you) use for the sbc projects? I've been using the 7805, but is there a better solution? What if some day i decide to install a hard drive, and my nmos ic are kinda power hungry already.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Power Supply

Post by BigDumbDinosaur »

Dajgoro wrote:
What kind of power supply do you(all of you) use for the sbc projects? I've been using the 7805, but is there a better solution? What if some day i decide to install a hard drive, and my nmos ic are kinda power hungry already.
I use a standard ATX power supply to power my POC unit, with a jumper across the pilot circuit. One of the 5-1/4 inch drive connectors powers the POC itself. The particular supply I use has an On/Off switch. If yours doesn't, replace the jumper with a toggle switch. You'll have the necessary connectors to power a disk or other peripheral as needed.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Re: Power Supply

Post by Dajgoro »

BigDumbDinosaur wrote:
Dajgoro wrote:
What kind of power supply do you(all of you) use for the sbc projects? I've been using the 7805, but is there a better solution? What if some day i decide to install a hard drive, and my nmos ic are kinda power hungry already.
I use a standard ATX power supply to power my POC unit, with a jumper across the pilot circuit. One of the 5-1/4 inch drive connectors powers the POC itself. The particular supply I use has an On/Off switch. If yours doesn't, replace the jumper with a toggle switch. You'll have the necessary connectors to power a disk or other peripheral as needed.
Maybe i could find one of those smaller version of th ATX power supply. Actually i have a 1M tall tower of dead atx power supplies on my attic...
Anyway are there some more powerful versions of the 7805?
(Nice desk, i noticed that everyone uses the same crocodile wires, including me...)
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

Quote:
Anyway are there some more powerful versions of the 7805?
I can't think of any offhand, but there are loads of options of course, including (but not limited to):
  • use more of them, each one local to the circuitry it's powering up , all fed from the the same input voltage & supply
  • use a voltage follower power transistor with a bigger heat sink (and put a diode in the 7805 ground circuit to make up for the B-E voltage difference from the transistor so you still get 5V out)
  • if efficiency and heat (and not just amperage) is the issue, use an integrated switching regulator like the Power Trends 78SR105
  • use an LM317 or LM350, especially the 350 with the K ending (ie, TO-3 case for better heat dissipation), which will give you at least 3A and typically up to 4.5A
All of these are more compact solutions than using a PC power supply.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Power Supply

Post by BigDumbDinosaur »

Dajgoro wrote:
Actually i have a 1M tall tower of dead atx power supplies on my attic...
Why have a pile of dead power supplies? They're almost as useless as a leaky space suit.
Quote:
Anyway are there some more powerful versions of the 7805?
The 7805 is rated for 1 amp with adequate heat sinking. For powering a SBC alone it's more than adequate. You'll need 12 volts as well as 5 volts to run a disk and 1 amp isn't going to cut it.
Quote:
(Nice desk, i noticed that everyone uses the same crocodile wires, including me...)
Yep! No substitute for lots of clip leads. :lol: I couldn't function without them.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
kc5tja
Posts: 1706
Joined: 04 Jan 2003

Post by kc5tja »

BigEd wrote:
you could use NMI to do a non-destructive reset into a monitor program.
The RESTORE key on Commodore 8-bit machines is tied to the CPU via the NMI input, performing exactly this function. The additional requirement of having RUN/STOP pressed when hitting RESTORE (which itself is a key that requires a harder press than any other key) is intended to prevent accidental triggers of this interrupt.

In the case of the Commodore 64 and 128, it dropped back into BASIC. But, the NMI vectors through RAM, and can be changed to do whatever you want.
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Post by BigEd »

Thanks - I didn't know that!
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Post by Dajgoro »

As for the 4000-7400 conversation from the crtc topic, i went to replace my 4000 glue logic with 74ls. It worked all fine until i replaced the CD4069 with the 74ls04, when i replaced it the sbc would not start even at 500khz. While when i replaced the 4081 with the 74ls08, all worked well. My glue logic is based on sbc-2, except i used and and not gates. the rest of the sbc logic is also 74ls(2-4 decoders and latches).

Edit: Now when i replaced the 4081 with 74ls08 i can get EhBasic working kinda stable again @ 2MHz with the 1MHz 6502 version(usually it would crash when i would enter a line of code like 10 INPUT A).
User avatar
Dajgoro
Posts: 808
Joined: 08 Aug 2011
Location: Croatia
Contact:

Post by Dajgoro »

Progress:
I replaced the 74ls04(cd4069) with the 74hc04, and now it seems to be working, and EhBasic works kinda stable @ 4MHz with the 1MHz 6502(nmos).
Post Reply