Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
2 ratings:
 2.5 out of 5     Rate this Document

How Do I Set the Clock Frequency of the NAT9914 Chip?

Hardware: GPIB>>ASICs/OEM Products>>NAT4882

Problem:
I have read Chapter 5 (Software Considerations) of the NAT9914 Reference Manual, but I still have questions on how to set the clock frequency of this chip. What are the steps to set the clock frequency to something other than the default frequency of 5 MHz?

Solution:
The NAT9914 Reference Manual states in Chapter 5 that you can:

"Set the clock frequency of the NAT9914 by writing to the Internal Count Register (ICR) and the Modify Internal Count Register (MICR) bit in ICR2....Notice that the NAT9914 must be in 7210 mode to write to the MICR bit."

Although the manual describes the steps for writing to the MICR bit, it does not explain how to write the clock frequency to the Internal Count Register. ICR is a hidden register at the same offset as the Accessory Register (ACCR, offset 2). However, ACCR itself is a Paged register, which means you must use a Page-In command to gain access to it.

  1. Write the Page-In command for the ACCR (in this case a hex 9F) to the Auxiliary Command Register (AUXCR) to gain access to the ACCR. The AUXCR is at offset 3.
  2. Now that you have access to the ACCR, you need to write to the ICR, which is hidden at the same location (offset 2). The value you write is dependent upon the clock frequency you wish to use (there is a table of allowable clock frequencies under the description for the Internal Counter Register, Chapter 3 of the NAT9914 Reference Manual). For example, if you want to use a clock frequency of 20 MHz, then you must write a hex 2A to the ICR.
  3. Finally, you must clear the Page-In condition by writing a hex 9C to the AUXCR.

The clock frequency portion of your code would look something like this (for a frequency of 20 MHz):

_outp(gpib_addr + 3, 0x9F) // page-in for ACCR
_outp(gpib_addr + 2, 0x2A) // set ICR to 20 MHz
_outp(gpib_addr + 3, 0x9C) // clear page-in

You would then follow the procedure for setting the MICR bit, as described in Chapter 5 of the NAT9914 Reference Manual. The value of the MICR bit plays a role in the clock frequency setting of the NAT9914, as shown in the table of allowable clock frequencies (under the description for the Internal Counter Register, Chapter 3 of the NAT9914 Reference Manual).

Related Links:
KnowledgeBase 11O7MUQA: NAT9914 Reference Manual Discrepancies
Product Manual: NAT9914 Reference Manual

Attachments:





Report Date: 06/30/1999
Last Updated: 05/16/2008
Document ID: 1MTK7NPH

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit