Verify the bus frequency of the HC08 SCS08 microprocessor using a single control loop .
Freescale's HC08 and newer HCS08 microprocessor families feature common peripheral modules. Clock generators are no exception. They range from internal clocks from any I/O pin to external crystals or oscillators. Once the clock source is selected, there are a variety of options for controlling the final bus frequency. For example, connecting a 32,768Hz crystal to the MC9S08GB microprocessor allows the use of an FLL (frequency locked loop) to generate a bus frequency of up to 18.874 MHz. Selecting the source, divisor, and FLL allows for a versatile and complex setup.
Once you have written the bus clock initialization routine , you may want to verify that the bus is running at the expected speed before continuing with the rest of the project. This design proposal shows a routine (Listings 1 and 2) that outputs a square wave at any I/O port at exactly 1/9 the speed of the bus. Simply connect a frequency counter to this pin to display the bus frequency. All you have to do is move the decimal point one place to the right. Once you have verified the bus speed, you can write timers, serial I/O, and other clock-related routines with confidence.
Just write the code, first turn off interrupts and COP (Common On-Chip Processor). In the bus clock initialization routine, make sure to initialize the I/O ports you want to use as outputs. Then, just jump to the toggle clock and output the bus frequency divided by 10 until power is removed. This design uses the HC08 version of PB0 (
Listing 1) and the HCS08 version of PD0 (Listing 2). By changing the first line to identify the port and the second line to select the bit, any suitable I/O port can be used. This design also names the port with the old symbol PB, instead of the now commonly used PTB.
Original English:
Routines directly measure microcontroller-bus clock
You can verify the bus frequency of the HC08 SCS08 microcontroller with simple control loops.
Kerry Erendson, Bulova Technologies; Edited by Charles H Small and Fran Granville -- EDN, 10/25/2007
The Freescale HC08 and newer HCS08 microcontroller families have versatile peripheral modules. Their clock generators are no exceptions. They range from the internal clock, which frees I/O pins, to external crystals or oscillators. Once you select the timing source, you have many options for controlling the final bus frequency. For instance, connecting a 32,768-Hz crystal to an MC9S08GB microcontroller allows you to use the FLL (frequency-locked loop) to generate many bus frequencies as high as 18.874 MHz. Selecting the source, the divisors, and the FLL settings allows versatility but also can get complicated.
Once you write the bus-clock-initialization routine, you may want to verify that the bus is running at the speed you intend before moving on to the rest of the project. This Design Idea presents routines that output a square wave at exactly one-tenth the bus speed on any I/O port (Listing 1 and Listing 2). Just connect a frequency counter to this pin, and it will display your bus frequency. All you have to do is move the decimal point one place to the right. Once you verify the bus speed, you can confidently write the timer, serial-I/O, and other clock-dependent routines.
You need to write code only to first disable interrupts and disable the COP (common on-chip processor). In your bus-clock-initialization routine, be sure to initialize the I/O port you want to use as an output. Then, just jump to the toggle clock, which outputs the bus frequency divided by 10 until power-down. This Design Idea uses PB0 in the HC08 version (Listing 1) and PD0 in the HCS08 version (Listing 2). You can use any available I/O
port by altering the first line to identify the port and the second line to choose a bit. Also, this Design Idea names ports with the older notation PB, instead of today’s more fashionable PTB.
Original English URL: http://www.edn.com/article/CA6491147.html
Previous article:PAC platform provides new measurement and control solutions for the oil and gas industry
Next article:Analysis of load current measurement methods
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- GCC GD32E230 toolchain startup and linking files
- Semiconductor Recruitment-Shanghai, Shenzhen, Hangzhou
- LCR parallel resonance
- How to implement the 0-10V circuit of the inverter and motor speed control interface?
- BLE over-the-air upgrade
- Why does the ringing occur due to the incontinuous operation?
- Module Power Structure Design Guide
- 【Help】ADC acquisition
- MSP430G2755 Main Bootloader UART Porting Guide
- CH224D Review: USB PD Portable Soldering Iron is Here