Home

PIC-WEB REV.C development board User`s Manual

image

Contents

1. mp a cS m rt gt 2 E fu fp La Tan me bw P A fo EL oF 5 E m M sf ip i Ll Eu ket o do a do D f amp tf tf P r 1 b E b wu co I nd E T m CT 0 ft Lo LO E ia gm ff Lu ke A i pa A NT E H fo m L se A E o Di Di d im d Ti The third option allow you to change the board IP number Just type 3 then enter the new IP compatible with your local network configuration After that push ENTER and return to the main menu again Now you must configure the other network parameters gateway and subnet mask or 1f you prefer you can enable the DHCP to get the configuration from your router The first and the second options are not used in this manual At this moment we will only use the on board default page The last option saves the configuration and restarts the PIC WEB For testing purposes you can connect the board directly to your computer with a crossover ethernet cable configure the board with 192 168 0 32 address 192 168 0 1 gateway disable DHCP option 6 and configure the Ethernet adapter on your computer with 192 168 0 31 and the same gateway Here is an example of windows configuration Page 18 of 35 Network Connections 8da Advanced Help a Back gt 3 Ei P Search Wey Folders Address S Network Connections 4 fe Mame Type Status Device Me LAN or High Speed Internet File Edit View Favorites Tools
2. Network Tasks ol Local rea Connection LAN or High Speed Inter Realtek Pi HE Other Places Connected Firewalled t Local Area Connection Properties Details General Authentication Advanced Internet Protocol TCP IP Properties Connect using EM Realtek PCle GBE Family Con This connection uses the Following ite El Client for Microsoft Network al File and Printer Sharing for gel nos Packet Scheduler General You can get IP settings assigned automatically if your network supports this capability Otherwise pou need to ask pour network administrator for the appropriate IP settings O Obtain an IP address automatically W Internet Protocol TCP IP Install Description 2 Use the following IP address IP address 192 168 0 31 255 255 255 Subnet mask Transmission Control Protocol nte Default gateway 192 1668 0 1 Wide area network protocol that p across diverse interconnected net a Obtain DNS server address automatically Use the following DNS server addresses Preferred ONS server 192 168 0 1 Show icon in notification area wh Notify me when this connection h 4ltemate DNS server Advanced This configuration will let you test the board directly from your PC but isn t too useful The fun stuff begins when you have the PIC WEB connected to internet Just imagine your sensor monitor project but now you will be able to see the information any
3. Board s revision Rev C created May 2011 Manual s revision Rev Initial created November 2012 Manual s revision Rev B created December 2012 Manual s revision Rev C created March 2012 Manual s revision Rev D created August 2014 Page 33 of 35 Disclaimer 2012 Olimex Ltd Olimex logo and combinations thereof are registered trademarks of Olimex Ltd Other product names may be trademarks of others and the rights belong to their respective owners The information in this document is provided in connection with Olimex products No license express or implied or otherwise to any intellectual property right is granted by this document or in connection with the sale of Olimex products The Hardware project is closed source project You will not be provided with board files neither with schematics in their original format You may reproduce the design for both your own personal use and for commercial use but you will have to provide a link to the original creator of the project https www olimex com on any documentation or website The software is released under the conditions of the Microchip s Application Libraries To use it you have to agree with their conditions In the projects released there should be a copy of the Microchip Application Solutions Users Agreement pdf It 1s possible that the pictures in this manual differ from the latest revision of the board The product described in this document is subject
4. 192 168 0171 mpfsupload La 1921680171 mpfsupload Google 2 Most Visited Getting Started Latest Headlines MPFS Image Upload rage Zo UL DJ Now point to the image file and press Upload Sit back and relax while the upload takes place and then navigate to the home page to behold the new page just uploaded The result will be SA Hello World amp 0 1921680171 El Google a Most Visited Getting Started Latest Headlines OUPIEX Hello World Installing the development environment The web page that we wrote in last chapter obviously doesn t have any utility for any application at all The idea of the PICWEB is to have control of the PIC18F67J60 features over the net using dynamics web pages or others TCP IP protocols included in the Microchip Stack In this manual we will explain how to create a dynamic web page but this isn t the limit of the PIC WEB and the TCP IP Stack you can get further to reach the full capacity of this platform and manage other protocols of network communication between the PIC microcontroller and any client or server in the network The PIC WEB comes with compiled and installed software that can also be downloaded from Olimex web page this software is based on two basics components from Microchip plus a C compiler These components are the Microchip AN833 TCP IP Stack Microchip MPLAB IDE the PIC microcontroller software developme
5. ferite bead 100n gt TEN RB3 INT3 EXT 14 BH34S R14 R15 RS232 FE RB4 KBIO 49 9 1 49 9 1 DB9 female DD TPOUT 50 RB5 KBN BEE EXT 15 BH34S 4 mour TN TPouT 51 IPOUI RB6 KBI2 PGC FGD F T20uT T2N EXT 29 BH34S TPOUT RB7 KBB PGD pe 200R css 3 Rin RIOUT ADA Es R10 R11 E RCO T10SO T13CKI E TOp E E Ran R20UT EXT 30 Ea RBIAS RC1 T1OSVEOCP2 P2A EU A C6 10 VDDCORE VCAP o SCK BH34S ps U3PWR Er TR RC3 SCK1 SCL1 Di tao vod O 3 3V C R SDO Rip 49 911 TXD1 Q 9 Ee I mous FE san 100nF RDO P1B EXT 9 BH34S R16 R17 alar C8 CO RD1 ECCP3 P3A EXT 10 BH34S Troon J 100nF 100nF 9 RD2 CCP4 P3D ExT 11 BH34S o 00 REO P2D SCL EXT 5 BH34S 56 shies UEXT_ CS EXT 7 BH34S 3 3V 3 3V 49 RE3 P3C EXT 21 BH34S O co fon 48 die E a mala RES PIC EXT 23 100nF 1100nF 1 RF1 AN6 C20UT ara e REZ AN7 C1OUT AN TRIM 25 C19 mm 100nFT RF5 AN10 CV REF EXT 26 BH34S 3 3VA o R2 a A 19 oN FEE OS EXT 27 BH34S na cr RG4 CCP5 P1D EXT 28 BH34S 10uF 6 3V o PIC18F67J60 R1 VIN G1 C DB104 SMD 3 3V an N UEXT YDJ 1136 R26 DE R27 ll 9 12VDC a SAVA 4 7K 4 7K 33K IV E j i L1 EXT 33 BH34S EXT 31 BH34S C1 mm CL150uH SW68 EXT 34 BH34S EXT 32 BH34S SCL E 470uF 16V FF LIZ open D1 C3 1N5g19 ra Ny PWR_LED am 3K 1 amp RED BH34S EXT 17 O 3 3V Y gt 1000uF 6 3V 8nim ESR ao CEE 5 31 MC34063AD_SMD_MBR R5 BH34S EXT 19 R3 1 8K 1 ps Ju S60 BH34s EXT
6. 20 __VIN e ar ASSVA ASSVA me R20 TEMP R25 10K Jf ERMSToR oak R21 BUT AN TR k R22 AN_TRIM AN TEMP 330 10K 330 Pe ey o as le eE PIC WEB rev C BUT 100nF e Tui or L I E L OLIMEX LTD BULGARIA ER AT45DB011 RJ45 SIDE AnF 2kv L WT RJLD 043TC https www olimex com BOARD LAYOUT PWR HUH OL IME X C M DEU nm LP Dg PIC WEB span C210 0 E 12 lt C gt 2014 PWR_JACK AA MA Rev C uergzo BIRD RS232 gme 11C22 ly 4 19 BO wma N2 5 F Aj Be i a UEXT Met 3 pt g a ae E ATY E p A Bas H e q el O 4 gt E k r z E f A f LAN B S o E ICSP ami Dor o R E A M i 9 AFD NE m et sie EO ie a aF i POWER SUPPLY CIRCUTT PIC WEB can take power from two sources PWR JACK where 9 12 VDC is applied by external power source EXT 20 pin VIN with the same voltage range The board power consumption is about 130 mA with all peripherals and MCU running at full speed RESET CIRCUIT PIC WEB reset circuit is made with R8 10k pull up R7 330R serial resistor and RST button Although on the schematic is made provision for external reset through EXT 16 pin Manual reset 1s possible by the RST button CLOCK C
7. short PIC18F67J60 pin 2 REO P2D to PIC18F67J60 pin 34 RC3 SCK1 SCL1 and PIC18F67J60 pin 1 RE1 P2C to PIC18F67J60 pin 35 RC4 SDI1 SDA1 INPUT OUTPUT One user button BUT connected to PIC18F67J60 pin 3 RBO INTO FLTO Reset button RST connected to PIC18F67J60 pin 7 EMKLR Status red LED connected to PIC18F67J60 pin 44 RB4 KBIO Power supply red LED PWR indicates that external power source is applied and board power supply is applied One trimmer AN TR is connected to PIC18F67J60 pin 15 RF3 AN8 Page 11 of 35 EXTERNAL CONNECTORS DESCRIPTION ICSP cones RS232 cones o cones PWR JACK Signal Name Page 12 of 35 EXT 24 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 CAGAREREPREEESEEE 1 3 5 7 9 11 13 15 17 19 21 23 25 27 129 31 133 mm jo mm CR RR CO ca ER RT CO ec E em p eee Page 13 of 35 UEXI O CT gt LAN e Page 14 of 35 MECHANICAL DIMENSIONS aA N oo OO 00 00 OO OO 00 OO so O OO OO OO OO OO OO OO OO 13 34 mm Page 15 of 35 Connecting and testing the board The PIC WEB comes with a default code and web server that you can test in a couple of simple steps First of all you have to configure the Ethernet port to be able to work on your local network That is possible trough the MCHPStack Configuration Console Using the PIC WEB configuration console It s possible to modify the network configurat
8. to continuous development and improvements All particulars of the product and its use contained in this document are given by OLIMEX in good faith However all warranties implied or expressed including but not limited to implied warranties of merchantability or fitness for purpose are excluded This document is intended only to assist the reader in the use of the product OLIMEX Ltd shall not be liable for any loss or damage arising from the use of any information in this document or any error or omission in such information or any incorrect use of the product This evaluation board kit is intended for use for engineering development demonstration or evaluation purposes only and is not considered by OLIMEX to be a finished end product fit for general consumer use Persons handling the product must have electronics training and observe good engineering practice standards As such the goods being provided are not intended to be complete in terms of required design marketing and or manufacturing related protective considerations including product safety and environmental measures typically found in end products that incorporate such semiconductor components or circuit boards Olimex currently deals with a variety of customers for products and therefore our arrangement with the user is not exclusive Olimex assumes no liability for applications assistance customer product design software performance or infringement of patents or services describ
9. ENTS Cables Depends on the used programming debugging tool It could be 1 8 meter USB A B cable to connect PIC ICD2 PIC ICD2 POCKET or PIC KIT3 to USB host on PC or Serial DB9 cable in case of PIC ICD2 TINY or other programming debugging tools You will need a serial cable if not for programming than for configuring the board You will also need a Crossover Ethernet cable Note PIC KIT3 is recommended for new designs since PIC ICD2 programmers are not supported in Microchip s MPLAB X IDE If you don t mind using MPLAB 8 xx then PIC ICD2 is also a good choice Hardware Programmer Debugger most of Olimex programmers are applicable for example PIC ICD2 PIC ICD2 POCKET PIC ICD2 TINY PIC Kit3 or other compatible programming debugging tool For programming PIC WEB Rev C you will also need PIC ICSP connector Warning When you want to program this microcontroller with PIC ICD2 PIC ICD2 POCKET or PIC ICD2 TINY before connecting the programmer to your target board you should first connect the programmer to your computer and open MPLAB There first from menu Configure Select Device choose the microcontroller you are about to program then from menu Programmer Select Programmer choose MPLAB ICD 2 wait while MPLAB is downloading operation system and after ICD2 is connected check in menu Programmer Settings Power there is option Power target circuit from MPLAB ICD 2 this option should be forb
10. IC WEB Demo mcp succeeded Language tool versions MPASMWIN exe v5 42 mplink exe v4 40 mccl8 exe v3 40 mplib exe v4 40 Tue Nov 2 14 36 36 2012 BUILD SUCCEEDED 4 m Page 29 of 35 Dynamic Web Pages Creation For dynamic web pages creation you should refer to Microchip Help TCPIP Stack Help chm at your computer There you can find all the necessary information following the way shown at the screenshot below E Microchip TCP IP Stack Help E gt fi Hide Locate Back Forward Home Contents Index Search Favorites Microchip TCP IP Stack Getting Started Ce Stack Applications Gy Module APIs ARP BSD Sockets T Y DNS Dynamic DNS Client e Hashes co Helpers E TE HTTP Server lg Features Form Processing Authentication Cookies Compression Public Members Stack Members Intemal Members Be MPFS2 Perfomance Tests 2 SMTP Client amp SNMP GH SNTP Client SSL amp TCP Co Tick UDP Restore procedure If you want to restore Olimex s original software you should program PIC18F67J60 with lt extraction directory gt PIC WEB 5 42 TCPIP PIC WEB Demo Prebuilt hex from MPLAB IDE After you have load this hex file you should open PIC WEB 5 42 Microchip TCPIP Stack Utilities MPFS2 jar Click on the button Discover Devices and the IP address of PIC WEB will be discovered for example 192 168 0 171 Note tha
11. IRCUIT Quartz crystal 25 MHz is connected to PIC18F67J60 clock in and clock out Quartz crystal 32 768 KHz is connected to PIC18F67J60 TIOSO and TIOSI pins for it s internal Real Time Clock IMPORTANT If the board has quartz rotated at 45 degrees do not panic This is normal We have two types of such crystals one of them requires 4 pads the other only 2 pads That is why we have provided 4 pads to be able to fit both crystals All boards Olimex manufactures pass automatized optical inspection after assembly and obvious misplacements like these are impossible to occur Page 10 of 35 JUMPER DESCRIPTION 3 3V E e SCL_E NS SDA_E FAN N When this jumper is closed it enables 3 3V board power supply Default state is closed When this jumper is closed it connects UEXT pin 5 SCL to UEXT pin 9 SCK respectively PIC18F67J60 pin 2 REO P2D to PIC18F67J60 pin 34 RC3 SCK1 SCL1 Default state is opened When this jumper is closed it connects UEXT pin 6 SDA to UEXT pin 7 SDI respectively PIC18F67J60 pin 1 RE1 P2C to PIC18F67J60 pin 35 RC4 SDI1 SDA1 Default state is opened When jumpers SDA_E and SCL_E are opened UEXT pin 5 SCL is connected only to PIC18F67 60 pin 2 REO P2D and UEXT pin 6 SDA is connected only to IC18F67J60 pin 1 RE1 P2C so you have to use software IC If you want to use hardware software you have to close short jumpers SDA_E and SCL_E but note that this will
12. If you are positive that the problem is due to manufacturing defect or component you can return the board back to us for inspection When we receive the board we will check and if the problem is caused due to our fault and we will repair replace the faulty hardware free of charge otherwise we can quote price of the repair Note that all shipping back and forth have to be covered by the customer Before you ship anything back you need to ask for RMA When you ship back please attach to it your shipping address phone e mail RMA and brief description of the problem All boards should be sent back in antistatic package and well packed to prevent damages during the transport Page 35 of 35
13. PIC Image MDD Processing Advanced Settings Output Files Project Directory LA 3 Image Name MPFSIimg Upload Settings Upload Image To 4 7 http admint2192 168 0 171 gt to modify gt Date June 26 2012 Generate and Upload Version MPFS 2 2 1 Generator Idle A very handy feature of the utility is point 4 which may be used to automatically upload the image to the board after a successful convertion Enter the IP of your board and leave the other fields at defaults Press the Page 22 of 35 Generate and Upload and wait for your new image to be generated and uploaded This is a sample of the result of a successful upload The MPFS 2 image upload was successfully completed C Test web page index htm 180 bytes gzipped by 23 olimex gif 2881 bytes GENERATED MPFS2 IMAGE 3138 bytes Uploading MPFS2 image 3138 bytes Please note that an image file in this case MPFSImg bin is generated and may be used later if you select the Pre built MPFS image radio button at the top of the utility program window Another way to upload an image for the web server is through the web server itself You will need a pre built image yes should be built by the MPFS2 utility again somewhere in your PC s file system In your favourite browser type the IP of the board with the following path http 192 168 0 171 mpfsupload Here is a screenshot of what you will see 73 http
14. Port with Automatic Polarity Detection and Correction Programmable Automatic Retransmit on Collision Programmable Padding and CRC Generation Programmable Automatic Rejection of Erroneous Packets Activity Outputs for 2 LED Indicators Buffer Configurable transmit receive buffer size Hardware managed circular receive FIFO Byte wide random and sequential access Internal DMA for fast memory copying Hardware assisted checksum calculation for various protocols Page 4 of 35 MAC Support for Unicast Multicast and Broadcast packets Programmable Pattern Match of up to 64 bytes within packet at user defined offset Programmable wake up on multiple packet formats Wave shaping output filter Loopback mode Flexible Oscillator Structure Selectable System Clock derived from single 25 MHz external source 2 78 to 41 67 MHz Internal 31 kHz Oscillator Secondary Oscillator using Timerl 32 kHz Fail Safe Clock Monitor Allows for safe shutdown if oscillator stops Two Speed Oscillator Start up Peripheral Highlights High Current Sink Source 25 mA 25 mA on PORTB and PORTC Five Timer modules Timer0 to Timer4 Four External Interrupt pins Two Capture Compare PWM CCP modules Three Enhanced Capture Compare PWM ECCP modules One two or four PWM outputs Selectable polarity Programmable dead time Auto shutdown and auto restar
15. Set Language Tool Locations Version Control E Stanimir Petey Project l2C Testi Build Version Control Find in Files PICkit 3 PAUTITIIY SEN Le St Selftest completed Firmware Suite Wersion 07 28 07 Firmware type PICIBFJ PICKit 3 Connected PK3Err0045 You must connect to a target device to use PICkit 3 Target Detected Device ID Revision 00000003 Page 28 of 35 Before compiling check that the necessary include directories are well configured to use C18 those are Include Search Path MCC18 h eLibrary Search Path MCC18 lib Linker Script Search Path MCC18 lib The following screenshot shows how it s done for the include header file It is similar for the lib and linker script file Project PIC WEB Demo mcp ser MPASM Assembler MPLINK Linker MPLABCI8 Directores MPASM C17 C18 Sute Directories and Search Paths 5 Show directories for ch Path Em Output Directory gt Intermediary Director Include Search Path Library Search Path EEE Linker Script Search Path MicrochipInclude 4 Microchip Include Suite Defaults Build Directory Policy O Assemble Compile in source file directory link in output directory Assemble Compile Link in the project directory ok cama too Heb PICkit 3 Connected PK3Err0045 You must connect to a target device to use PICkit 3 Target Detected Device ID Revision 00000003 S PICk
16. button on the tools or selecting the menu Programmer gt Program To do this follow the steppes in the next screenshot Page 27 of 35 MY PIC WEB Demo N New Ctrl N 2 TT r Add New File to Project Open Ctrl O Close Ctrl E Save Ctrl S Save As Save All Ctrl Shift S Open Workspace Save Workspace Save Workspace As BR gt 62 EE Close Workspace moan Import 2 11 27 2012 13 16 File folder Print Ctrl P O Fies 2 Symbols Output x Bud Version Control Findin Fes PICKi 3 AUMENTO Sen lest Self test completed Firmware Suite Version 01 28 07 Firmware type PICIBFJ PK3Err0045 You must connectto a target device to use PICkit 3 Target Detected Device ID Revision 00000003 v PICkit 3 PIC1 amp FA7 160 W 0 novzder hankO PIC WEB Software After downloading the necessary PIC WEB software and executing the instructions in README txt file you will have a working demo Open this project lt extraction directory gt PIC WEB 5 42 TCPIP Demo App PIC WEB Demo mcp Tools Configure Window Help MITO Checksum Oxf9c7 Quickbuild no asm file Package in zip Build Options 02 rpm Save Proj as 10 9 2012 10 05 Save Project 11 27 2012 13 16 Add Files to Project 11 27 2012 10 30 Add New File to Project 10 9 2012 10 05 Remove File From Project 11 26 2012 15 50 Select Language Toolsuite
17. e 26 of 35 gt Es Edit View Project Debugger Programmer Tools Configure Window Help Dob eh ma SAL seetrrogamme gt Y None Checksum Oxf9c7 1 PICSTART Plus 2 MPLAB ICD 2 3 Licensed Debugger 4 Starter Kit on Board 5 Starter Kits 6 PICkit 3 7 MPLAB ICD 3 8 AN851 Quick Programmer Beta 9 PICkit 2 10 MPLAB PM 3 11 REALICE 12 PRO MATEI 13 PICkit 1 EY Fies 1 Symbols Wait while MPLAB is downloading operation system and after Pic Kit3 is connected check in menu Programmer Settings Power there 1s option Power target circuit from PicKit3 this option should be forbidden you could not select it Now it 1s safe to connect the programmer to your target board trough an ISCP cable The PIC WEB should be connected to the power supply If you have something already compiled you can open the hex file and then program it to the PIC WEB Just importing the hex file in File Import menu If you don t have something already compiled you can use some of the hex files offered by Olimex Ltd To use it please read the license agreement and get the password for the archive After you have done everything correctly you will have ready to use hex files You can program with it by importing it File Import select path lt extraction directory gt PIC WEB 5 42 TCPIP PIC WEB Demo Prebuilt hex For programming the PIC just push the program
18. ed herein THERE IS NO WARRANTY FOR THE DESIGN MATERIALS AND THE COMPONENTS USED TO CREATE PIC WEB THEY ARE CONSIDERED SUITABLE ONLY FOR PIC WEB Page 34 of 35 For product support hardware information and error reports mail to support volimex com Note that we are primarily a hardware company and our software support is limited Please consider reading the paragraph below about the warranty of Olimex products Warranty and returns Our boards have lifetime warranty against manufacturing defects and components During development work it is not unlikely that you can burn your programmer or development board This is normal we also do development work and we have damaged A LOT of programmers and boards during our daily job so we know how it works If our board programmer has worked fine then Stopped please check if you didn t apply over voltage by mistake or Shorted something in your target board where the programmer was connected etc Sometimes boards might get damaged by ESD shock voltage or if you spill coffee on them during your work when they are powered Please note that warranty do not cover problems caused by unproper use Shorts over voltages ESD shock etc If the board has warranty label it should be not broken Broken labels void the warranty same applies for boards modified by the customer for instance soldering additional components or removing components such boards will be not be a subject of our warranty
19. emory STKPTR 64 96 128 Kbytes ape RCO RC7 Table Latch Instruction Bus lt 16 gt PORTD IA BDO ADO State Machine dea Control Signals Control FRODH PRODL PORTE h 4 eect r 8 x 8 Multiply REO RES OSC2 CLKO Timing Power up 8 OSCHICLK Generation Timer X Oscillator PORTF AFi RF INTRO Start up Timer Oscillator Power on Reset Precision Band Gap Watchdog Reference Timer x Rosol a PORTG x RAGA VDDCORE V car VDD Vss MO E ECCP1 ECCP2 ECCP3 MSSP 1 EUSART1 Note 1 BOR functionality is provided when the on board voltage regulator is enabled Page 7 of 35 MEMORY MAP for PIC18F67 60 PC lt 20 0 gt 21 CALL CALLW RCALL RETURN RETFIE RETLW ADDULNE SUBULNE Stack Level 1 Stack Level 31 PIC18F67J60 000000h 00FFFFh G 017FFFh T 0 y O E Config Words 01EFFEh o 3 Unimplemented Read as o 1FFFFFh Note Size of memory area is not to scale Size of program memory area is enhanced to show detail Page 8 of 35 SCHEMATIC RST R7 A R8 a 330 TIZO7A 10K O 3 3V BH34S RS 7 LEDA O XT 16 OQ MCLR RAO LEDA ANO CEDE RA1 LEDB AN1 U3 3 3vO 18 ENVREG RA2 AN2 V REF EXT1 BH34S RA3 AN3 VREF EXT 2 BH34S LED MAX3232 u RA4 TOCKI ExT 3 BH34S sY ed 2o0r C4 EM um o osciiciki da EXT 4 BH34S A C1 100nF e SN 1M A AN en BUT aie easels 3 3V i 100nF 2008 CS no SAU EXT13 BH34S Rel
20. he board comes with an implemented WEB server and a web page that let you controls some of the features of the board In this manual we ll learn about how to compile the TCP IP stack to use it over the platform the needed software how to use the pre loaded web page and how to upload your own web pages in the board This manual requires Microsoft Windows OS because several software units used here are Windows compatible only BOARD FEATURES e PIC18F67J60 microcontroller e Mbit on board serial flash for web pages storage e ICSP ICD mini connector for programming and debugging with PIC ICD2 PIC ICD2 POCKET and PIC ICD2 TINY e Reset button e User event button e Analogue trimmer potentiometer e Thermistor for temperature monitoring e RS232 driver and connector e Complete web server and TCP IP stack support as per Microchip s open source TCP IP stack e Power plug in jack for 9 to 12 VDC power supply e Voltage regulator 3 3V and filtering capacitors e status LED e UEXT connector e Extension header to connect to other boards e PCB FR 4 1 5 mm 0 062 solder mask silkscreen component print e Dimensions 60x65 mm 2 362 55 Page 2 of 35 ELECTROSTATIC WARNING The PIC WEB board is shipped in protective anti static packaging The board must not be subject to high electrostatic potentials General practice for working with static sensitive devices should be applied when working with this board BOARD USE REOUIREM
21. idden you could not select it Now it 1s safe to connect the programmer to your target board Software PIC WEB is tested with MPLAB IDE v 8 87 C18 compiler 3 40 Free Standard EVAL Version The latest modified stack version we tested the board with is TCP IP stack 5 42 www microchip com It is possible that the stack might not function properly if used with later versions of MPLAB IDE You will also need a terminal program configured at 19 200 bps 8N1 and XON XOFF flow control it s described below Page 3 of 35 PROCESSOR FEATURES PIC WEB board uses CPU PIC18F67J60 from Microchip with these features Operating Frequency DC 41 67 MHz Flash program memory bytes 128k Flash program memory Instructions 65532 SRAM data memory bytes 3808 Interrupt Sources 26 Ethernet TX RX Buffer bytes 8192 VO Ports A B C D E F G VO Pins 39 10 Bit A D ch 11 Capture Compare PWM Modules 2 Enhanced Capture Compare PWM Modules 3 Serial Communications MSSP 1 Enhanced USART 1 SPI Master PCTM Comparators 2 Timers 8 16 Bit 2 3 Resets and Delays POR BOR RESET Instruction Stack Full Stack Underflow MCLR WDT PWRT OST Instruction Set 75 Instructions 83 with Extended Instruction Set Enabled Ethernet Features IEEE 802 3 compatible Ethernet Controller Integrated MAC and 10Base T PHY 8 Kbyte Transmit Receive Packet Buffer SRAM Supports one 10Base T
22. ile system to store the pages on the embedded system That is why it is necessary to transform the files to that file system before uploading them This is done using a program included in PIC WEB software called MPFS2 jar It is located at lt extraction dir gt PIC WEB 5 42 Microchip TCPIP Stack Utilities MPFS2 Jar Let s create a simple Hello World page and upload it in to the HTTP server First of all it s necessary to create a directory on your PC where to put the files you want to upload to the web server The index htm is a must have file because that is the default page read by the server We will also upload a picture olimex gif get it from the site for example The code of the page is the simplest possible Page 21 of 35 lt HTML gt lt HEAD gt lt TITLE gt Hello World lt TITLE gt lt HEAD gt lt BODY gt lt p align center gt lt img border 0 src olimex gif gt lt p gt lt font face Arial size 10 gt lt p align center gt lt b gt Hello World lt b gt lt p gt lt font gt lt BODY gt lt HTML gt Next thing to do is just start the MPFS2 jar utility and set up the required fields Here is a screenshot of one possible configuration A Microchip MPFS Generator Source Settings Start With a Webpage Directory 6 Pre Built MPFS Image Source Directory CA Test web page Browse Processing Options Output BIN Image PICIS PIC32 Image PIC24 ds
23. ion using the configuration console on the serial port allowing a successful operation on your local network Using the configuration console you can change the PIC WEB IP address for example To access to the console menu it is necessary to have a serial DB9 cable and connect the board serial port to one available COM port on your computer Then you will need to connect the board using a software like PuTTY When you start it select down the menu Serial in category Connections and configurate the session as it s shown on the screenshot below i PuTTY Configuration MEA Session Options controlling local serial lines hm Logging Terminal Serial line to connect to COMA Bel Features I Window Speed baud Ei Appearance Behaviour Translation Stop bits bo Selection z Colours di gt gt e Connection Flow control XON XOFF Select a serial line Configure the serial line Data bits E Telnet NOTE The field Serial line to connect to should be with value depending on the com port where you have connected the board You can check that on the device manager menu category Ports COM amp LPT These are the basic steps to configure the connection If you want to see what you are typing you should activate the echo It s shown below how 1t s done Page 16 of 35 a 1 Maximize a a Ww Close D ula Tv o fm o fm o Mm io tL i ha EL nu I aH LO LO Ln pa d Sw mw ty Special Co
24. it 3 PIC18F67J60 W 0 novzdec bank O nn ow p D TE APTO AR ee pp q a Newslet E CoM Microc IE Demo A BR Image fi LY Compu E PIC WE 68 Hello W 4 Microc a PIC WE S Win32 EN a da MO 14 17 Now is time to compile If there aren t bad configuration the compilation must be successful that means that you have to get the BUILD SUCCEEDED message on the output window Note the version of the MPLAB IDE that you are using can change the last explanation newer version will appear since this manual was written or you can have an old one that s means that the software configuration steps can change a little but the main idea is the same Don t hesitate if it doesn t work on the first time just keep trying isn t complicate Output Build Version Control Find in Files PICKit 3 Control Find in Files PICkit 3 jj E DD AO IM MESE y u Vout Qi thee fb Ww vi SSS yvy UNLUNUIIO U SYS Peo Io SPSS IA e QUO Viney ILL PA WINI Device Database Version 1 3 Copyright c 1998 2011 Microchip Technology Inc Errors 0 MP2HEX 4 40 COFF to HEX File Converter Copyright c 1998 2011 Microchip Technology Inc Errors 0 Loaded EiMy RepositonAPIC WEB Software trunk wvEB_files Demo_Example_WEB_files PIC WEB 5 4ATCPIP Demo App Output PIC WEB Demo cof Release build of project EAMy RepositonAPIC WEB Software trunk WV EB_files Demo_Example_WEB_files PIC WEB 5 4ATCPIP Demo App P
25. it from microchip page and we encourage you to download its manual for reference purpose Page 25 of 35 Programmer There are several ways to program a PIC but the easiest and proper way to program the PIC WEB is using a compatible programmer with an ISCP connector and compatible with MPLAB IDE For this purpose it will be used an USB programmer compatible with MPLAB 8 87 and MPLABX 1 41 PIC Kit3 sold by Olimex PIC KIT3 to use this programmer first of all you must have it connected to the PC trough an USB cable Then you must select in MPLAB IDE Configure Select Device A new window will appear Here you should select your device PIC18F67J60 Here is a screenshot of this window Then you must select in MPLAB IDE Programmer Select Programmer PICKit 3 Device PIC18F67J60 121866365 1218F66J90 1218F66J93 121866394 121866399 1218 F66K22 1218 F66K80 1218 F66K90 I218F6720 I1218F6722 IC18F6723 121867310 1218F67311 I1218F67350 IC18F67J60 IC 1SF67I90 121867393 I1218F67394 IC18F67K22 I218F67K90 12188310 IC18F8390 213 8393 121883311 IC18F83J90 1218F8410 1218F8490 12188493 IC18F84J11 y ITIL TIITII TITID IC18FB4J90 Device Family licrochip Tool Support PLAB REALICE q PICkit1 PLAB ICD 2 Pickit2 PLAB ICD 3 PICkit3 OMPILER VDI 05 IPLAB ICD 2 O Pickit2 PLABICD 3 O PIckit3 MPLAB ICE 4000 ICENCD Headers di No Module AC162064 Opt Pag
26. l Dynamic DNS On the right you ll see the current status of the demo board For a quick y example click the LEDs to toggle the lights on the board Press the push buttons except MCLR or tum the potentiometer and you ll see the status update immediately This examples uses AJAX techniques to provide real time feedback Network Configuration SNMP l This site is provided as a tutorial for the various features of the HTTP web Configuration server including Dynamic Variable Substitution display real time data Form Processing handle input from the client Authentication require a user name and password Cookies store session state information for richer applications File Uploads parse files for configuration settings and more Several example applications are also provided for updating configuration parameters sending e mails and controlling the Dynamic DNS client Thanks to built in GZIP compression support all these tutorials and examples fit in the 32kB on board EEPROM For more information on the Microchip TCP IP Stack please refer to the TCP IP Stack API installed with the stack This manual can be launched from your Windows Start menu Coovriaht E 2012 Microchio Technoloov Inc Modified by Olimex Ltd for the PIC WEB line of products To toggle the status LED of the board PIC WEB you can click on the green dot under the caption LEDs By clicking on this dot you are changing the state of the pi
27. mmand y a Ld Al So mo ms i El o Event Log mo Eu o TI f amp ft ft m Eu ca Mew Session Duplicate Session Saved Sessions Change Settings Copy All to Clipboard Clear Scrollback Reset Terminal Full Screen Help About PuTTY Session Options controlling the terminal emulation Terminal Set various terminal options 4 Auto wrap mode initially an DEC Origin Mode initially an Implicit CR in every LF Window Use background colour to erase screen oi Appearance Enable blinking text Behaviour Answerback to E Translation PuTTY Selection Line discipline options Local echo Auto Force on Force off Local line editing a Auto Force on Force off Remote controlled printing Printer to send ANSI printer output to None printing disabled Page 17 of 35 After this setup the connection with the PIC WEB should be ready but the console will not show anything That s because the board is not running on configuration mode To run on that mode you just need to push the BUT button on the board Keep it pressed while you push the RST button 9 t po Ras Ez Go a nn Na E E e a sh Er 5 a A menu will immediately appear on your console terminal in our example PuTTY showing following options ER COMA PuTTY om s a T a 7 Ly g a 1 m E ia Wa a Lu Hi Lu E P LL mt Er ct fl jm m cu Ln dh l h ps E
28. n see how the led switch on or switch off From the I2C Demo menu you can send command via UEXT to a MOD connected to the extension Page 20 of 35 RAQ LEDA ANG o RAL LEDB AN1 RAZ ANZ UREF E EXT 1 RA3 AN3 UREF EXT 2 yy LED RA4 TOCKI PS EXT 3 Y od RAS AN4 EXT 4 RB9 INTO FLTO HP a o RB1 INT1 EXT 12 ea RB2 INT2 EXT 13 RB3 INT3 PS EXT 14 At the page you can also see some values of the PIC WEB sensors and buttons Buttons Potentiometer Temperature Potentiometer shows a measurement from the PIC A D connected to a 1OKQ potentiometer on the board you can freely change that potentiometer position and check how the measurement changes Temperature shows the value of the temperature sensed by the thermistor in the board connected to another A D port of the PIC18F67J60 CCA Buttons shows the state of the on board button It is while the button is not pressed and if it is pressed Uploading pages to the server There are 2 easy ways to upload pages to the server but you will always need to convert the files you want to upload in a MPFS file format One other way is to include the web page on the source code and link it in a project but if we did it in this way we won t use the EEPROM included in the platform wasting program memory that is reason this method will not be included in this manual Microchip File System MPES The implemented HTTP server uses the MPFS simplified f
29. nt platform and a compatible compiler that can be Microchip C18 this last one isn t free but Microchip have a free standard eval version that we can use with limited support but it is absolutely functional to our purpose There is other compatible compiler the Hi Tech PICC 18 We ll choose the Microchip compiler for this manual It will be also necessary to continue with this manual to have an ICSP programmer for the PIC18 Is advisable that this programmer be compatible with MPLAB IDE and would be better to have debugger too but the last one isn t necessary You can upload programs to the PIC WEB with any programmer and software compatible with PIC18 like Olimex s PIC Kit3 programmer MPLAB Integrated Development Environment MPLAB IDE 1s free software distributed by Microchip that includes a toolset for development of PIC microcontroller applications for windows OS It basically integrate transparently other modules like C18 or PICC 18 compilers that strengthen the functionality of MPLAB and let us program in C language by example Installation After you have downloaded MPLAB IDE from Microchip page you must decompress it in any directory and execute the installation file something like Install MP887 exe following the typical windows software installation Complete installation is recommended to avoid compatibility troubles in the project Page 24 of 35 MPLAB C18 Compiler MPLAB C18 is aC compiler intended for the PIC18 family f
30. q WA 7 laio O D De GEIA de PIC WEB REV C development board User s Manual Pb free Green All boards produced by Olimex are ROHS compliant Rev D August 2014 Copyright c 2013 OLIMEX Ltd All rights reserved Page 1 of 35 INTRODUCTION PIC WEB is a compact 65x60 mm board which is supported by Microchip s open source TCP IP stack AN833 The board is designed with 64 pin high performance 1 Mbit Flash microcontroller with Ethernet PIC18F67J60 and supports SLIP ARP IP ICMP TCP UDP HTTP DHCP FTP The Microchip stack is written very modular and flexible and you can enable or disable modules and supports dynamic web pages which give you the possibility to control all PIC resources remotely via FTP HTTP UDP TCP etc With this board you can implement web and ftp server send e mails and almost everything what the big servers do The on board Mbit serial flash is available for data storage This board is designed to have Web page of no more than 128 kB If you want a lot of images in your application you can also host them on other server visible on the network where you have the PIC WEB connected The potential of the board is to generate a fluid communication between some specific sensors or actuators across a TCP IP net including the controls of it The Microchip stack is an open source library which is possible to modify and compile at any time But you will probably need to modify it to your own needs T
31. rom Microchip In our case is the needed compiler because the PIC WEB platform uses the PIC18F67J60 This software converts C code into PIC18 machine code and link them together into a HEX file with the proper memory mapping for the microcontroller just ready to be programmed on it Installation After downloading you must execute the installation file something like MPLAB C18 Std Eval v3 40 exe and follow the usual steps but now you need to take care on some stuff First of all is advisable to install it in the default directory C MCC18 and add the path environment variables large directories names can bring troubles with linker Second is necessary to install MPLAB C18 after MPLAB IDE installation and check the boxes that associate C18 to MPLAB IDE Ja Configuration Options Es In the list below select the checkboxes for the desired MPLAB IDE configuration options Update MPLAB IDE to use this MPLAB C18 Jf Update MPLAB IDE to use this MPLINK Linker MPLIB Librarian and MPASM Assembler e Place link to documentation for this compiler in MPLAB IDE Help Topics e Perform MPLAB IDE updates for all users Cancel After these steps you are able to develop C programs and compile it using MPLAB environment Microchip AN8 amp 33 TCP IP Stack The Stack is an application developed by Microchip for been used in its PIC18 family and intended for both Microchip C18 and Hi Tech PICC 18 compilers You can download
32. t Up to two Master Synchronous Serial Port MSSP modules supporting SPI all 4 modes and I2C Master and Slave modes Up to two Enhanced USART modules Supports RS 485 RS 232 and LIN 1 2 Auto wake up on Start bit Auto Baud Detect 10 Bit up to 16 Channel Analog to Digital Converter module A D Auto acquisition capability Conversion available during Sleep Dual Analog Comparators with Input Multiplexing Special Microcontroller Features 5 5V Tolerant Inputs digital only pins Page 5 of 35 Low Power High Speed CMOS Flash Technology Self reprogrammable under software control C compiler Optimized Architecture for re entrant code Power Management Features Run CPU on peripherals on Idle CPU off peripherals on Sleep CPU off peripherals off Priority Levels for Interrupts 8x8 Single Cycle Hardware Multiplier Extended Watchdog Timer WDT Programmable period from 4 ms to 134s Single Supply 3 3V In Circuit Serial Programming ICSP via two pins In Circuit Debug ICD with 3 Breakpoints via two pins Operating Voltage Range of 2 35V to 3 6V 3 14V to 3 45V using Ethernet module On Chip 2 5V Regulator Page 6 of 35 BLOCK DIAGRAM Data Bus lt 8 gt A fino RAo RASt Data Memory o 3808 Bytes 20 Address Latch Program Counter 12 PORTB E Data Address lt 12 gt N Data Address lt 12 gt ARO RBZ 31 Level Stack Address Latch Program M
33. t your LAN has to have DHCP server In your browser type the IP of the board with the following path http 192 168 0 171 mpfsupload Here 1s a screenshot of what you will see Page 30 of 35 Firefox http 192 168 0171 mpfsupload 3 1921680171 mpfsupload Google 2 Most Visited Getting Started 2 Latest Headlines MPFS Image Upload Click on the button Browse_ to select the bin file you are about to upload Select the image file in directory PIC WEB 5 42 TCPIP Webpage MPFSImg prebuilt bin and press Upload Sit back and relax while the upload takes place and then navigate to the home page to behold the page just uploaded Now your PIC WEB is with Olimex s original software Page 31 of 35 AVAILABLE DEMO SOFTWARE Microchip TCP IP Stack 5 42 modified for PIC WEB REV C suitable both for MPLAB 8 xx and MPLAB X Microchip TCP IP Stack 5 31 modified for PIC WEB REV C suitable only for MPLAB 8 xx created by Paolo Chiarabaglio Production test based on TCP IP Stack 5 00 modified for PIC WEB REV C suitable only for MPLAB 8 xx Page 32 of 35 ORDER CODE PIC WEB completely assembled and tested How to order You can order directly from our e shop or from any of our distributors The list of distributors is available at the following address https www olimex com Distributors Check our web https www olimex com for more info Revision history
34. where just browsing the address of the board Test WEB page As 1t was mentioned above the PIC WEB board has an embedded web server and a demo page The page shows some of the features of the board and it have a link to Olimex s PIC WEB information page To access the demonstration page the server must be accessible from the computer The default IP address of the board is 192 168 0 30 and 192 168 0 1 is the gateway Those values must been set to work with your net In this manual we have set IP address of the board to 192 168 0 171 from the DHCP Then you can get the page with any web browser writing the IP address of the board on the address bar At the picture below you can see the default page that you must get It shows the temperature of the on board thermistor the status of the button BUT the value of the potentiometer the status ofthe LED and so on Page 19 of 35 S MICROCHIP OUMEX Overview TCP IP Stack Demo Application Welcome to PIC WEB LEDS click to toggle ps development board Dynamic Variables g Buttons Stack Version v5 42 A Build Date Nov 27 2012 00 08 00 Potentiometer 561 Authentication PIC WEB development board is used to 2 Temperature 25 7 demonstrate the power of an 8 bit embedded web server This board is produced by Olimex Ltd File Uploads gt More information about this board can be found here http www olimex com nal E mai dev pic web htm

Download Pdf Manuals

image

Related Search

Related Contents

Philips Disposable dust bag    WC-46 DZ WINE COOLER INSTRUCTION MANUAL  Turul 783 and 784 User Manual  Xante FilmMaker 4 Printer  PaseoBebe.com  MTS Models FlexTest IIm/GT/SE Controller Hardware  Refrigerating Circulator KH-5 user manual (English)  Red Crown Pencil Probes Data Sheet  Sentrifugo User Guide - Pragmatic HR  

Copyright © All rights reserved.
Failed to retrieve file