Freescale Semiconductor MCS08QG8 Скачать руководство пользователя страница 99

TM

Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale 
Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005.

Slide 98

Lab 6 – ADC Temperature Sensor

Select Option 7: ADC test

Main Test Menu:

1: ICS setup
2: TPM PWM setup
3: MTIM setup
4: RTI setup
5: STOP test
6: ACMP test
7: ADC test

Select number to execute: 7

Содержание MCS08QG8

Страница 1: ...cale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 TM 8 bit Low P...

Страница 2: ...le Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 1 Agenda MC9S08QG8 Demo Kit CodeWarrior Installation Lab 1 Co...

Страница 3: ...vice names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 2 MCS08QG8 Demo Kit DEMO9S08QG8 DEMO9S08QG8 Demo Board DEMO9S08QG8 User Guide DEMO9S08QG8 Quick Start Guid...

Страница 4: ...iconductor Inc 2005 Slide 3 MCS08QG8 Demo Kit Features Integrated USB BDM RS 232 Serial Port w DB9 Connector SPI IIC ports available on Connector J1 External 32 768 kHz Clock Oscillator not installed...

Страница 5: ...re the property of their respective owners Freescale Semiconductor Inc 2005 Slide 4 MCS08QG8 Demo Kit Jumpers USER_EN PWR_SEL COM_SEL VX_EN OSC_EN not installed Connectors 32 pin MCU I O Connector 2 0...

Страница 6: ...application to execute when power is applied to the board or the RESET button is pressed Use the following settings to configure the DEMO908QG8 board for RUN Mode using the USB bus to power the board...

Страница 7: ...d Proprietary Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semico...

Страница 8: ...etary Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor...

Страница 9: ...ietary Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor...

Страница 10: ...y Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc...

Страница 11: ...ary Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor In...

Страница 12: ...ry Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc...

Страница 13: ...etary Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor...

Страница 14: ...o input ports PTA2 and PTA3 respectively LED Indicators MCU ports PTB6 and PTB7 drive LED1 and LED2 respectively Potentiometer The potentiometer is connected between VDD and GND with the center tap pr...

Страница 15: ...ietary Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor...

Страница 16: ...ary Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor In...

Страница 17: ...Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2...

Страница 18: ...nd make sure they are in the default position Use Figure 1 as a guide 2 Connect the USB cable to the PC and then to the board If you are using this board for the first time please follow the instructi...

Страница 19: ...heir respective owners Freescale Semiconductor Inc 2005 Slide 18 CodeWarrior Installation 1 Install CodeWarrior HC S 08 CD Reference CodeWarrior Quick Start Section A 2 Install CodeWarrior Service Pac...

Страница 20: ...rks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 19 Lab 1 CodeWarrior Project 1 Create a new pro...

Страница 21: ...on Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide...

Страница 22: ...e trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 21 Lab 1 CodeWarrior Project 3 Select...

Страница 23: ...oduct or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 22 Lab 1 CodeWarrior Project 4 Once the root directory for the project has been located enter...

Страница 24: ...Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 23 Lab 1 CodeWarrior Project 6 In the Project name field you ma...

Страница 25: ...e and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 24 Lab 1 Co...

Страница 26: ...and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 25 Lab 1 Cod...

Страница 27: ...ks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 26 Lab 1 CodeWarrior Project 10 Processor expert...

Страница 28: ...ale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 27 Lab 1...

Страница 29: ...e Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 28 Lab 1 CodeWarrio...

Страница 30: ...Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 29 Lab 1 CodeWarrior...

Страница 31: ...d the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 30 Lab 1 CodeWa...

Страница 32: ...demarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 31 Lab 1 CodeWarrior Project 15 Connection...

Страница 33: ...Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 32 Lab 1 CodeWarrior Project 16 Once the project wizar...

Страница 34: ...reescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 33 Lab 1 CodeWarrior P...

Страница 35: ...rks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 34 Lab 1 CodeWarrior Project 18 This project co...

Страница 36: ...reescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 35 L...

Страница 37: ...mes are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 36 Lab 1 CodeWarrior Project 2 We will use the Demo_S08_Test application code to demonstrate debugging Software i...

Страница 38: ...the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 37 Lab 1 CodeWar...

Страница 39: ...he Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 38 Lab 1 CodeWarri...

Страница 40: ...ir respective owners Freescale Semiconductor Inc 2005 Slide 39 Lab 1 CodeWarrior Debugging 5 Select Debug GREEN ARROW This compiles and links the code and invokes the True Time simulator and Real Time...

Страница 41: ...and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 40 Lab 1 Cod...

Страница 42: ...the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 41 Lab 1 CodeWarr...

Страница 43: ...Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 42 Lab 1 CodeWarrior...

Страница 44: ...e Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 43 Lab 1 CodeWarrior Debugging 9 Once BDM communication has be...

Страница 45: ...ale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 44 Lab 1 CodeWarrior Debugg...

Страница 46: ...reescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 45 Lab 1 CodeWarrior D...

Страница 47: ...ners Freescale Semiconductor Inc 2005 Slide 46 Lab 2 Example Application This lab code is intended to introduce the DEMO9S08QG8 demo board Connecting a serial cable from the DEMO9S08QG8 to a PC with a...

Страница 48: ...rty of their respective owners Freescale Semiconductor Inc 2005 Slide 47 Lab 2 Example Application Requirements DEMO9S08QG8 demo board with an MC9S08QG8 in the 16 DIP socket DB9 serial cable CodeWarri...

Страница 49: ...05 Slide 48 Lab 2 Example Application Setting up the Demo 1 Connect the DEMO9S08QG8 to the PC as described in the Quick Start Guide The jumper configuration for this application is COM_EN jumper remov...

Страница 50: ...Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 49 Lab 2 Example Application Setting up the Demo 4 Co...

Страница 51: ...ale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 50 Lab 2 Example Applicatio...

Страница 52: ...f their respective owners Freescale Semiconductor Inc 2005 Slide 51 Lab 2 Example Application Running the Demo If everything is configured correctly the terminal window will display the following as s...

Страница 53: ...go are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 52 Lab 3 Internal Clock Source 16...

Страница 54: ...nternal 32 kHz reference Internal or external reference clocks up to 5 MHz can be used to control the FLL 3 bit select for reference divider is provided Internal reference clock has 9 trim bits availa...

Страница 55: ...ale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 54 Lab 3 Internal Clock Sou...

Страница 56: ...supplies a clock derived from the FLL which is controlled by the internal reference clock FLL Bypassed Internal FBI In this mode the FLL is enabled and controlled by the internal reference clock but i...

Страница 57: ...FBE In this mode the FLL is enabled and controlled by an external reference clock but it is bypassed The ICS supplies a clock derived from the external reference clock FLL Bypassed External Low Power...

Страница 58: ...Lab 3 Internal Clock Source ICS Control Register 1 CLKS bits select the clock source that controls the bus frequency RDIV bits select the amount to divide down the FLL reference clock IREFS selects be...

Страница 59: ...source selected by the CLKS bits RANGE selects high frequency 1 or low frequency 0 range for the external oscillator HGO configures the external oscillator for high gain 1 or low power 0 operation LP...

Страница 60: ...are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 59 Lab 3 Internal Clock Source ICS Status and Control Register CLKST bits indicate the current clock mode OSCINIT thi...

Страница 61: ...ctive owners Freescale Semiconductor Inc 2005 Slide 60 Lab 3 Internal Clock Source ICS Trim Register TRIM bits control the internal reference clock frequency by controlling the internal reference cloc...

Страница 62: ...le Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 61 Lab 3 Internal Clock Source Select Option 1 ICS setup Main...

Страница 63: ...3 Internal Clock Source Select Option 2 ICS in FEI BDIV 2 ICS Setup Menu 1 ICS in FEI BDIV 1 set BAUD to 4800 bps 8 MHz bus 2 ICS in FEI BDIV 2 set BAUD to 4800 bps 4 MHz bus 3 ICS in FEI BDIV 4 set...

Страница 64: ...2005 Slide 63 Lab 3 Internal Clock Source ICS Application Code load trim value if location not blank if NVICSTRM 0xFF ICSTRM NVICSTRM output of FLL is selected reference divider 1 internal reference c...

Страница 65: ...FEE or FBE mode input clock source must be divisible using RDIV to within the range of 31 25 kHz to 39 0625 kHz Check the External and Internal Oscillator Characteristics Appendix for electrical and t...

Страница 66: ...prietary Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconduct...

Страница 67: ...e Modulo Timer features include 8 bit up counter Free running or 8 bit modulo limit Software controllable interrupt on overflow Counter reset bit TRST Counter stop bit TSTP Four software selectable cl...

Страница 68: ...ductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 67 Lab 4 Modulo Timer Module MTIM Status and Control Register MTIMSC co...

Страница 69: ...re trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 68 Lab 4 Modulo Timer Module MTIM Clo...

Страница 70: ...ale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 69 Lab 4 Modulo Timer Module Select Option 3 MTIM setup Main...

Страница 71: ...r service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 70 Lab 4 Modulo Timer Module MTIM Setup Set Prescaler Modulo and Clock Source as shown in MTIM Setup...

Страница 72: ...e Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 71 Lab 4 Modulo Timer Module MTIM will toggle LED1 at 32 Hz LE...

Страница 73: ...oprietary Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconduc...

Страница 74: ...Freescale Semiconductor Inc 2005 Slide 73 Lab 5 Analog Comparator ACMP has the following features Full rail to rail supply operation Less than 40 mV of input offset Less than 15 mV of hysteresis Sele...

Страница 75: ...or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 74 Lab 5 Analog Comparator 1 Configure the Analog Comparator Register ACMPSC 2 Declare ACMP interru...

Страница 76: ...cale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 75 Lab 5 Analog Comparator Select Option 6 ACMP test Main T...

Страница 77: ...Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 76 Lab 5 Analog Comparator Select Option 1 Enable ACMP Analog Comparator Menu...

Страница 78: ...e Semiconductor Inc 2005 Slide 77 Lab 5 Analog Comparator When enabled the ACMP Analog Comparator test configures the ACMP to compare the voltage on the photosensor RZ1 to the potentiometer RV1 The ou...

Страница 79: ...e owners Freescale Semiconductor Inc 2005 Slide 78 Lab 5 Analog Comparator Use a business card to block light to RZ1 photo sensor Application code will measure number of seconds between toggles The di...

Страница 80: ...and Proprietary Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Sem...

Страница 81: ...e 80 Lab 6 ADC ADC Features Eight input channels for the QG8 Two options for resolution 8 bit or 10 bit configurable by software Conversion type adaptable to each application allows single or continuo...

Страница 82: ...roperty of their respective owners Freescale Semiconductor Inc 2005 Slide 81 Lab 6 ADC ADC Pin Control Registers They are used to disable the I O port control of MCU pins used as analog inputs APCTL1...

Страница 83: ...are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 82 Lab 6 ADC ADC Status and Control Registers Writing ADCSC1 aborts the current conversion and initiates a new conve...

Страница 84: ...are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 83 Lab 6 ADC ADC Data Result Registers ADCRH contains the upper two bits of the result of a 10 bit conversion When co...

Страница 85: ...Freescale Semiconductor Inc 2005 Slide 84 Lab 6 ADC ADC Compare Value Register ADCCVH holds the upper two bits of the 10 bit compare value These bits are compared to the upper two bits of the result f...

Страница 86: ...ks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 85 Lab 6 ADC ADC Configuration Register ADCCFG i...

Страница 87: ...of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 86 Lab 6 ADC Select Option 7 ADC test Main Test Men...

Страница 88: ...oduct or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 87 Lab 6 ADC Select Option 1 Meas RV1 RZ1 ADC Menu 1 Meas RV1 RZ1 2 Meas Internal Bandgap e Ex...

Страница 89: ...her product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 88 Lab 6 ADC ADC Measurements Adjust RV1 potentiometer and cover RZ1 with paper photo se...

Страница 90: ...property of their respective owners Freescale Semiconductor Inc 2005 Slide 89 Lab 6 ADC Select Option 2 Meas Internal Bandgap ADC Menu 1 Meas RV1 RZ1 2 Meas Internal Bandgap e Exit ADC menu Select tes...

Страница 91: ...or Inc 2005 Slide 90 Lab 6 ADC Temperature Sensor Edit Application Code to include Temperature Sensor measurement code Internal temperature sensor is multiplexed on ADC channel 26 0x1A Append code to...

Страница 92: ...e Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 91 Lab 6 ADC Temper...

Страница 93: ...ir respective owners Freescale Semiconductor Inc 2005 Slide 92 Lab 6 ADC Temperature Sensor 2 Select Debug GREEN ARROW This compiles and links the code and invokes the True Time simulator and Real Tim...

Страница 94: ...and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 93 Lab 6 ADC...

Страница 95: ...the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 94 Lab 6 ADC Temp...

Страница 96: ...e logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 95 Lab 6 ADC Temperature Sens...

Страница 97: ...trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 96 Lab 6 ADC Temperature Sensor 5 Once c...

Страница 98: ...nd the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 97 Lab 6 ADC T...

Страница 99: ...le Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 98 Lab 6 ADC Temperature Sensor Select Option 7 ADC test Main...

Страница 100: ...other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005 Slide 99 Lab 6 ADC Temperature Sensor ADC Options ADC Menu 1 Meas RV1 RZ1 2 Meas Internal B...

Страница 101: ...ide 100 Lab 6 ADC Temperature Sensor Temperature Conversion Temp 25 VTEMP VTEMP25 m where VTEMP is the voltage of the temperature sensor channel at the ambient temperature VTEMP25 is the voltage of th...

Страница 102: ...ormation Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Freescale Semiconductor Inc 2005...

Страница 103: ...idential and Proprietary Information Freescale and the Freescale logo are trademarks of Freescale Semiconductor Inc All other product or service names are the property of their respective owners Frees...

Отзывы: