MC145170.DLL

Introduction

MC145170.DLL is a 32 bit Windows .DLL that can be called from your own software to program the MC145170.

Because MC145170.DLL is a 32 bit application it will run only with Windows 95, 98 and NT.  MC145170.DLL will not run with Windows versions 3.x.

MC145170.DLL gives you full control over the C, R and N registers of the PLL so it should be usable will all MC145170 installations with a little experimentation... particularly in the C values.  I suggest you obtain the Motorola MC145170 data sheet for a full description of the MC145170.DLL properties.

 

Installing MC145170.DLL

MC145170.DLL accesses the LPT1 port on your PC to program the PLL. 

MC145170.DLL relies on NTPORT from Upper Canada Technologies to allow access to the port hardware under all supported versions of Windows.  You can obtain NTPORT at Upper Canada Technologies web site.  Please remember to register NTPORT as it is not freeware.

MC145170.DLL is supplied as a ZIP file.  To install do the following:

Using MC145170.DLL from your Program

The following is sample Visual Basic code to set the PLL configuration options and the frequency to 144mhz using 10khz tuning steps.

Public pll As Object
Set pll = CreateObject("MC145170.PLL")
pll.pll_reset
pll.pll_configure
pll.pll_rload
pll.pll_nload 144000000

This sample code shows the use of the 4 methods in the MC145170.DLL

MC145170.DLL Methods

pll_reset

Sends the reset sequence to the MC145170.

pll_configure

Loads the MC145170 C register.
pll_rload
Loads the MC145170 R register.
pll_nload (frequency)
Loads the MC145170 N register.

MC145170.DLL Properties

Property Type Register Notes
port Integer Parallel Port Address
pol Integer (0/1) C Phase Detector Polarity
pdab Integer (0/1) C Phase Detector A/B Selection
lde Integer (0/1) C Lock Detect Output
osc2 Integer (0/1) C REFout Frequency Bit 2
osc1 Integer (0/1) C REFout Frequency Bit 1
osc0 Integer (0/1) C REFout Frequency Bit 0
fve Integer (0/1) C fVE Output
fr Integer (0/1) C fR Output
osc Double (hz) R PLL Reference Oscillator Frequency
stp Double (hz) R PLL Turing Step
pdin Integer (2..9) DIN LPT Pin
penb Integer (2..9) ENB LPT Pin
pclk Integer (2..9) CLK LPT Pin

Notes:

  1. Changes made to C register properties are loaded into the PLL by pll_configure
  2. Changes made to R register properties are loaded into the PLL by pll_rload

Methods must always be called in the following order:
pll_reset
pll_configure
pll_rload
pll_nload (frequency)

Configuration options with the recommended values for the EXP-1 are as follows:

Option EXP-1 Register Note
Phase Detector Output Polarity Off C Not Inverted
Phase Detector A/B Selection On C Phase Detector B
Lock Detect Output Off C Disabled
REFout Frequency Off C Static Low
fVE Output Off C Disabled
fR Output Off C Disabled
PLL Reference Oscillator Frequency 10000000 R hz
PLL Tuning Step 5000 R hz
Printer Port DIN Pin 5
Printer Port ENB Pin 6
Printer Port CLK Pin 7

Notes:

  1. Options with a Register are documented in the MC145170 PLL Data Sheet.
  2. The 'PLL Reference Oscillator Frequency' is divided by 'PLL Tuning Step' to get the R register value.
  3. 'Printer Port DIN Pin, ENB Pin and CLK Pin'  define the printer port pins that are connected to the appropriate PLL pins.  Note that the values are pin numbers on the PC which are not the same as bit numbers.