Advertisement

DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd.
1.1 Product Overview ------------------------------------------------------------------------------------------------------------------------2
1.2 Board Resource Introduction ---------------------------------------------------------------------------------------------------------2
1.3 Product Schematics ---------------------------------------------------------------------------------------------------------------------4
2.1 MPLAB Installation ----------------------------------------------------------------------------------------------------------------------5
2.2 MPLAB Simple Application -----------------------------------------------------------------------------------------------------------5
2.2.1 Create a Simple Project -------------------------------------------------------------------------------------------------------------5
2.2.2 Program Debugging ------------------------------------------------------------------------------------------------------------------7
3.1 Get to Know MCD2 ---------------------------------------------------------------------------------------------------------------------9
3.2 MCD2 Connection ----------------------------------------------------------------------------------------------------------------------10
3.3 MCD2 FAQ --------------------------------------------------------------------------------------------------------------------------------12
Chapter 4: DEMO-II System Functional Modules Details
4.1 All I/O External Output Module -------------------------------------------------------------------------------------------------------13
4.2 Chip Socket and Clock Selection ----------------------------------------------------------------------------------------------------14
4.3 Power Module -----------------------------------------------------------------------------------------------------------------------------15
4.4 4*4 Matrix Keyboard Module-----------------------------------------------------------------------------------------------------------16
4.5 Simulation Interface and Reset Button ---------------------------------------------------------------------------------------------17
4.6 RS232 Module ----------------------------------------------------------------------------------------------------------------------------18
4.7 DS18B20 Module ------------------------------------------------------------------------------------------------------------------------19
4.8 SPI Communication Module ----------------------------------------------------------------------------------------------------------20
4.9 IIC Communication Module -----------------------------------------------------------------------------------------------------------21
4.10 LCD12864 and 1602 LCD Module ------------------------------------------------------------------------------------------------22
4.11 A/D Converter Module -----------------------------------------------------------------------------------------------------------------23
4.12 Remote Control Receiver & Decoder Module ----------------------------------------------------------------------------------24
4.13 Six-digital Display Module ------------------------------------------------------------------------------------------------------------25
4.14 8 play-in-turn Light Module -----------------------------------------------------------------------------------------------------------26
4.15 Stepper Motor Module -----------------------------------------------------------------------------------------------------------------27
4.16 Beeper Module --------------------------------------------------------------------------------------------------------------------------28
4.17 Independent Key and External Interrupt Module------------------------------------------------------------------------------ 29
Chapter 5: Practice of DEMO-II Development Board---------------------------------------------------------------------------30
Appendix 1: Packing List and Contact ----------------------------------------------------------------------------------------------33
Page 1 of 33

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MCD-DEMO-II and is the answer not in the manual?

Questions and answers

Summary of Contents for Qianglongsheng Electronic Technology MCD-DEMO-II

  • Page 1: Table Of Contents

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. Chapter 1: MCD-DEMO-II Development Board System Introduction 1.1 Product Overview ------------------------------------------------------------------------------------------------------------------------2 1.2 Board Resource Introduction ---------------------------------------------------------------------------------------------------------2 1.3 Product Schematics ---------------------------------------------------------------------------------------------------------------------4 Chapter 2: MPLAB IDE Integrated Development Environment 2.1 MPLAB Installation ----------------------------------------------------------------------------------------------------------------------5 2.2 MPLAB Simple Application -----------------------------------------------------------------------------------------------------------5...
  • Page 2: Chapter 1: Mcd-Demo-Ii Development Board System Introduction

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. MCD-DEMO-II Development Board System Introduction 1.1 Product Overview MCD-DEMO PIC DEVELOPMENT BOARD II (hereinafter referred to DEMO-II) is a multifunctional PIC microcontroller development platform which has been carefully designed and developed by Qianglongsheng Electronic Technology (Shenzhen) Co., Ltd.
  • Page 3 DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 6) DS18B20 module 7) SPI communication module 8) IIC communication module 9) LCD12864 and 1602 LCD module 10) A/D converter module 11) Reset button 12) 4*4 matrix keyboard module 13) Remote control receiver & decoder module 14) six-digital display module 15) 8 on-in-turn light module 16) Stepper motor module...
  • Page 4: Product Schematics

    RB 6 RB 2 RB 6 RB 3 RB 7 RB 3 RB 7 RB 4 RB 4 DIRECT Titl e MCD-DEMO-II BOARD(2) 28PIN PORT ACCESS Size Number Revision Date: 10-Apr-2008 Sheet of File: E:\cxq\mcd-demoii _ sl\demo.DDB Drawn B y:...
  • Page 5: Chapter 2 Mplab Ide Integrated Development Environment

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. Chapter 2 MPLAB IDE Integrated Development Environment MPLAB IDE (hereinafter referred as MPLAB) is the powerful software integrated development environment provided by Microchip for its PIC microcontroller. It allows users to create, record, edit and comply programs of microcontrollers of PIC series on their own computer systems, and it even can achieves dynamic simulation and debugging and run like virtual exercises.
  • Page 6 DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. Directory saved to File name Figure 2-3 Save source codes Figure 2-4 Project wizard welcome interface Use the wizard to create project files step 1, Chose menu command to come to the Welcome interface shown as Figure 2-4. ProjectàProject Wizard Step 2, directly click "Next", and select chip model, as shown in Figure 2-5.
  • Page 7: Program Debugging

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. Step 6, click "Next", as shown in Figure 2-9 to come to tips interface. Figure 2-9 Tip interface Step 7, directly click "Done", and exit the wizard. So far, we have completed establishing a project the source. For more details, please refer to MPLAB Operation Manual. 2.2.2 Debugging the program Based on the source code edited and project created in above, this section will show you a brief introduction about complying and debugging a program.
  • Page 8 DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. Debugging Debugging program is to test whether the program you deigned is operational, whether it produces correct result as wanted, whether there’s any defects in your design, whether the algorithm design is reasonable, and whether it can accurately control the various hardware resources, and whether it can obtain desired results.
  • Page 9: Chapter 3: Use Of On-Line Debugger Mcd2

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. Chapter 3: Use of On-line Debugger MCD2 This chapter briefly introduces the installation of MCD2 , the connection of MCD2 to PC as well as the DEMO-II, and the common troubleshooting. For more detailed information, please refer to MCD2 User Manual. 3.1 Get to Know MCD2 MCD2 is designed and produced by our company.
  • Page 10: Mcd2 Connection

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 3.2 MCD2 Connections MCD2 PC and the user target board must be properly connected before it can work properly. MCD2 and DEMO-II connection The connection between MCD2 and DEMO-II is shown in Figure 3-2. input external Connect MCD2...
  • Page 11 DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. IDE/Drivers98/ICD2_USB. If the OS is Windows XP, this INF file locates in X: / Program Files / MPLAB IDE / Drivers XP/ICD2_USB under) (here X refers to the IDE C or D where the MPLAB is installed) Note: Please do not connect the MCD2 and PC through USB before installation of MPLAB IDE 6.XX.
  • Page 12: Mcd2 Faq

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 3.3 MCD2 FAQ 1, ICDWarn0020: Invalid target device id……? In this issue, please confirm the following: 1) the chip board is correct. 2) whether the communication between the chip and MCD2 is good or not (whether there is a 5-pin multiplexing). 3) whether there are components such as capacitor and diode on VPP pin.
  • Page 13: All I/O External Output Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. Chapter 4: DEMO-II System Functional Module Details This chapter will describe in more detail on DEMO-II development board and the functional modules by illustrating the schematics of the modules and the points that needs to pay attention to during usage. And in the CD-ROM that is provided along with the product, we have included a number of examples prepared by using such functional modules, and these examples cover the layout of the hardware and software, and the source code with detailed annotation in Chinese as well as the executed results, which aids to the reference especially for beginners.
  • Page 14: Chip Socket And Clock Selection

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.2 Chip Socket and Clock Selection The module consists of the following major components: 1) 40pin chip socket. 2) 28pin chip socket. 3) The system clock selection (crystal or external RC). DEMO-II can support all 40pin and 20pin PIC16FXXX and PIC18FXXX chips whose pins are compatible with PIC16F87X, as shown in Figure 4-2.
  • Page 15: Power Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.3 Power Module The Power Development Board adopted the bridge rectifier circuits, we need not consider the polarity of external power, the output voltage range is 7.5-9 V and the DC or AC power with current more than 200 mA can be used directly. The module is shown in Figure 4-4.
  • Page 16: 4*4 Matrix Keyboard Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.4 4*4 Matrix Keyboard The module has the following main components: 1) 16 keys. 2) coding switching. 3) interface socket. 4) up-pull resistance. 4x4 matrix keyboard Descriptions on this module are as below: 1) 16 keys connected to the 8 pins in accordance with the mode 4x4 PORTC.
  • Page 17: Simulation Interface And Reset Button

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.5 Simulation Interface and Reset Button Simulation interface is reserved for user to connect MCD2 to a simulator. The interface completely follows MCD2/ICD2 interface requirement, user may need to do no changes when using it. It is shown in Figure 4-6. Reset button is used to reset the MCU, as shown in Figure 4-7.
  • Page 18: Rs232 Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.6 RS232 Communication Module The modules mainly shows how for the MCU to communicate with external devices such as PC by using USART module , as shown in Figure 4-9. The module consists of the following main components: 1) RS232 voltage level converter chip 2) RS232 communication port (9-pin serial port) 3) two jumper wires J15 and J16...
  • Page 19: Ds18B20 Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.7 DS18B20 Temperature Module This module mainly shows the use of temperature sensors DS18B20, as shown in Figure 4-11. The module consists of the following major components: 1) Temperature Sensor DS18B20 socket. 2) Jumper wire J17 (to be used as a switch).
  • Page 20: Spi Communication Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.8 SPI Communication Module This module mainly shows the SPI communication protocol through access to the external device EEPROM 93LCXXX, shown as Figure 4-13. Figure 4-13 93LCXXX EEPROM The module consists of the following components: 1) 93LCXXX EEPROM.
  • Page 21: Iic Communication Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.9 IIC Communication Module This modules mainly shows the ICC protocol through access to the external device EEPROM 24CXX, as shown in Figure 4-15: The module has the following main components: 1) 24CXX EEPROM 2) double bit coding switch Figure 4-15 24CXX EEPROM...
  • Page 22: Lcd12864 And 1602 Lcd Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.10 LCD12864 and 1602 LCD Module This modules majorly includes LCD12864 socket and 1602 LCD socket, as shown in Figure 4-17. Figure 4-17 LCD12864 and 1602 LCD sockets Descriptions of this module are as following: 1) LCD 12864LCD and 1602 are using PORTA as the control bit, PORTD as data bit.
  • Page 23: A/D Converter Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.11 A/D Converter Module This module main executes the conversion from analog signal to digital signal. A/D Converter Module This module mainly consists of the following components: 1) One 1K adjustable potentiometer. 2) Jumper wire J18.
  • Page 24: Remote Control Receiver & Decoder Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.12 Remote Control Receiver and Decoder Module This module main executes the receiving and decoding regarding infrared remote-control, as shown in Figure 4-20. Figure 4-20 Remote decoding module This module consists of the following major components: 1) Infrared remote control receiver 2) Interface Socket Descriptions on this module are as the following:...
  • Page 25: Six-Digital Display Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.13 six digital control module This module main introduces the use of multi-digital LED display, as shown in Figure 4-22. Figure 4-22 digital LED control module The module consists of the following major components: 1) 6 digital LED.
  • Page 26: Play-In-Turn Light Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.14 8 Play-in-turn Light Module This module is shown in Figure 4-24. It consists of the following main components: 1) 8 LED. 2) 8 coding switches. 3) Interface socket. Figure 4-24 8 Play-in-turn Light Module Descriptions of this module are as the following: 1) 8 LED are on when the I/O outputs HIGH voltage.
  • Page 27: Stepper Motor Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.15 Stepper Motor Module This module mainly shows the operation of stepper motor. Through the study of this section, we should understand the relevant knowledge about stepper motor. This module is shown in Figure 4-26. The module consists of the following components: 1) Stepper motor interface.
  • Page 28: Beeper Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.16 Beeper Module This module mainly shows how to use MCU to control the beeper, as shown in Figure 4-28. The main module of the following components: 1) Beeper 2) Jumper wire J17 Figure 4-28 Beeper module Descriptions about this module are as the following: 1) The beeper is connected to the RC2 pin of MCU through a jumper wire.
  • Page 29: Independent Key And External Interrupt Module

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 4.17 Independent Key and External Interrupt Module This module is independent key and external interrupt module, as shown in Figure 4-30. Figure 4-30 Independent Key and External Interrupt Module This module consists of the following main components: 1) Five independent buttons.
  • Page 30: Chapter 5 Practice Of Demo-Ii Development Board

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. Chapter 5 Practice of DEMO-II Development Board Actual practice purposes: This chapter takes the "4 * 4 matrix keyboard module" and the "six digital control module" as the basis, and have systemic introduction about the use of DEMO-II development board, including the use of MPLAB edit, compiling source and MCD2 debugging results.
  • Page 31 DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. 3) Implement the menu command or the icon to compile the source code. The ProjectàBuild ALL in the tool bar compiled results will be shown as Figure 5-2. We can see from the figure as "BUILD SUCCEEDED", which indicates that the compiling is successful and it has created a KEY4x4.HEX file under the directory of the project (only compiling succeeds can it create such a file).
  • Page 32 DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. development board, shown as Figure 5-6; Now if any key is pressed the LED will display a the number of that key, for example if K06 is pressed, the LED will display “06”, shown as Figure 5-7. Figure 5-4 Connecting information Figure 5-5 Programming Information 7) After several debug, we have basically achieved the desired results, and the debug completed.
  • Page 33: Appendix 1: Packing List And Contact

    DEMO-II Copyright of Qianlongsheng Electronics Technology (Shenzhen) Co., Ltd. Appendix 1: Packing List and Contact When you receive the products, please check the box to see if all accessories are complete. This product should include the following components: DEMO-II development board, 1 pc; PIC16F877A MCU, 1 pc;...

Table of Contents