AMX Target Guide Computer Accessories User Manual


 
AMX 68000 Target Guide
K
A
DAK
27
Software I/O Delay
AMX provides a device I/O delay procedure cjcfhwdelay which is used by AMX board
support modules and sample device drivers to provide the necessary delay between
sequential references to a device I/O port. Such delay is often required to accommodate
long device access times when operating at very high processor clock frequencies.
Check this box to adjust the AMX software delay loop to match your hardware
requirements. Enter your best estimate of the processor's effective instruction execution
frequency. AMX will use this parameter to derive the loop count needed to provide a one
microsecond delay.
For example, if your processor executes at 40 MHz with no wait states for instruction
fetches and one clock cycle per instruction, enter a CPU clock frequency of 40 MHz.
If you are able to detect the processor frequency at run time, then you can dynamically
adjust this I/O delay procedure to match your target hardware without reconfiguring your
AMX application. To do so, enter a CPU frequency of 0 MHz. In this case, your main()
program must install the processor frequency value into long variable cjcfhwdelayf
prior to launching AMX.
Leave this box unchecked if you want the I/O delay procedure cjcfhwdelay to produce
no delay beyond that inherent in the procedure call and return.