| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
2001 Microchip Technology Inc. DS39024B "All rights reserved
Top Searches for this datasheetPICDEM17 DEMONSTRATION BOARD USER'S GUIDE 2001 Microchip Technology Inc. DS39024B "All rights reserved. Copyright 2001, Microchip Technology Incorporated, USA. Information contained this publication regarding device applications like intended through suggestion only superseded updates. representation warranty given liability assumed Microchip Technology Incorporated with respect accuracy such information, infringement patents other intellectual property rights arising from such otherwise. Microchip's products critical components life support systems authorized except with express written approval Microchip. licenses conveyed, implicitly otherwise, under intellectual property rights. Microchip logo name registered trademarks Microchip Technology Inc. U.S.A. other countries. rights reserved. other trademarks mentioned herein property their respective companies. licenses conveyed, implicitly otherwise, under intellectual property rights." Trademarks Microchip name, logo, PIC, PICmicro, PICMASTER, PICSTART, MATE, KEELOQ, SEEVAL, MPLAB Embedded Control Solutions Company registered trademarks Microchip Technology Incorporated U.S.A. other countries. Total Endurance, In-Circuit Serial Programming (ICSP), FilterLab, FlexROM, fuzzyLAB, ICEPIC, microID, MPASM, MPLIB, MPLINK, MXDEV, PICDEM Migratable Memory trademarks Microchip Technology Incorporated U.S.A. Serialized Quick Term Programming (SQTP) service mark Microchip Technology Incorporated U.S.A. other trademarks mentioned herein property their respective companies. 2001, Microchip Technology Incorporated, Printed U.S.A., Rights Reserved. Microchip received QS-9000 quality system certification worldwide headquarters, design wafer fabrication facilities Chandler Tempe, Arizona July 1999. Company's quality system processes procedures QS-9000 compliant PICmicro® 8-bit MCUs, KEELOQ® code hopping devices, Serial EEPROMs microperipheral products. addition, Microchip's quality system design manufacture development systems 9001 certified. DS39024B 2001 Microchip Technology Inc. PREFACE Chapter PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Table Contents Welcome Documentation Layout About PICDEM Demonstration Board Introduction Highlights Processor Sockets External FLASH Memory Memory Mapping Power Supply Prototyping Areas Oscillator Options RS-232 Serial Ports 1.10 Push-button Switches 1.11 LEDs 1.12 Analog Circuitry 1.13 External Interface 1.14 Interface 1.15 24LC01B Serial EEPROM 1.16 Modular Connectors 1.17 Pre-programmed Sample Chapter Using PICDEM Monitor Introduction Highlights Installing PICDEM Monitor Program Using PICDEM Monitor Program Resetting PICDEM Demonstration Board Erasing FLASH PICDEM Demonstration Board 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Downloading Files PICDEM Demonstration Board Running files from PICDEM Demonstration Board Running Diagnostics PICDEM Demonstration Board 2.10 Modifying Memory Contents Chapter Hardware Description Introduction Highlights Port Connections Push-button Switches Switches RS-232 Interface Interface Modular Connectors Chapter Using MPLAB® Compiler Introduction Highlights Linker Script File Startup Code File Interrupt Code File Other Files Chapter LCD.C Description Introduction MPLAB Project Files PICmicro® Libraries Source Code Descriptions LCD.C Source Code Listing XLCD.H Source Code Listing XLCD.C Source Code Listing Chapter USART.C Description Introduction DS39024B-page 2001 Microchip Technology Inc. Table Contents Highlights MPLAB Project Files PICmicro Libraries Source Code Descriptions USART.C Source Code Listing Chapter ANALOG.C Description Introduction PICmicro Libraries Source Code Descriptions ANALOG.C Source Code Listing Chapter SWITCH.C Description Introduction Highlights MPLAB Project Files PICmicro Libraries Source Code Descriptions SWITCH.C Source Code Listing Chapter I2C.C Description Introduction Highlights MPLAB Project Files PICmicro Libraries Source Code Descriptions I2C.C Source Code Listing Appendix PICDEM Demonstration Board Schematics Schematic Schematic Schematic Schematic 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Appendix RS-232 Communication Protocol Introduction Overview Detailed Description Appendix Floppy Disk Contents Introduction Contents Worldwide Sales Service.86 DS39024B-page 2001 Microchip Technology Inc. Welcome PICDEM17 DEMONSTRATION BOARD USER'S GUIDE PREFACE Thank purchasing PICDEM product demonstration board PIC17C7XX family microcontrollers from Microchip Technology Incorporated. PICDEM demonstration board allows quickly easily become familiar with both PIC17C7XX products MPLAB® in-circuit emulator. PICDEM demonstration board currently supports 68-pin 84-pin PLCC products. software provided with PICDEM demonstration board PIC17C7XX Monitor runs under Microsoft® Windows® only. Documentation Layout This document describes PICDEM demonstration board. detailed description demonstration software also provided give user overview PIC17C7XX series PICmicro® MCUs. Detailed usage microcontrollers, MPLAB IDE, MPLAB in-circuit emulator deferred individual product data sheets user's manuals, respectively. Chapter Introduction This chapter introduces PICDEM demonstration board provides brief description hardware. Chapter Using PICDEM Monitor This chapter discusses PICDEM Monitor program pre-programmed PIC17C756A device. Chapter Hardware Description This chapter describes detail hardware PICDEM demonstration board. Chapter Using MPLAB compiler with PICDEM demonstration board This chapter provides description write compile code execution PICDEM demonstration board. Some special files required with MPLAB compiler correctly compile programs external FLASH program memory. Chapter LCD.C Description This chapter provides detailed description demonstration program PIC17C756A that interfaces external panel using Hitachi HD44780 display controller equivalent. Chapter USART.C Description This chapter provides detailed description demonstration program PIC17C756A that displays data USART. Chapter ANALOG.C Description This chapter provides detailed description demonstration program PIC17C756A that reads channel displays results Monitor program window. 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Chapter SWITCH.C Description This chapter provides detailed description memory mapping PIC17C756A provides source code interface memory mapped switches LEDs. Chapter I2C.C Description This chapter provides detailed description demonstration program PIC17C756A that reads writes data from 24LC01B Serial EEPROM. Appendix PICDEM Demonstration Board Schematics This appendix provides PICDEM demonstration board parts layout diagram board schematics. Appendix RS-232 Communication Protocol This appendix provides protocol PIC17C756A Monitor firmware communicate based software. Appendix Floppy Disk Contents This appendix contains listing files included 3.5-inch floppy disk. There also description each file when compiling programs PICDEM demonstration board PIC17C7XX microcontrollers. Appendix On-line Support This appendix provides information Microchip's electronic support services. Worldwide Sales Service This reference gives address, telephone, numbers Microchip Technology Incorporated sales service locations throughout world. DS39024B-page 2001 Microchip Technology Inc. PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Chapter About PICDEM Demonstration Board Introduction This chapter describes features PICDEM demonstration board. Highlights This chapter covers following topics: Processor Sockets External FLASH Memory Memory Mapping Power Supply Prototyping Areas Oscillator Options RS-232 Serial Ports Push-button Switches LEDs Analog Circuitry External Interface Interface 24LC01B Serial EEPROM Modular Connectors Pre-programmed Sample Note: following part references found Figure A.1.1 Appendix PICDEM Demonstration Board Schematics. example, 68-pin PLCC socket PIC17C75X microcontrollers located Parts Layout. Processor Sockets PICDEM demonstration board supports following devices: 68-pin PLCC socket PIC17C75X microcontrollers (U1) 84-pin PLCC socket PIC17C76X microcontrollers (U7) 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide External FLASH Memory PICDEM demonstration board supports operating modes PIC17C7XX PICmicro® microcontroller. However, Monitor program uses extended microcontroller mode operation. FLASH AM29F100T device from configured monitor program supports downloading code into FLASH then running program. Memory Mapping Since PIC17C756A extended microcontroller mode, there several memory mapped peripherals available user. first eight push-button switches mapped address FFFCh. eight LEDs mapped address FFFDh. There also signals that provide decoding address (LE_1) address (LE_2). These signals located digital prototyping area upper right-hand corner board. Power Supply PICDEM demonstration board provides different power supply structure user. only power input capable powering entire board connector power supply with plug capable delivering +9V, unregulated Alternating Current (AC) Direct Current (DC) used. digital components board powered from LM2940T-5.0 that capable supplying current. This digital available digital prototyping area upper right-hand corner board. analog section PICDEM demonstration board separate power source voltage reference. LM78L05 regulator provides analog circuits. also available analog prototyping area lower left-hand corner board. There also precision +4.096V reference that connected (Analog-to-Digital) well analog prototyping area. Prototyping Areas PICDEM demonstration board provides prototyping areas, analog digital. PICDEM demonstration board designed fully demonstrate capabilities on-chip converter. addition separate analog power supply voltage reference, printed circuit board four layers with signal layers power ground layer. analog prototyping area channels, analog VSS, well voltage reference available user. digital prototyping area other pins, complete 16-bit address bus, digital VSS, additional memory mapped peripheral signals. DS39024B-page 2001 Microchip Technology Inc. About PICDEM Demonstration Board Oscillator Options PICDEM demonstration board layout will only accept canned oscillator. crystal ceramic resonator requires that user modify board. RS-232 Serial Ports PICDEM demonstration board supports both USARTs PIC17C7XX devices. level shifting used convert from TTL/ CMOS levels PIC17C7XX RS-232 voltages. USART2 also capability function hardware handshaking mode using CTS. These signals level shifted connected PORTB pins (CTS) (RTS). 1.10 Push-button Switches PICDEM demonstration board general purpose push-button switches that available user. These switches connected directly pins microcontroller memory mapped into address space. switches available address FFFCh. 1.11 LEDs PICDEM demonstration board also LEDs which also memory mapped. These LEDs accessed address FFFDh. There read capability LEDs, user must have shadow register PIC17C7XX device keep track value latch. 1.12 Analog Circuitry addition power ground planes PICDEM demonstration board, also separate analog digital power supplies. Both these voltage regulators connector source. user desires power board from test points prototyping areas, then both sets test points analog digital must used. Otherwise portion board will operational. 1.13 External Interface PICDEM demonstration board provides interface external display that uses Hitachi HD4478 controller equivalent device. used 4-bit interface mode. Four data lines three control lines required operate LCD. These signals multiplexed with some converter channels. therefore important that properly initialized before used (refer Chapter board layout provides space Optrex DMC-50448N character display which available from DigiKey. 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide 1.14 Interface PICDEM demonstration board provides simple interface Bus. Microchip Technology MCP2510 Interface peripheral device with Phillips PCA82C250 device provide complete Interface solution. modular connectors allow easy interface bus. canned oscillator socket provides clock source MCP2510 which turn also provide clock source PIC17C7XX. 1.15 24LC01B Serial EEPROM PICDEM demonstration board 24LC01B Serial EEPROM capable holding bytes data. This device uses I2Cinterface PIC17C7XX PICmicro MCU. modular connectors also used create interface peripheral located board. 1.16 Modular Connectors modular connectors used connect external busses. switch used determine interface used interface. desired interface, user will have populate board with MCP2510 peripheral from Microchip Technology PCA82C250 interface device from Philips Semiconductor. Since MCP2510 uses SPIinterface, switch must configured (SCK,SDO,SDI,CS). 1.17 Pre-programmed Sample pre-programmed PIC17C756 PIC17C756A sample included with PICDEM demonstration board. been programmed with Monitor firmware communicate with Monitor program This device should used with canned oscillator socket labeled DS39024B-page 2001 Microchip Technology Inc. PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Chapter Using PICDEM Monitor Introduction This chapter discusses Monitor program interact with PIC17C7XX device PICDEM demonstration board. Highlights This chapter includes: Installing PICDEM Monitor Program Running PICDEM Monitor Program Resetting PICDEM Demonstration Board Erasing FLASH PICDEM Demonstration Board Downloading Files PICDEM Demonstration Board Running Files from PICDEM Demonstration Board Running Diagnostics PICDEM Demonstration Board Modifying Memory Contents Installing PICDEM Monitor Program PICDEM Monitor program setup routine installs monitor program, monitor source code PIC17C756A monitor source code into MPLAB® directory. Microsoft® Windows® must running execute Monitor Setup program. files installed under default MPLAB directory, C:\Program Files\MPLAB\756MON, another directory. Insert PICDEM Monitor installation disk drive From Program Manager option, type A:SETUP PICDEM Monitor Setup program displays Welcome! message with options continue exit. Click continue. Setup next displays dialog select directory install executable source code files. directory other than default desired, enter name click After copying PICDEM Monitor files, Setup displays message with caption "The PICDEM Monitor installation completed." Click 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Using PICDEM Monitor Program Monitor program uses serial port Host currently supports COM1 through COM4. command line execute Monitor program should 756MON.EXE COM? where desired port PICDEM Monitor program should look like Figure 2.1. Figure 2.1: PICDEM Monitor Program Once Monitor program been started, connect serial cable PICDEM demonstration board. Then apply power PICDEM demonstration board. PICDEM demonstration board should display following message message window Monitor Program: Boot V??.??.?? where ??.??.?? version Monitor firmware PIC17C756A. Monitor program many features including: Resetting PIC17C756A PICDEM demonstration board Erasing FLASH PICDEM demonstration board Downloading files PICDEM demonstration board Running halting operation programs Running diagnostics various PIC17C756A peripherals Reading writing Data Memory external FLASH program memory Displaying USART2 activity message window DS39024B-page 2001 Microchip Technology Inc. Using PICDEM Monitor Resetting PICDEM Demonstration Board unique feature USART2 ability reset PICmicro® MCU. This accomplished connecting signal from MCLR PICmicro using circuit Figure 2.4. Jumper also provided disable this feature. reset microcontroller, simply click Reset Monitor window. boot message should display message area. Erasing FLASH PICDEM Demonstration Board Monitor program allows external FLASH program memory device erased clicking Erase button. This simply erases FLASH memory. When download requested, PIC17C756A automatically erases FLASH. Therefore, required that FLASH erased using Erase button before download initiated. Downloading Files PICDEM Demonstration Board download file PICDEM demonstration board, first click Download. This will open Select file window that allows selection desired file load into external FLASH program memory PICDEM Figure 2.2: Select file Window Once file been selected downloading PICDEM demonstration board, Monitor will show Downloading. status window that graph display percentage download file. Initially, there will slight pause allowing PIC17C756A erase FLASH memory. 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Figure 2.3: Downloading. Window completion download, Monitor status window will have displayed Erasure Complete Download Complete message. When message window shows ready process next command. Running files from PICDEM Demonstration Board Monitor program button that starts execution code from external FLASH program memory. Once program been downloaded into FLASH memory, click button start execution. Control PIC17C756A released Monitor firmware simply writing 4000h PCLATH:PCL registers. Refer Chapter Using MPLAB® Compiler more information. Figure 2.4: Program Running PICDEM Demonstration Board only stop program from running click Reset button Monitor window. This resets PIC17C756A restores operation Monitor firmware. This method allows Data memory, interrupt vectors, stack locations available user target application. DS39024B-page 2001 Microchip Technology Inc. Using PICDEM Monitor Running Diagnostics PICDEM Demonstration Board Monitor firmware PIC17C756A provides several diagnostic routines that allow user pretested code peripheral. diagnostics include: diagnostic allows user configure channel, clock source, justification, reference. results displayed Monitor message window. During Diagnostics, switches LEDs take following functions: Increment channel number, only Toggle between internal external voltage references Toggle between right left justify clock source (FOSC/8, FOSC/32, FOSC/B4, FRC) Channel number format Internal (OFF) External (ON) voltage references Left (OFF) Right (ON) justify clock source diagnostic ends when Halt clicked Capture capture diagnostic allows user configure capture channel mode. capture results displayed Monitor message window. During Capture Diagnostics, switches LEDs take following functions: Increment capture channel, only Increment toggle mode Capture channel Capture mode diagnostic ends when Halt clicked FLASH external FLASH memory diagnostic simply writes zero's, one's, checkerboard, inverse checkerboard portion memory checks make sure that values were properly written. This diagnostic does require user interaction. This diagnostic writes incrementing count 24LC01B Serial EEPROM PICDEM demonstration board verifies that each location been properly programmed. This diagnostic does require interaction from user. 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide This diagnostic configures pins writes message external panel 4-bit mode. portF<0:3> portG<1> portG<0> portF<7> data lines this diagnostic selected these pins connected panel, then message will displayed correctly. Provided connections correct, diagnostic does require interaction from user. This diagnostic allows user select channel increment decrement period duty cycle that channel. During Diagnostics, switches LEDs take following functions: Increments channel, only Decrement duty cycle down Increment duty cycle, upper limit Decrement period down Increment period, upper limit Selects clock source, Timer1 Timer2 channel Timer source Timer1 (OFF) Timer2 (ON) diagnostic ends when Halt clicked Switches This diagnostic tests functionality memory mapped switches LEDs. Each time switch pressed corresponding turned OFF. This diagnostic ends when LEDs have been turned OFF. USART2 This diagnostic writes message Monitor program running Host. This diagnostic does require interaction from user. diagnostic, highlight desired test Diagnostics window Monitor program. Then click Execute button start test. Those tests that automatically terminate stopped using Stop button. DS39024B-page 2001 Microchip Technology Inc. Using PICDEM Monitor Figure 2.5: Running Diagnostics 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide 2.10 Modifying Memory Contents PICDEM Monitor program capability read from Data memory location internal/external Program memory location. also write Data memory location external FLASH program memory location. Writes internal program memory allowed because this memory EPROM based. Figure 2.6: Reading Data Memory read from Data memory location, user must first select Data Memory radio button Modify Memory window Monitor program. Then Data memory address must written into Address edit box. format this value bxx, where valid bank number format, value from that indicates desired address within bank read. Then click Read button. message window will reply with following message: *RDbxx:dd. represents bank address represents data found that address format. this operation first three digits Address edit used when command sent PICDEM demonstration board. additional digits ignored. DS39024B-page 2001 Microchip Technology Inc. Using PICDEM Monitor Figure 2.7: Writing Data Memory write Data memory location, user must first select Data Memory radio button Modify Memory window Monitor program. Then Data memory address must written into Address edit box. format this value bxx, where valid bank number format, value from that indicates desired address within bank write. user must also enter value written Data register Value edit box. Then click Write button. message window will reply with following message: *WDbxxdd. represents bank address represents data written address format. this operation first three digits Address edit first digits Value edit used when command sent PICDEM demonstration board. additional digits ignored. 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Figure 2.8: Reading Program Memory read from Program memory location, user must first select Program Memory radio button Modify Memory window Monitor program. Then Program memory address must written into Address edit box. format this value xxxx, where xxxx value from 0000h FFFFh that indicates desired address within address space read. Then click Read button. message window will reply with following message: *RPxxxx:dddd. xxxx represents program memory address dddd represents data that address format. this operation first four digits Address edit used when command sent PICDEM demonstration board. additional digits ignored. DS39024B-page 2001 Microchip Technology Inc. Using PICDEM Monitor Figure 2.9: Writing Program Memory write Program memory location, user must first select Program Memory radio button Modify Memory window Monitor program. Then Program memory address must written into Address edit box. format this value xxxx, where xxxx value from 0000h FFFFh that indicates desired address within bank write. user must also enter value written program memory location Value edit box. Then click Write button. message window will reply with following message: *WPxxxxdddd. xxxx represents program memory address dddd represents data written address format. this operation first four digits both Address edit Value edit used when command sent PICDEM demonstration board. additional digits ignored. firmware PIC17C756A ignores write program memory commands with address range 0000h 3FFFh. 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide NOTES: DS39024B-page 2001 Microchip Technology Inc. PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Chapter Hardware Description Introduction hardware PICDEM demonstration board simple intended illustrate ease capabilities PIC17C7XX family devices. Highlights This chapter covers following topics: Port Connections Push-button Switches Switches RS-232 Interface Interface Modular Connectors Port Connections following bullets list features port connections PIC17C7XX devices. PORTA<0:1> used PORTA<2:3> used SPITM/I2Cinterface PORTA<4:5> used USART1 interface PORTB<0:3> used PORTB<4:5> used USART2 handshaking interface (CTS:RTS) PORTB<6:7> used SPI/I2C interface PORTC PORTD dedicated external memory interface PORTE<0:2> used external memory interface ALE, respectively PORTF<0:3> used data lines external PORTF<4:6> used PORTF<7> used register select control line external PORTG<0:1> used PORTG<2> tied analog ground PORTG<3> tied +4.096V voltage reference PORTG<4:5> used PORTG<6:7> used USART2 interface PORTH<0:7> used PORTJ<0:7> used VDDs tied digital +5V, tied digital ground AVDD tied analog +5V, AVSS tied analog ground 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Push-button Switches PICDEM demonstration board total nine push-button switches. eight general purpose push-button switch inputs that available user. MCLR reset push-button switch that resets PIC17C7XX. Switches PICDEM demonstration board sets switches that control SPI/I2C interfaces. enables either pins from microcontroller peripherals. I2C, make sure positions labeled SCK, SDO, SDI, OFF. SPI, make sure position labeled SCK, SDO, SDI, second switches, S14, routes either modular connectors. This switch also labeled SDA/SCL CANH/CANL Bus. RS-232 Interface PICDEM demonstration board provides RS-232 interface device (U3) convert between RS-232 voltage levels CMOS/TTL voltage levels. Both USART1 USART2 pins routed this device well pins used hardware handshaking. connector used USART1 used USART2. Monitor program running PICDEM demonstration board uses USART2 communications channel between PICDEM demonstration board Host Interface PICDEM demonstration board layout Microchip MCP2510 peripheral PCA82C250 interface. These devices must provided user. interface user must following addition adding components board: canned oscillator remove oscillator from switch (SDA OFF, SCK, SDO, SDI, switch (SDA OFF, CANH CANL DS39024B-page 2001 Microchip Technology Inc. Hardware Description Modular Connectors described previously, modular connectors used simply connecting standard 6-conductor phone cable. Refer Figure Appendix pinout connectors. 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide NOTES: DS39024B-page 2001 Microchip Technology Inc. PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Chapter Using MPLAB® Compiler Introduction This chapter describes files necessary compile programs with MPLAB compiler PICDEM demonstration board. sample linker script file, DEMO756.LKR, described well other support files. Highlights This chapter covers following topics: Linker Script File, DEMO756.LKR Startup Code File, C0L17DEM.ASM Interrupt Code File, INT756LD.ASM Other Files Note User should refer MPLAB document that shows project setup, special version linker scripts, etc., used here because demonstration board requirements. Also, refer MPLAB Compiler User's Guide (DS51112) additional information. 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Linker Script File program compiled with MPLAB compiler requires linker script file that documents areas memory that linker free use. Programs targeted external FLASH program memory require special linker script file that assumes that program memory starts address 4000h. source code written PICDEM demonstration board must compiled using large memory model since will reside memory addresses larger than 4000h will called from memory address somewhere first pages memory. PIC17C756A MPLAB v2.0 Linker Script File, Version 1.10 PICDEM Workshop Demo Board Copyright 1997 Microchip Technology other files project FILESp17c756.o FILESpmc756l.lib area reset interrupt vectors CODEPAGE PROTECTED NAME=VECTORS START=0x4000 END=0x4027 User Program memory First pages used on-chip monitor program //CODEPAGE NAME=PAGE0 START=0x0028 END=0x1FFF //CODEPAGE NAME=PAGE1 START=0x2000 END=0x3FFF Your program starts page First locations page vectors CODEPAGE NAME=PAGE2 START=0x4028 END=0x5FFF CODEPAGE NAME=PAGE3 START=0x6000 END=0x7FFF CODEPAGE NAME=PAGE4 START=0x8000 END=0x9FFF CODEPAGE NAME=PAGE5 START=0xA000 END=0xBFFF CODEPAGE NAME=PAGE6 START=0xC000 END=0xDFFF CODEPAGE NAME=PAGE7 START=0xE000 END=0xFFFF Special SFRs SHAREBANK SHAREBANK SHAREBANK SHAREBANK SHAREBANK SHAREBANK SHAREBANK SHAREBANK SFRs DATABANK DATABANK DATABANK DATABANK Function registers that shared (0x00 0x0F) PROTECTED NAME=SFRShareA START=0x000 PROTECTED NAME=SFRShareA START=0x100 PROTECTED NAME=SFRShareA START=0x200 PROTECTED NAME=SFRShareA START=0x300 PROTECTED NAME=SFRShareA START=0x400 PROTECTED NAME=SFRShareA START=0x500 PROTECTED NAME=SFRShareA START=0x600 PROTECTED NAME=SFRShareA START=0x700 banks PROTECTED PROTECTED PROTECTED PROTECTED NAME=SFR0 NAME=SFR1 NAME=SFR2 NAME=SFR3 END=0x00F END=0x10F END=0x20F END=0x30F END=0x40F END=0x50F END=0x60F END=0x70F START=0x010 START=0x110 START=0x210 START=0x310 END=0x017 END=0x117 END=0x217 END=0x317 DS39024B-page 2001 Microchip Technology Inc. Using MPLAB® Compiler DATABANK DATABANK DATABANK DATABANK PROTECTED PROTECTED PROTECTED PROTECTED NAME=SFR4 NAME=SFR5 NAME=SFR6 NAME=SSR7 START=0x410 START=0x510 START=0x610 START=0x710 END=0x417 END=0x517 END=0x617 END=0x717 SFRs shared (0x18 0x19) SHAREBANK PROTECTED NAME=SFRShareB START=0x018 END=0x019 General Purpose Data Memory GPRs that shared (0x1A 0x1F) SHAREBANK NAME=GPRShare START=0x01A GPRs DATABANK DATABANK DATABANK DATABANK banks NAME=GPR0 NAME=GPR1 NAME=GPR2 NAME=GPR3 END=0x01F START=0x020 START=0x120 START=0x220 START=0x320 END=0x0FF END=0x1FF END=0x2FF END=0x3FF Declare stack STACK SIZE=0x20 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Startup Code File startup code file used call startup function enabled), initialize data routine enabled), initialize stack, then branch main function. This file would need assembled linked with other files project. PIC17Cxx MPLAB v2.0 Assembly Startup File, Version 1.10 PICDEM Workshop Demo Board Version Copyright 1997 Microchip Technology This startup assembly file large model. Please refer chapter user's guide more information. following statements determine whether wish initialized data your programs whether wish have _STARTUP() function called upon reset. Please note that turn USE_STARTUP then must defined _STARTUP() your code will linker error. ;Uncomment initialized data ;Uncomment _STARTUP() #DEFINE USE_INITDATA #DEFINE USE_STARTUP 0x02 PCLATH 0x03 ;-External variables labels-; EXTERN _stack EXTERN main #IFDEF USE_STARTUP EXTERN _STARTUP #ENDIF #IFDEF USE_INITDATA EXTERN copy_init_data #ENDIF RESET CODE H'4000' ;Location reset vector Optionally call _STARTUP() #IFDEF USE_STARTUP movlw HIGH _STARTUP movwf PCLATH lcall _STARTUP #ENDIF Branch startup code DS39024B-page 2001 Microchip Technology Inc. Using MPLAB® Compiler movlw movwf movlw movwf HIGH _start PCLATH _start _start_section CODE ;Beginning startup code _start Optionally call routine that copies initlialized data from program memory data memory. #IFDEF USE_INITDATA movlw HIGH copy_init_data movwf PCLATH lcall copy_init_data #ENDIF stack with function arguments local (auto) variables. _setup_stack BANKSEL _stack ;Switch bank where stack pointer movlw _stack+2 ;Store address stack pointer movwf _stack ;Into stack pointer Branch main() program movlw HIGH main movwf PCLATH movlw main movwf 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Interrupt Code File interrupt code file used setup interrupt vectors pin, TMR0 Overflow, T0CKI pin, Peripheral Interrupt vector. Included with this code context save restore routines that called before after interrupt service routines. "real" interrupt vectors PIC17C756A located addresses 0008h, 0010h, 0018h, 0020h have been remapped address location 4008h, 4010h, 4018h, 4020h. original vectors have code that simply writes associated vector address 40??h PCLATH:PCL registers. This file would need assembled linked with other files project. PIC17C756A Interrupt Support File, Version 1.10 PIC1DEM-17 Workshop Demo Board Version Copyright 1997 Microchip Technology list p=17c756 Equates 0x02 PCLATH 0x03 ALUSTA 0x04 0x0F WREG 0x0A SAVEINT_START 0x00FC ;Start shared region ;int.saving INTSAVE_SEC UDATA SAVEINT_START Save registers that absolutely need saved! save_BSR ;Used saving BANK ONLY save_WREG ;WREG ;SPACE RESERVED ALSO BANKS save_ALUSTA ;ALUSTA ;SPACE RESERVED ALSO BANKS save_PCLATH ;PCLATH ;SPACE RESERVED ALSO BANKS save_ALUSTA save_PCLATH saved banks. therefore must reserve corresponding locations banks. Since WREG guaranteed saved bank they only need storage locations bank Bank INTSAVE_SEC1 UDATA SAVEINT_START 0x101 ;WREG ;ALUSTA ;CPUSTA SAVEINT_START 0x201 ;WREG Bank INTSAVE_SEC2 UDATA DS39024B-page 2001 Microchip Technology Inc. Using MPLAB® Compiler Bank INTSAVE_SEC3 UDATA ;ALUSTA ;CPUSTA SAVEINT_START 0x301 ;WREG ;ALUSTA ;CPUSTA VARIABLES UDATA_OVR These function pointers that have i.s.r. addresses. fpINT fpTMR0 fpT0CKI fpPIV GLOBAL fpINT, fpTMR0, fpT0CKI, fpPIV _INT_sec CODE H'4008' Save ALUSTA movpf ALUSTA, save_ALUSTA movpf WREG, save_WREG must save ALUSTA before others temporarily save WREG Branch prolog movlw HIGH _INT_prolog movwf PCLATH movlw _INT_prolog movwf _TMR0_sec CODE H'4010' Save ALUSTA movpf ALUSTA, save_ALUSTA movpf WREG, save_WREG must save ALUSTA before others temporarily save WREG Branch prolog movlw HIGH _TMR0_prolog movwf PCLATH movlw _TMR0_prolog movwf _T0CKI_sec CODE H'4018' Save ALUSTA movpf ALUSTA, save_ALUSTA movpf WREG, save_WREG must save ALUSTA before others temporarily save WREG 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Branch prolog movlw HIGH _T0CKI_prolog movwf PCLATH movlw _T0CKI_prolog movwf _PIV_sec CODE H'4020' Save ALUSTA movpf ALUSTA, save_ALUSTA movpf WREG, save_WREG must save ALUSTA before others temporarily save WREG Branch prolog movlw HIGH _PIV_prolog movwf PCLATH movlw _PIV_prolog movwf InterruptCode CODE _INT_prolog ;Save WREG movfp BSR, PCLATH clrf BSR, movpf PCLATH, save_BSR ;Service interrupt calling interrupt ;handling function goto _INT_2 _INT_1 BANKSEL fpINT movfp fpINT+1, PCLATH movfp fpINT, _INT_2 call _INT_1 push address next instruction stack ;Restore clrf movfp movfp WREG BSR, save_BSR, save_WREG, WREG ;BSR saved bank ;Now restore ;and WREG well. ;Restore PCLATH ALUSTA movfp save_PCLATH, PCLATH movfp save_ALUSTA, ALUSTA ;Return from interrupt RETFIE _TMR0_prolog DS39024B-page 2001 Microchip Technology Inc. Using MPLAB® Compiler ;Save WREG movfp BSR, PCLATH clrf BSR, movpf PCLATH, save_BSR ;Service interrupt calling interrupt ;handling function goto _TMR0_2 _TMR0_1 BANKSEL fpTMR0 movfp fpTMR0+1, PCLATH movfp fpTMR0, _TMR0_2 call _TMR0_1 push address next instruction stack ;Restore clrf movfp movfp WREG BSR, save_BSR, save_WREG, WREG ;BSR saved bank ;Now restore ;and WREG well. ;Restore PCLATH ALUSTA movfp save_PCLATH, PCLATH movfp save_ALUSTA, ALUSTA ;Return from interrupt RETFIE _T0CKI_prolog ;Save WREG movfp BSR, PCLATH clrf BSR, movpf PCLATH, save_BSR ;Service interrupt calling interrupt ;handling function goto _T0CKI_2 _T0CKI_1 BANKSEL fpT0CKI movfp fpT0CKI+1, PCLATH movfp fpT0CKI, _T0CKI_2 call _T0CKI_1 push address next instruction stack ;Restore clrf movfp movfp WREG BSR, save_BSR, save_WREG, WREG ;BSR saved bank ;Now restore ;and WREG well. ;Restore PCLATH ALUSTA movfp save_PCLATH, PCLATH movfp save_ALUSTA, ALUSTA ;Return from interrupt RETFIE 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide _PIV_prolog ;Save WREG movfp BSR, PCLATH clrf BSR, movpf PCLATH, save_BSR ;Service interrupt calling interrupt ;handling function goto _PIV_2 _PIV_1 BANKSEL fpPIV movfp fpPIV+1, PCLATH movfp fpPIV, _PIV_2 call _PIV_1 push address next instruction stack ;Restore clrf movfp movfp WREG BSR, save_BSR, save_WREG, WREG ;BSR saved bank ;Now restore ;and WREG well. ;Restore PCLATH ALUSTA movfp save_PCLATH, PCLATH movfp save_ALUSTA, ALUSTA ;Return from interrupt RETFIE DS39024B-page 2001 Microchip Technology Inc. Using MPLAB® Compiler Other Files additional file required compile programs PICDEM demonstration board associated processor object module. PIC17C756A microcontroller this file would P17C756.ASM. This file would need assembled object file MPASMassembler linked with rest files. only other file that might used compile programs PICDEM demonstration board library object module. PIC17C756A microcontroller library file PMC756L.LIB would linked with rest files. Note User should refer MPLAB document that shows project setup, special version linker scripts, etc., used here because demonstration board requirements. Also, refer MPLAB Compiler User's Guide (DS51112) additional information. 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide NOTES: DS39024B-page 2001 Microchip Technology Inc. PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Chapter LCD.C Description Introduction This chapter describes demonstration program PIC17C756A, LCD.C. This program takes incrementing count displays external panel using interface provided PICDEM demonstration board. Highlights This chapter covers following topics: MPLAB® Project Files PICmicro® Libraries Source Code Descriptions LCD.C Source Code Listing XLCD.H Source Code Listing XLCD.C Source Code Listing MPLAB Project Files project LCD.PJT contains following files: LCD.PJT DEMO756L.LKR P17C756.O PMC756L.LIB C0L17DEM.O LCD.C XLCD.C files this project following header files: P17C756.H DELAYS.H XLCD.H 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide PICmicro® Libraries files LCD.PJT following libray function(s) contained PMC756L.LIB: Delay10TCY( Delay1KTCYx( Source Code Descriptions DEMO756L.LKR P17C756.O PMC756L.LIB This file linker script file project. This file contains processor dependent objects, included linker script file. This file contains library functions compiled large memory model, included linker script file. This file contains startup code initialize stack, initialize data, call startup function, jump main( This file main source code file project. This file contains source code interface external display. This header file contains processor specific items. This header file delay routines library. This header file external routines XLCD.C. C0L17DEM.O LCD.C XLCD.C P17C756.H DELAYS.H XLCD.H DS39024B-page 2001 Microchip Technology Inc. LCD.C Description LCD.C Source Code Listing LCD.C Rodger Richey Principal Applications Engineer Microchip Technology Incorporated December 1998 Compiled using MPLAB Compiler V2.20 This program displays message display that uses Hitachi HD44780 controller equivalent. first line shows "Hello." second line shows "World!". Uses oscillator 16MHz #include <p17c756.h> #include <delays.h> #include "xlcd.h" Constant string arrays program memory const char Hello[] "Hello."; const char World[] "World!"; Delays void DelayFor18TCY(void) Delay10TCY(); Delay10TCY(); return; Delays ~15ms void DelayPORXLCD(void) Delay1KTCYx(70); return; Delays ~5ms void DelayXLCD(void) Delay1KTCYx(20); return; void main(void) Turn ADCON1 0x0e; Configure external OpenXLCD(FOUR_BIT&LINES_5X7); 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Print Hello message first line putrsXLCD(Hello); Wait finish last command while(BusyXLCD()); cursor start line SetDDRamAddr(0x28); Print World message line putrsXLCD(World); Endless loop program while(1) Nop(); Nop(); DS39024B-page 2001 Microchip Technology Inc. LCD.C Description XLCD.H Source Code Listing #pragma nolist PICmicro Libraries V2.10 Written Tested using MPLABC V2.10 Filename: xlcd.h Date: April 1998 File Version: 2.10 Functions: Header file Revision History: V1.00 Beta release Peripheral Libraries V1.21 V2.00 Release Peripheral Libraries V2.00 V2.10 Release Peripheral Libraries V2.10 Added putrsXLCD output strings XLCD Notes: usage varies depending specified device These libraries routines written support Hitachi HD44780 controller. user must define following items: interface type 8-bits) 4-bit mode whether using upper lower nibble data port tris register data port control signal ports pins control signal port tris pins user must provide three delay routines: DelayFor18TCY() provides delay DelayPORXLCD() provides least 15ms delay DelayXLCD() provides least delay #ifndef _XLCD_H #define _XLCD_H Interface type 8-bit 4-bit 4-bit operation comment #define BIT8 //#define BIT8 When 4-bit interface define data upper lower nibble. lower nibble, comment #define UPPER //#define UPPER DATA_PORT defines port which data lines connected #define DATA_PORT PORTF #define TRIS_DATA_PORT DDRF CTRL_PORT defines port where control lines connected These just samples, change match your application #define RW_PIN PORTGbits.RG0 Port #define TRIS_RW DDRGbits.RG0 TRIS 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide #define #define #define #define RS_PIN PORTFbits.RF7 TRIS_RS DDRFbits.RF7 E_PIN PORTGbits.RG1 TRIS_E DDRGbits.RG1 Port TRIS PORT TRIS Display ON/OFF Control defines #define 0b00001111 #define DOFF 0b00001011 #define CURSOR_ON 0b00001111 #define CURSOR_OFF 0b00001101 #define BLINK_ON 0b00001111 #define BLINK_OFF 0b00001110 Cursor Display Shift defines #define SHIFT_CUR_LEFT 0b00010011 left #define SHIFT_CUR_RIGHT 0b00010111 right #define SHIFT_DISP_LEFT 0b00011011 left #define SHIFT_DISP_RIGHT 0b00011111 right Function defines #define FOUR_BIT #define EIGHT_BIT #define LINE_5X7 single line #define LINE_5X10 #define LINES_5X7 multiple line Other Functions #define DDRAM #define HOME Display Display Cursor Cursor Cursor Blink Cursor Blink Cursor shifts Cursor shifts Display shifts Display shifts 0b00101111 0b00111111 0b00110011 0b00110111 0b00111111 4-bit Interface 8-bit Interface characters, 5x10 characters characters, 0b00000001 0b00000010 Clear display, DDRAM Configures void OpenXLCD(static unsigned char); pins external void SetCGRamAddr(static unsigned char); generator address void SetDDRamAddr(static unsigned char); data address unsigned char BusyXLCD(void); status unsigned char ReadAddrXLCD(void); address char ReadDataXLCD(void); data void WriteCmdXLCD(static unsigned char); void WriteDataXLCD(static char); #define putcXLCD WriteDataXLCD void putsXLCD(static char characters Sets charac- Sets display Returns busy Reads current Reads byte Writes command Writes data byte putc write Writes string DS39024B-page 2001 Microchip Technology Inc. LCD.C Description void putrsXLCD(static const char Writes string characters User defines these routines according oscillator frequency extern void DelayFor18TCY(void); extern void DelayPORXLCD(void); extern void DelayXLCD(void); #endif #pragma list 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide XLCD.C Source Code Listing #include <p17cxx.h> #include "xlcd.h" PICmicro Libraries V2.10 Written Tested using MPLABC V2.10 Filename: xlcd.c Date: April 1998 File Version: 2.10 Functions: void OpenXLCD(unsigned char lcdtype) void SetCGRamAddr(unsigned char CGaddr) void SetDDRamAddr(unsigned char DDaddr) unsigned char BusyXLCD(void) unsigned char ReadAddrXLCD(void) char ReadDataXLCD(void) void WriteCmdXLCD(unsigned char cmd) void WriteDataXLCD(char data) void putsXLCD(char *buffer) void putrsXLCD(const char *buffer) Revision History: V1.00 Beta release Peripheral Libraries V1.21 V2.00 Release Peripheral Libraries V2.00 V2.10 Release Peripheral Libraries V2.10 Notes: usage varies depending specified device Function Name: putsXLCD Return Value: void Parameters: buffer: pointer string Description: This routine writes string bytes Hitachi HD44780 controller. user must check controller busy before calling this routine. data written character generator display data depending what previous SetxxRamAddr routine called. void putsXLCD(static char *buffer) DS39024B-page 2001 Microchip Technology Inc. LCD.C Description while(*buffer) null while(BusyXLCD()); busy WriteDataXLCD(*buffer); buffer++; return; Write data Wait while Write character Increment buffer Function Name: putrsXLCD Return Value: void Parameters: buffer: pointer string Description: This routine writes string bytes Hitachi HD44780 controller. user must check controller busy before calling this routine. data written character generator display data depending what previous SetxxRamAddr routine called. void putrsXLCD(static const char *buffer) while(*buffer) Write data null while(BusyXLCD()); Wait while busy WriteDataXLCD(*buffer); Write character buffer++; Increment buffer return; Function Name: OpenXLCD Return Value: void Parameters: lcdtype: sets type (lines) Description: routine configures LCD. Based Hitachi HD44780 controller. routine will configure pins microcontroller, setup 8-bit mode clear display. user must provide three delay routines: DelayFor18TCY() provides delay DelayPORXLCD() provides least 15ms delay DelayXLCD() provides least delay void OpenXLCD(static unsigned char lcdtype) 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide data bits must either 8-bit port upper lower 4-bits port. These pins made into inputs #ifdef BIT8 8-bit mode, whole port DATA_PORT TRIS_DATA_PORT 0xff; #else 4-bit mode #ifdef UPPER Upper 4-bits port DATA_PORT 0x0f; TRIS_DATA_PORT 0xf0; #else Lower 4-bits port DATA_PORT 0xf0; TRIS_DATA_PORT 0x0f; #endif #endif TRIS_RW control signals made outputs TRIS_RS TRIS_E RW_PIN made RS_PIN Register select made E_PIN Clock made Delay 15ms allow Power reset DelayPORXLCD(); Setup interface #ifdef BIT8 face TRIS_DATA_PORT DATA_PORT 0b00110000; cmd(8-bit interface) #else face #ifdef UPPER interface TRIS_DATA_PORT 0x0f; DATA_PORT 0x0f; DATA_PORT 0b00110000; cmd(4-bit interface) #else interface TRIS_DATA_PORT 0xf0; DATA_PORT 0xf0; DATA_PORT 0b00000011; cmd(4-bit interface) #endif #endif E_PIN DelayFor18TCY(); E_PIN Delay least 4.1ms DelayXLCD(); 8-bit mode inter// Data port output Function 4-bit mode inter// Upper nibble Function Lower nibble Function Clock DS39024B-page 2001 Microchip Technology Inc. LCD.C Description Setup interface #ifdef BIT8 DATA_PORT 0b00110000; cmd(8-bit interface) #else #ifdef UPPER interface DATA_PORT 0x0f; cmd(4-bit interface) DATA_PORT 0b00110000; #else interface DATA_PORT 0xf0; cmd(4-bit interface) DATA_PORT 0b00000011; #endif #endif E_PIN DelayFor18TCY(); E_PIN Delay least 100us DelayXLCD(); Setup interface #ifdef BIT8 DATA_PORT 0b00110000; cmd(8-bit interface) #else #ifdef UPPER interface DATA_PORT 0x0f; cmd(4-bit interface) DATA_PORT 0b00110000; #else interface DATA_PORT 0xf0; cmd(4-bit interface) DATA_PORT 0b00000011; #endif #endif E_PIN DelayFor18TCY(); E_PIN DelayXLCD(); #ifndef BIT8 #ifdef UPPER interface DATA_PORT 0x0f; cmd(4-bit interface) DATA_PORT 0b00100000; #else interface DATA_PORT 0xf0; cmd(4-bit interface) DATA_PORT 0b00000010; #endif 8-bit interface Function 4-bit interface Upper nibble Function Lower nibble Function Clock 8-bit interface Function 4-bit interface Upper nibble Function Lower nibble Function Clock Upper nibble Function Lower nibble Function 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide E_PIN DelayFor18TCY(); E_PIN #endif Clock #ifdef BIT8 8-bit interface TRIS_DATA_PORT 0xff;// Make data port input #else 4-bit interface #ifdef UPPER Upper nibble interface TRIS_DATA_PORT 0xf0; Make data nibble input #else Lower nibble interface TRIS_DATA_PORT 0x0f; Make data nibble input #endif #endif data interface width, lines, font while(BusyXLCD()); Wait busy WriteCmdXLCD(lcdtype); Function Turn display then while(BusyXLCD()); Wait busy Display OFF/Blink while(BusyXLCD()); Wait busy Display ON/Blink Clear display while(BusyXLCD()); WriteCmdXLCD(0x01); Wait busy Clear display entry mode inc, shift while(BusyXLCD()); Wait busy WriteCmdXLCD(SHIFT_CUR_LEFT);// Entry Mode address while(BusyXLCD()); SetDDRamAddr(0); address return; Function Name: WriteCmdXLCD Return Value: void Parameters: cmd: command send Description: This routine writes command Hitachi HD44780 controller. user must check controller busy before calling this routine. void WriteCmdXLCD(static unsigned char cmd) Wait busy Display data DS39024B-page 2001 Microchip Technology Inc. LCD.C Description while(BusyXLCD()); #ifdef BIT8 TRIS_DATA_PORT DATA_PORT cmd; data port RW_PIN signals RS_PIN mand DelayFor18TCY(); E_PIN DelayFor18TCY(); E_PIN DelayFor18TCY(); TRIS_DATA_PORT 0xff;// Data port input #else #ifdef UPPER interface TRIS_DATA_PORT 0x0f; DATA_PORT 0x0f; DATA_PORT cmd&0xf0; #else interface TRIS_DATA_PORT 0xf0; DATA_PORT 0xf0; DATA_PORT (cmd>>4)&0x0f; #endif RW_PIN nals command RS_PIN DelayFor18TCY(); E_PIN DelayFor18TCY(); E_PIN #ifdef UPPER interface DATA_PORT 0x0f; DATA_PORT (cmd<<4)&0xf0; #else interface DATA_PORT 0xf0; DATA_PORT cmd&0x0f; #endif DelayFor18TCY(); E_PIN DelayFor18TCY(); E_PIN #ifdef UPPER input TRIS_DATA_PORT 0xf0; #else TRIS_DATA_PORT 0x0f; #endif #endif return; 8-bit interface Data port output Write command control sending com- Clock command 4-bit interface Upper nibble Lower nibble control sig- Clock command Upper nibble Lower nibble Clock command Make data nibble 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Function Name: SetCGRamAddr Return Value: void Parameters: CGaddr: character generator address Description: This routine sets character generator address Hitachi HD44780 controller. user must check controller busy before calling this routine. void SetCGRamAddr(static unsigned char CGaddr) while(BusyXLCD()); #ifdef BIT8 8-bit interface TRIS_DATA_PORT Make data port ouput DATA_PORT CGaddr 0b01000000; Write address port RW_PIN control signals RS_PIN DelayFor18TCY(); E_PIN Clock address DelayFor18TCY(); E_PIN DelayFor18TCY(); TRIS_DATA_PORT 0xff; Make data port inputs #else 4-bit interface #ifdef UPPER Upper nibble interface TRIS_DATA_PORT 0x0f; Make nibble input DATA_PORT 0x0f; write upper nibble DATA_PORT ((CGaddr 0b01000000) 0xf0); #else Lower nibble interface TRIS_DATA_PORT 0xf0; Make nibble input DATA_PORT 0xf0; write upper nibble DATA_PORT (((CGaddr |0b01000000)>>4) 0x0f); #endif RW_PIN control signals RS_PIN DelayFor18TCY(); E_PIN Clock address DelayFor18TCY(); E_PIN #ifdef UPPER Upper nibble interface DATA_PORT 0x0f; Write lower nibble DATA_PORT ((CGaddr<<4)&0xf0); DS39024B-page 2001 Microchip Technology Inc. LCD.C Description #else interface DATA_PORT 0xf0; DATA_PORT (CGaddr&0x0f); #endif DelayFor18TCY(); E_PIN address DelayFor18TCY(); E_PIN #ifdef UPPER interface TRIS_DATA_PORT 0xf0; #else interface TRIS_DATA_PORT 0x0f; #endif #endif return; Lower nibble Write lower nib- Clock Upper nibble Make inputs Lower nibble Make inputs Function Name: SetDDRamAddr Return Value: void Parameters: CGaddr: display data address Description: This routine sets display data address Hitachi HD44780 controller. user must check controller busy before calling this routine. void SetDDRamAddr(static unsigned char DDaddr) while(BusyXLCD()); #ifdef BIT8 8-bit interface TRIS_DATA_PORT Make port output DATA_PORT DDaddr 0b10000000; Write address port RW_PIN control bits RS_PIN DelayFor18TCY(); E_PIN Clock address DelayFor18TCY(); E_PIN DelayFor18TCY(); TRIS_DATA_PORT 0xff; Make port input #else 4-bit interface #ifdef UPPER Upper nibble interface TRIS_DATA_PORT 0x0f; Make port output DATA_PORT 0x0f; write upper nibble DATA_PORT ((DDaddr 0b10000000) 0xf0); 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide #else Lower nibble interface TRIS_DATA_PORT 0xf0; Make port output DATA_PORT 0xf0; write upper nibble DATA_PORT (((DDaddr 0b10000000)>>4) 0x0f); #endif RW_PIN control bits RS_PIN DelayFor18TCY(); E_PIN Clock address DelayFor18TCY(); E_PIN #ifdef UPPER Upper nibble interface DATA_PORT 0x0f; Write lower nibble DATA_PORT ((DDaddr<<4)&0xf0); #else Lower nibble interface DATA_PORT 0xf0; Write lower nibble DATA_PORT (DDaddr&0x0f); #endif DelayFor18TCY(); E_PIN Clock address DelayFor18TCY(); E_PIN #ifdef UPPER Upper nibble interface TRIS_DATA_PORT 0xf0; Make port input #else Lower nibble interface TRIS_DATA_PORT 0x0f; Make port input #endif #endif return; Function Name: BusyXLCD Return Value: char: busy status controller Parameters: void Description: This routine reads busy status Hitachi HD44780 controller. unsigned char BusyXLCD(void) RW_PIN control bits read RS_PIN DelayFor18TCY(); E_PIN Clock command DS39024B-page 2001 Microchip Technology Inc. LCD.C Description DelayFor18TCY(); #ifdef BIT8 if(DATA_PORT.7) bit) E_PIN RW_PIN line return else E_PIN RW_PIN line return #else #ifdef UPPER interface if(DATA_PORT&0x80) #else interface if(DATA_PORT&0x08) #endif E_PIN DelayFor18TCY(); E_PIN nibble DelayFor18TCY(); E_PIN RW_PIN line return else E_PIN DelayFor18TCY(); E_PIN nibble DelayFor18TCY(); E_PIN RW_PIN line return #endif 8-bit interface Read (busy high Reset clock line Reset control Return TRUE Reset clock line Reset control Return FALSE 4-bit interface Upper nibble Lower nibble Reset clock line Clock other Reset control Return TRUE Busy Reset clock line Clock other Reset control Return FALSE Function Name: ReadAddrXLCD Return Value: char: address from controller Parameters: void Description: This routine reads address byte from Hitachi HD44780 controller. user 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide must check controller busy before calling this routine. address read from character generator display data depending what previous SetxxRamAddr routine called. unsigned char ReadAddrXLCD(void) char data; Holds data retrieved from #ifdef BIT8 8-bit interface RW_PIN control bits read RS_PIN DelayFor18TCY(); E_PIN Clock data controller DelayFor18TCY(); data DATA_PORT; Save data register E_PIN RW_PIN Reset control bits #else 4-bit interface RW_PIN control bits read RS_PIN DelayFor18TCY(); E_PIN Clock data controller DelayFor18TCY(); #ifdef UPPER Upper nibble interface data DATA_PORT&0xf0;// Read nibble into upper nibble data #else Lower nibble interface data (DATA_PORT<<4)&0xf0;// Read nibble upper nibble data #endif E_PIN Reset clock DelayFor18TCY(); E_PIN Clock lower nibble DelayFor18TCY(); #ifdef UPPER Upper nibble interface data (DATA_PORT>>4)&0x0f;// Read nibble lower nibble data #else Lower nibble interface data DATA_PORT&0x0f; Read nibble lower nibble data #endif E_PIN RW_PIN Reset control lines #endif return (data&0x7f); Return address, Mask busy DS39024B-page 2001 Microchip Technology Inc. LCD.C Description Function Name: ReadDataXLCD Return Value: char: data byte from controller Parameters: void Description: This routine reads data byte from Hitachi HD44780 controller. user must check controller busy before calling this routine. data read from character generator display data depending what previous SetxxRamAddr routine called. char ReadDataXLCD(void) char data; #ifdef BIT8 RS_PIN bits RW_PIN DelayFor18TCY(); E_PIN DelayFor18TCY(); data DATA_PORT; E_PIN RS_PIN bits RW_PIN #else RW_PIN RS_PIN DelayFor18TCY(); E_PIN DelayFor18TCY(); #ifdef UPPER interface data DATA_PORT&0xf0; nibble data #else interface data (DATA_PORT<<4)&0xf0; nibble data #endif E_PIN line DelayFor18TCY(); E_PIN nibble DelayFor18TCY(); #ifdef UPPER interface data (DATA_PORT>>4)&0x0f; nibble data 8-bit interface control Clock data Read data Reset control 4-bit interface Clock data Upper nibble Read upper Lower nibble read upper Reset clock Clock next Upper nibble Read lower 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide #else interface data DATA_PORT&0x0f; nibble data #endif E_PIN RS_PIN bits RW_PIN #endif return(data); byte Lower nibble Read lower Reset control Return data Function Name: WriteDataXLCD Return Value: void Parameters: data: data byte written Description: This routine writes data byte Hitachi HD44780 controller. user must check controller busy before calling this routine. data written character generator display data depending what previous SetxxRamAddr routine called. void WriteDataXLCD(static char data) while(BusyXLCD()); #ifdef BIT8 8-bit interface TRIS_DATA_PORT Make port output DATA_PORT data; Write data port RS_PIN control bits RW_PIN DelayFor18TCY(); E_PIN Clock data into DelayFor18TCY(); E_PIN RS_PIN Reset control bits TRIS_DATA_PORT 0xff; Make port input #else 4-bit interface #ifdef UPPER Upper nibble interface TRIS_DATA_PORT 0x0f; DATA_PORT 0x0f; DATA_PORT data&0xf0; #else Lower nibble interface TRIS_DATA_PORT 0xf0; DATA_PORT 0xf0; DATA_PORT ((data>>4)&0x0f); #endif RS_PIN control bits RW_PIN DS39024B-page 2001 Microchip Technology Inc. LCD.C Description DelayFor18TCY(); E_PIN DelayFor18TCY(); E_PIN #ifdef UPPER interface DATA_PORT 0x0f; DATA_PORT ((data<<4)&0xf0); #else interface DATA_PORT 0xf0; DATA_PORT (data&0x0f); #endif DelayFor18TCY(); E_PIN DelayFor18TCY(); E_PIN #ifdef UPPER interface TRIS_DATA_PORT 0xf0; #else interface TRIS_DATA_PORT 0x0f; #endif #endif return; Clock nibble into Upper nibble Lower nibble Clock nibble into Upper nibble Lower nibble 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide NOTES: DS39024B-page 2001 Microchip Technology Inc. PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Chapter USART.C Description Introduction This chapter describes demonstration program PIC17C756A, USART.C. This program takes incrementing count displays Monitor program using USART2 hardware handshaking. Highlights This chapter covers following topics: MPLAB® Project Files PICmicro® Libraries Source Code Descriptions USART.C Source Code Listing MPLAB Project Files project USART.PJT contains following files: USART.PJT DEMO756L.LKR P17C756.O PMC756L.LIB C0L17DEM.O USART.C files this project following header files: P17C756.H DELAYS.H USART16.H STDLIB.H 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide PICmicro Libraries files USART.PJT following library function(s) contained PMC756L.LIB: Delay10KTCYx( BusyUSART2( putcUSART2( OpenUSART2( ubtoa( Source Code Descriptions DEMO756L.LKR P17C756.O PMC756L.LIB This file linker script file project. This file contains processor dependent objects, included linker script file. This file contains library functions compiled large memory model, included linker script file. This file contains startup code initialize stack, initialize data, call startup function, jump main( This file main source code file project. This header file contains processor specific items. This header file delay routines library. This header file USART routines library. This header file standard library routines. C0L17DEM.O USART.C P17C756.H DELAYS.H USART16.H STDLIB.H DS39024B-page 2001 Microchip Technology Inc. USART.C Description USART.C Source Code Listing USART.C Rodger Richey Principal Applications Engineer Microchip Technology Incorporated December 1998 Compiled using MPLAB Compiler V2.20 This program prints incrementing count from USART. numbers displayed Monitor program. Uses oscillator 16MHz #include <p17c756.h> #include <delays.h> #include <usart16.h> #include <stdlib.h> void PutsUSART2(char *data); Function print string USART2 using handshaking void PutsUSART2(char *data) Wait USART complete prev operation while(BusyUSART2()); Hardware handshaking while(PORTBbits.RB4); Print character USART2 putcUSART2(*data); while(*data++); return; void main(void) unsigned char char str[5]; char crlf[3]; Initialize carriage return/linefeed string crlf[0] 0x0d; crlf[1] 0x0a; crlf[2] Initialize USART2 hardware handshaking lines PORTBbits.RB5 DDRBbits.RB5 Increment pointer check NULL 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Send carriage return linefeed PutsUSART2(crlf); Initialize count variable while(1) Convert count variable ASCII ubtoa(i,str); Print string PutsUSART2(str); Print carriage return linefeed PutsUSART2(crlf); Wait while Delay10KTCYx(250); Delay10KTCYx(250); Increment count variable i++; DS39024B-page 2001 Microchip Technology Inc. PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Chapter ANALOG.C Description Introduction This chapter describes demonstration program PIC17C756A, ANALOG.C. This program continuously converts channel (which connected precision 4.096V voltage reference) displays result ASCII Monitor program. module configured AVDD AVSS pins voltage reference. Highlights This chapter covers following topics: MPLAB® Project Files PICmicro® Libraries Source Code Descriptions ANALOG.C Source Code Listing MPLAB Project Files project ANALOG.PJT contains following files: ANALOG.PJT DEMO756L.LKR P17C756.O PMC756L.LIB C0L17DEM.O ANALOG.C files this project following header files: P17C756.H DELAYS.H USART16.H STDLIB.H ADC16.H 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide PICmicro Libraries files ANALOG.PJT following library function(s) contained PMC756L.LIB: Delay10KTCYx( BusyUSART2( putcUSART2( OpenUSART2( OpenADC( ConvertADC( BusyADC( ReadADC( uitoa( Source Code Descriptions DEMO756L.LKR P17C756.O PMC756L.LIB This file linker script file project. This file contains processor dependent objects, included linker script file. This file contains library functions compiled large memory model, included linker script file. This fwwile contains startup code initialize stack, initialize data, call startup function, jump main( This file main source code file project. This header file contains processor specific items. This header file delay routines library. This header file USART routines library. This header file standard library routines. This header file routines library. C0L17DEM.O ANALOG.C P17C756.H DELAYS.H USART16.H STDLIB.H ADC16.H DS39024B-page 2001 Microchip Technology Inc. ANALOG.C Description ANALOG.C Source Code Listing ANALOG.C Rodger Richey Principal Applications Engineer Microchip Technology Incorporated December 1998 Compiled using MPLAB Compiler V2.20 This program performs conversion prints result ASCII USART2 which displays result Monitor program. Uses oscillator 16MHz #include <p17c756.h> #include <delays.h> #include <usart16.h> #include <stdlib.h> #include <adc16.h> void PutsUSART2(char *data); Prints string USART2 using hardware handshaking; void PutsUSART2(char *data) Wait USART finish prev operation while(BusyUSART2()); Wait while(PORTBbits.RB4); Print character USART2 putcUSART2(*data); while(*data++); return; void main(void) unsigned result; char str[7]; char crlf[3]; Initialize carriage return/linefeed string crlf[0] 0x0d; crlf[1] 0x0a; crlf[2] Initialize USART2 hardware handshaking lines PORTBbits.RB5 DDRBbits.RB5 Increment pointer check NULL 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Initialize ADC_4ANA_8DIG,ADC_CH0); Print carriage return linefeed PutsUSART2(crlf); while(1) ConvertADC(); while(BusyADC()); result ReadADC(); uitoa(result,str); PutsUSART2(str); USART PutsUSART2(crlf); USART Delay10KTCYx(250); Delay10KTCYx(250); Start conversion Wait complete Read result Convert ASCII Print string Print crlf Wait while DS39024B-page 2001 Microchip Technology Inc. PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Chapter SWITCH.C Description Introduction This chapter describes demonstration program PIC17C756A, SWITCH.C. This program first turns memory mapped LEDs. When corresponding pushbutton switch pressed, microcontroller will toggle state LED. Highlights This chapter covers following topics: MPLAB® Project Files PICmicro® Libraries Source Code Descriptions SWITCH.C Source Code Listing MPLAB Project Files project SWITCH.PJT contains following files: SWITCH.PJT DEMO756L.LKR P17C756.O PMC756L.LIB C0L17DEM.O SWITCH.C files this project following header files: P17C756.H DELAYS.H 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide PICmicro Libraries files SWITCH.PJT following library function(s) contained PMC756L.LIB: Delay1KTCYx( Source Code Descriptions DEMO756L.LKR P17C756.O PMC756L.LIB This file linker script file project. linker script file. This file contains library functions compiled large memory model, included linker script file. This file contains startup code initialize stack, initialize data, call startup function, jump main( This file main source code file project. This header file contains processor specific items. This header file delay routines library. C0L17DEM.O SWITCH.C P17C756.H DELAYS.H DS39024B-page 2001 Microchip Technology Inc. SWITCH.C Description SWITCH.C Source Code Listing SWITCH.C Rodger Richey Principal Applications Engineer Microchip Technology Incorporated December 1998 Compiled using MPLAB Compiler V2.20 This program toggles state memory mapped LEDs when corresponding memory mapped switch pressed. Uses oscillator 16MHz #include <p17c756.h> #include <delays.h> void main(void) unsigned LEDbuf; unsigned SWTbuf; unsigned TEMPbuf; unsigned Temp; *LEDptr; *SWTptr; Initialize pointers memory mapped device LEDptr (rom *)0xfffd; SWTptr (rom *)0xfffc; Initialize LEDs other variables *LEDptr 0x00ff; LEDbuf 0x00ff; SWTbuf 0x00ff; while(1) Read state switches TEMPbuf *SWTptr 0x00ff; Determine what switch states have changed Temp TEMPbuf SWTbuf; switch state changed change switch press if(Temp TEMPbuf 0x00ff) need toggle if(Temp&LEDbuf) Mask desired LEDbuf ~Temp; Else need toggle high 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide else desired LEDbuf Temp; Write value LEDs *LEDptr LEDbuf; Update switch state buffer SWTbuf TEMPbuf; Wait ~16ms Delay1KTCYx(64); DS39024B-page 2001 Microchip Technology Inc. PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Chapter I2C.C Description Introduction This chapter describes demonstration program PIC17C756A, I2C.C. This program takes incrementing count writes 24LC01B Serial EEPROM displays address memory mapped LEDs. This program also displays desired value actual value each location. Before running this program, make sure that positions rest OFF. Highlights This chapter covers following topics: MPLAB® Project Files PICmicro® Libraries Source Code Descriptions I2C.C Source Code Listing MPLAB Project Files project I2C.PJT contains following files: I2C.PJT DEMO756L.LKR P17C756.O PMC756L.LIB C0L17DEM.O I2C.C files this project following header files: P17C756.H DELAYS.H 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide PICmicro Libraries files I2C.PJT following library function(s) contained PMC756L.LIB: Delay1KTCYx( Source Code Descriptions DEMO756L.LKR P17C756.O PMC756L.LIB This file linker script file project. This file contains processor dependent objects, included linker script file. This file contains library functions compiled large memory model, included linker script file. This file contains startup code initialize stack, initialize data, call startup function, jump main( This file main source code file project. This header file contains processor specific items. This header file delay routines library. C0L17DEM.O I2C.C P17C756.H DELAYS.H DS39024B-page 2001 Microchip Technology Inc. I2C.C Description I2C.C Source Code Listing I2C.C Rodger Richey Principal Applications Engineer Microchip Technology Incorporated December 1998 Compiled using MPLAB Compiler V2.20 This program reads writes 24LC01B Serial EEPROM using master mode module. value address written each address EEPROM. program then reads value EEPROM prints both desired value read value USART2 display Monitor program. address also displayed memory mapped LEDs. Uses oscillator 16MHz #include <p17c756.h> #include <delays.h> #include <i2c16.h> #include <usart16.h> #include <stdlib.h> void PutsUSART2(char *data); void PutcUSART2(char data); Prints string USART2 using hardware handshaking; void PutsUSART2(char *data) Wait USART2 finish prev operation while(BusyUSART2()); Wait while(PORTBbits.RB4); Write character USART2 putcUSART2(*data); while(*data++); return; Prints character USART2 using hardware handshaking void PutcUSART2(char data) while(BusyUSART2()); Wait USART2 finish while(PORTBbits.RB4); Wait Increment pointer check NULL 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide putcUSART2(data); USART2 return; void main(void) *LEDptr; unsigned char addr; unsigned char byte; char str[5]; char crlf[3]; Initialize carriage return/linefeed string crlf[0] 0x0d; crlf[1] 0x0a; crlf[2] Initialize pointer LEDs LEDptr (rom *)0xfffd; Initialize module OpenI2C(MASTER,SLEW_ON); SSPADD Initialize USART2 hardware handshaking PORTBbits.RB5 DDRBbits.RB5 Print carriage return linefeed PutsUSART2(crlf); Initialize address addr while(1) *LEDptr addr; LEDs Write byte EEPROM EEByteWrite(0xa0,addr,addr); Wait EEPROM EEAckPolling(0xa0); Read byte from EEPROM byte EERandomRead(0xa0,addr); ubtoa(addr,str); address ASCII PutsUSART2(str); string USART2 PutcUSART2(` USART2 ubtoa(byte,str); byte ASCII PutsUSART2(str); string USART2 Print charac- Write address Convert Print Print space Convert Print DS39024B-page 2001 Microchip Technology Inc. I2C.C Description PutsUSART2(crlf); USART2 addr++; address if(addr 127) addr Delay10KTCYx(250); reset Wait while Increment Print CRLF 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide NOTES: DS39024B-page 2001 Microchip Technology Inc. Appendix PICDEM Demonstration Board Schematics PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Figure PICDEM Demonstration Board Parts Layout 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide SCHEMATIC DS39024B-page 2001 Microchip Technology Inc. PICDEM Demonstration Board Schematics SCHEMATIC 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide SCHEMATIC DS39024B-page 2001 Microchip Technology Inc. PICDEM Demonstration Board Schematics SCHEMATIC 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide NOTES: DS39024B-page 2001 Microchip Technology Inc. PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Appendix RS-232 Communication Protocol INTRODUCTION This appendix describes protocol between PIC17C756A microcontroller Host OVERVIEW PICDEM Monitor program associated firmware PIC17C756A communicate RS-232 link between serial port USART2 module PICmicro® MCU. format 9600 baud, parity, data bits, stop bit. protocol itself plain ASCII text, which means that terminal program used communicate with firmware. Monitor program developed convenience user. When using terminal program, command will display available commands user. Descriptions operation diagnostics given Chapter DETAILED DESCRIPTION following commands associated descriptions: *DU2 *RDbxx *Rpyyyy *WDbxxdd *WPyyyydddd Halt Operation Diagnostic Capture Diagnostic Flash Diagnostic Diagnostic Diagnostic Diagnostic Switch Diagnostic USART2 Diagnostic Erase FLASH Download File Print Help Program Read Data Read Prog Write Data Write Prog 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide Data Memory operations: bank number data memory address 8-bit data value Program Memory operations: yyyy 16-bit address dddd 16-bit data DS39024B-page 2001 Microchip Technology Inc. PICDEM17 DEMONSTRATION BOARD USER'S GUIDE Appendix Floppy Disk Contents INTRODUCTION This appendix provides listing description files included 3.5" floppy disk. CONTENTS floppy disk includes following files: PICDEM PIC17C756 Monitor Firmware DIAG.C Diagnostic Routines FLASH.C External FLASH Routines FUNCDEFS.H Function Declarations INTMONL.ASM Interrupt Service Routine 17C756L.LKR Linker Script File TESTLCD.C Main Source Code File UTIL.C Utility Routines XLCD.C External Routines XLCD.H External Header File C0L17.ASM Startup File PMC756L.LIB Library Routines P17C756.ASM Processor Definition File PICDEM Monitor Software 756MON.C Source Code 756MON.H Header File 756MON.RC Resource File 756MON.EXE Executable PICDEM Files C0L17DEM.ASM Startup File External Memory programs DEMO756L.LKR Linker Script File External Memory programs INT756LD.ASM Interrupt Service Routines External Memory programs Source Code Examples LCD.C USART.C ANALOG.C SWITCH.C I2C.C XLCD.C XLCD.H 2001 Microchip Technology Inc. DS39024B-page PICDEM17 Demonstration Board User's Guide NOTES: DS39024B-page 2001 Microchip Technology Inc. Floppy Disk Contents NOTES: 2001 Microchip Technology Inc. DS39024B-page WORLDWIDE SALES SERVICE AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: 480-792-7627 Address: http://www.microchip.com York Motor Parkway, Suite Hauppauge, 11788 Tel: 631-273-5305 Fax: 631-273-5335 ASIA/PACIFIC (continued) Singapore Microchip Technology Singapore Ltd. Middle Road #07-02 Prime Centre Singapore, 188980 Tel: 65-334-8870 Fax: 65-334-8850 Jose Microchip Technology Inc. 2107 North First Street, Suite Jose, 95131 Tel: 408-436-7950 Fax: 408-436-7955 Rocky Mountain 2355 West Chandler Blvd. Chandler, 85224-6199 Tel: 480-792-7966 Fax: 480-792-7456 Taiwan Microchip Technology Taiwan 11F-3, Tung North Road Taipei, 105, Taiwan Tel: 886-2-2717-7175 Fax: 886-2-2545-0139 Toronto 6285 Northam Drive, Suite Mississauga, Ontario 1X5, Canada Tel: 905-673-0699 Fax: 905-673-6509 Atlanta Sugar Mill Road, Suite 200B Atlanta, 30350 Tel: 770-640-0034 Fax: 770-640-0307 ASIA/PACIFIC China Beijing Microchip Technology Beijing Office Unit China Hong Kong Manhattan Bldg. Chaoyangmen Beidajie Beijing, 100027, China Tel: 86-10-85282100 Fax: 86-10-85282104 Austin Analog Product Sales 8303 MoPac Expressway North Suite A-201 Austin, 78759 Tel: 512-345-2030 Fax: 512-345-6085 EUROPE Australia Microchip Technology Australia Suite Rawson Street Epping 2121, Australia Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 Boston Drive, Suite Westford, 01886 Tel: 978-692-3848 Fax: 978-692-3821 China Shanghai Microchip Technology Shanghai Office Room 701, Bldg. East International Plaza Xian Road Shanghai, 200051 Tel: 86-21-6275-5700 Fax: 86-21-6275-5060 Denmark Microchip Technology Denmark Regus Business Centre Lautrup Ballerup DK-2750 Denmark Tel: 4420 9895 Fax: 4420 9910 Boston Analog Product Sales Unit A-8-1 Millbrook Tarry Condominium Lowell Road Concord, 01742 Tel: 978-371-6400 Fax: 978-371-0050 France Arizona Microchip Technology SARL Parc d'Activite Moulin Massy Saule Trapu Batiment Etage 91300 Massy, France Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Hong Kong Microchip Asia Pacific 2101, Tower Metroplaza Hing Fong Road Kwai Fong, N.T., Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 Chicago Pierce Road, Suite Itasca, 60143 Tel: 630-285-0071 Fax: 630-285-0075 Dallas 4570 Westgrove Drive, Suite Addison, 75001 Tel: 972-818-7423 Fax: 972-818-2924 India Microchip Technology Inc. India Liaison Office Divyasree Chambers Floor, Wing (A3/A4) O'Shaugnessey Road Bangalore, 025, India Tel: 91-80-2290061 Fax: 91-80-2290062 Germany Arizona Microchip Technology GmbH Gustav-Heinemann Ring D-81739 Munich, Germany Tel: 49-89-627-144 Fax: 49-89-627-144-44 Dayton Prestige Place, Suite Miamisburg, 45342 Tel: 937-291-1654 Fax: 937-291-9175 Germany Analog Product Sales Lochhamer Strasse D-82152 Martinsried, Germany Tel: 49-89-895650-0 Fax: 49-89-895650-22 Detroit Tri-Atria Office Building 32255 Northwestern Highway, Suite Farmington Hills, 48334 Tel: 248-538-2250 Fax: 248-538-2260 Japan Microchip Technology Intl. Inc. Benex 3-18-20, Shinyokohama Kohoku-Ku, Yokohama-shi Kanagawa, 222-0033, Japan Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Italy Arizona Microchip Technology Centro Direzionale Colleoni Palazzo Taurus Colleoni 20041 Agrate Brianza Milan, Italy Tel: 39-039-65791-1 Fax: 39-039-6899883 Angeles 18201 Karman, Suite 1090 Irvine, 92612 Tel: 949-263-1888 Fax: 949-263-1338 Korea Microchip Technology Korea 168-1, Youngbo Bldg. Floor Samsung-Dong, Kangnam-Ku Seoul, Korea Tel: 82-2-554-7200 Fax: 82-2-558-5934 United Kingdom Arizona Microchip Technology Ltd. Eskdale Road Winnersh Triangle Wokingham Berkshire, England RG41 Tel: 5869 Fax: 44-118 921-5820 01/09/01 Mountain View Analog Product Sales 1300 Terra Bella Avenue Mountain View, 94043-1836 Tel: 650-968-9241 Fax: 650-967-1590 rights reserved. 2001 Microchip Technology Incorporated. Printed USA. 1/01 Printed recycled paper. Information contained this publication regarding device applications like intended through suggestion only superseded updates. your responsibility ensure that your application meets with your specifications. representation warranty given liability assumed Microchip Technology Incorporated with respect accuracy such information, infringement patents other intellectual property rights arising from such otherwise. Microchip's products critical components life support systems authorized except with express written approval Microchip. licenses conveyed, implicitly otherwise, except maybe explicitly expressed herein, under intellectual property rights. Microchip logo name registered trademarks Microchip Technology Inc. U.S.A. other countries. rights reserved. other trademarks mentioned herein property their respective companies. DS39024B-page 2001 Microchip Technology Inc. Other recent searchesXAPP805 - XAPP805 XAPP805 Datasheet uPSD33xx - uPSD33xx uPSD33xx Datasheet uPD78F9831 - uPD78F9831 uPD78F9831 Datasheet TRS-53160G - TRS-53160G TRS-53160G Datasheet TRS-53160TG - TRS-53160TG TRS-53160TG Datasheet TRS-53160FG - TRS-53160FG TRS-53160FG Datasheet TRS-53160CG - TRS-53160CG TRS-53160CG Datasheet TRS-53160CTG - TRS-53160CTG TRS-53160CTG Datasheet TRS-53160CFG - TRS-53160CFG TRS-53160CFG Datasheet R4F20103NFB-64P - R4F20103NFB-64P R4F20103NFB-64P Datasheet MM54HC157 - MM54HC157 MM54HC157 Datasheet MM74HC157 - MM74HC157 MM74HC157 Datasheet MM54HC158 - MM54HC158 MM54HC158 Datasheet MM74HC158 - MM74HC158 MM74HC158 Datasheet MDT10P20 - MDT10P20 MDT10P20 Datasheet BAS40W1 - BAS40W1 BAS40W1 Datasheet
Privacy Policy | Disclaimer |