I am confused by the documentation. It states in the "Getting Started" book that the XTAL [directive in the Target dialog] specifies the CPU clock for my device. "In most cases this value is inentical with the XTAL frequency." When is it not? And if not what do I enter into the field? I am using the EZUSB part from Cypress. I believe that the actual CPU clock speed for a 12MHz crystal would be 48MHz. Should I enter 12 or 48?
'In most cases this value is identical with the XTAL frequency' This should probably read: 'This value is predefined to the maximum XTAL frequency specified for the device.' When would you set this to a different value? Well, if you use a device at 11.0592MHz, you should set the XTAL frequency to that number. Even though, the part CAN run at 12.000MHz. Why would you do this? The Keil simulator uses the XTAL frequency to establish timing values like how many real-time seconds it takes to execute instructions and serial port baud rate calculations. Does the Keil simulator correctly simulate the timing behavoir of the devices? In most cases, yes. However, you should consider that last year 2 8051-compatible devices were added each week of the year (100 per year). It takes about 1 month to add complete peripheral simulation support for a new device. If a totally unique device is created, it requires a minimum of 1 month before we totally simulate every part of that device. Fortunately, most new devices are derivatives of devices already simulated completely. You can click on the Simulation link for a chip from the device database (http://www.keil.com/dd) to find out what on-chip peripherals are simulated. Most are simulated completely. A default peripheral simulation driver is used for devices that are not completely simulated. This is indicated in uVision2 and on the web site for the list of simulated peripherals. Currently the Cygnal devices are not fully simulated. The primary reason for this is that Cygnal offers a JTAG debugger that can interface to your target hardware. We are constantly adding simulation support for the devices that are not currently 100% simulated. However, this process takes time. Jon
"The Keil simulator uses the XTAL frequency to establish timing values like how many real-time seconds it takes to execute instructions and serial port baud rate calculations." As we guessed - but why doesn't the manual clearly tell us that?! The point of having a manual is so that we can read it and know how to use the product - not try to guess what needs to be entered for a particular setting!! We still don't know when we should enter the crystal frequency, and when we should enter something else; nor how to determine the "something else" value in those "unusual" cases!