RF Eclectica Wiki

Try to learn something about everything, and everything about something - Thomas Huxley

User Tools

Site Tools


public:calculator:progs:dm41x_progs

Calculator Programs

DM41X Progs

TI : calculate 65c22 Timer values for tone generation

Counter calculation

The required count is calculated from Φ2 and the audio frequency required.

Count (decimal)

{ Φ2 / ( 2 x F ) } - 2

for 1000Hz and a 1MHz Φ2 :

Count = { 1,000,000 / ( 2 X 1000 ) } - 2 = 498

498d → $01F2

Run as XEQALPHATIALPHA

Prompt F for required audio tone frequency.

Enter freq

R/S

Result is the 2-byte value for T1CL & T1CH

e.g.

XEQALPHATIALPHA

1000 

R/S

Result:

$001F2

The Counter should be set to

T1CH = $01
T1CL = $F2

Entered as follows (make sure you're in DECS mode in Ladybug while entering the program - otherwise the 1000000 won't be interpreted correctly). When viewing/editing the program later it will look different!

LBL ¬TI
DECS
WSIZE 20
¬ F
PROMPT
STI 01
1000000
ENTERI
LDI 01
2
x
/
2
-
HEXS
RTN

BFil

Butterworth HPF/LPF Filter designer

Examples

5MHz 5-pole LPF

XEQALPHABFILALPHA

MHZ ? 

5 R/S

N

Order/poles = N

Positive for HPF

Negative for LPF

5 pole LPF = -5

5CHSR/S

COEFFICIENTS
0.618

(at this point you can RCL 01 etc. up to RCL 05 to see the calculated Butterworth Coefficients)

  • R01 : 0.618
  • R02 : 1.618
  • R03 : 2.000
  • R04 : 1.618
  • R05 : 0.618

R/S

LPF
393.5 -12

The calculated component values are now in Reg 01 - Reg 05

  • R01 : 393.5pf
  • R02 : 2.575uH
  • R03 : 1.273nF
  • R04 : 2.575uH
  • R05 : 393.5pF

1MHz 7 pole HPF

XEQALPHABFILALPHA

MHZ ? 

1 R/S

N

Order/poles = N

Positive for HPF

Negative for LPF

7 pole HPF = 7

7R/S

COEFFICIENTS
2.247

(at this point you can RCL 01 etc. up to RCL 07 to see the calculated Butterworth Coefficients)

  • R01 : 2.247
  • R02 : 0.802
  • R03 : 0.555
  • R04 : 0.500
  • R05 : 0.555
  • R06 : 0.802
  • R07 : 2.247

R/S

HPF
17.88 -06

The calculated component values are now in Reg 01 - Reg 07

  • R01 : 17.88uH
  • R02 : 2.553nF
  • R03 : 4.416uH
  • R04 : 1.592nF
  • R05 : 4.416uH
  • R06 : 2.553nF
  • R07 : 17.88uH

Page Info

Page created Thu May 26 18:35:00 2022 by John Pumford-Green

Page last updated: 24/04/23 17:08 BST

John Pumford-Green 24/04/23 16:07

Further Information

public/calculator/progs/dm41x_progs.txt · Last modified: 24/04/23 17:08 BST by john