/* swspeed.c This sample program demonstrates how to change the clock speed between 3MHz and 6MHz using the functions lp31Clk3MHz and lp31Clk6MHz. Compile this program and single step through the code using F7 or F8. Do not, however, open the disassembly window. If you want to verify the speed is indeed updated, you may want to keep a watch list of the following: inport(0x1f) CLOCKSPEED You can also probe the clock from the processor to verify the change in clock speed. Note that even if you are debugging through RS232 channel 0, the communication is not broken when clock speed is switched. This is because the functions lp31Clk3MHz and lp31Clk6MHz also adjust the baud rate generator for channel 0 if necessary. If channel 0 is not used for debugging, its baudrate will *not* be adjusted. */ #use eziolp31.lib main() { eioBrdInit(0); lp31Clk3MHz(); lp31Clk6MHz(); }