Can i create a custom oscillator using RC Circuits?

Thread Starter

Majidf0

Joined Sep 30, 2022
3
Hello! I am currently working on a 6502 CPU and am trying to create a clock so that I may study the processor correctly. I have a 1MHz crystal oscillator, but it is far too fast for me to properly study the inner workings of the CPU. I tried using a simple RC circuit to produce 1Hz and 10Hz frequencies, but it didnt work quite right. I learned that RC circuits can produce frequency waves, so why can't i use those waves as an oscillator? Thanks!!
 

WBahn

Joined Mar 31, 2012
29,979
You can't just take a bunch of resistors and capacitors and make an oscillator.

Why don't you just use your 1 MHz crystal oscillator to drive a counter IC and then use some logic or even mechanical switches to select the slower clock that you want.

You might consider the 74LV8154, which can be configured at a 32-bit counter.

https://www.ti.com/lit/ds/scls589a/scls589a.pdf
 

MrChips

Joined Oct 2, 2009
30,712
MCUs are designed to operate with a CPU clock.
Some CPUs can be clocked at low frequencies down to 0Hz.

For the purpose of studying the behaviour of the CPU while executing program code you need the ability to examine CPU registers and memory locations while stopped and single stepped.

Modern MCU vendors provide IDE and debugging tools that allow you to do this.

For legacy chips such as 6502 your best option for educational purposes would be to use a simulator or emulator.
 

Thread Starter

Majidf0

Joined Sep 30, 2022
3
You can't just take a bunch of resistors and capacitors and make an oscillator.

Why don't you just use your 1 MHz crystal oscillator to drive a counter IC and then use some logic or even mechanical switches to select the slower clock that you want.

You might consider the 74LV8154, which can be configured at a 32-bit counter.

https://www.ti.com/lit/ds/scls589a/scls589a.pdf
I see! I’ll look into this solution. Thanks!
 

WBahn

Joined Mar 31, 2012
29,979
I see! I’ll look into this solution. Thanks!
First look and see what clock options the 6502 has. It looks like is supports generation using just an external R and C.

http://wilsonminesco.com/6502primer/ClkGen.html

There are other options at all.

The one I suggested has the advantage that you can set up the circuit so that you can easily change the clock frequency without modifying the circuit -- just moving a jumper or a dipswitch.
 
Top