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:
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: