˙ VERSION0/TPF0TVersionnumberdetails Version 276˙ PRJFILEHEADER0ßTPF0TPrjFileHeaderZpercntČ@ZordxZordy Targetfileclcd.c Targetpath$C:\myfiles\microchip\projects\aclcd\ Templatefile)C:\WINDOWS\Desktop\picexp\templates\c.txt Targetdevice PIC16F871 TargetMimicDIL18 Targetclock-1 PaletteCountSciCount Notes.Strings×{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 Arial;}{\f3\fswiss Arial;}{\f4\fswiss Arial;}{\f5\fswiss\fprq2 System;}{\f6\fmodern\fprq1 Courier New;}}{\colortbl\red0\green0\blue0;}=\deflang2057\pard\plain\f2\fs20\b Introduction\plain\f2\fs20 &\par The remote terminal consists of: \par C\par - LCD: any HD44780 compatible 1 or 2 line dot matrix display \par - RS232 interface\par - Two push switches\par \par u\par The target device is a Microchip PIC16F871. (visit www.microchip.com for further information on Micropchip PICs)\par ă\par This remote terminal can be used as an operator interface connected to a PC or some other computer equipment. A simple menu system with Yes/No answers via the input switches could be affected. The applications are endless!\par …\par This project was developed on a Dontronics DT1003 / DT1006. For more information on Dontronic products visit www.dontronics.com.\par \par 0\par \plain\f2\fs20\b Opertation\plain\f2\fs20 ~\par When SW_1 is pressed send an ASCII '1' out of the RS232 port, when SW_2 pressed send an ASCII '2' out of the RS232 port. \par F\par A character received by the RS232 port is interpreted as follows:\par &\par \plain\f2\fs20\b Value\tab Action;\par \plain\f2\fs20 0x0D\tab Move cursor to start of line 1,\par 0x0A\tab Move cursor to start of line 2\par 0x0C\tab Erase display\par 5\par All other characters are printed to the display.\par .\par \plain\f2\fs20\b Buad rate\plain\f2\fs20 ú\par The baud rate of RS232_1 is set at 1200. This however may be increased to a maximum of around 4800. Higher baud rates may cause communications errors since LCD_1 has to carry out its write function in less than one bit timing of the serial data.\par 0\par \plain\f2\fs20\b Output File\plain\f2\fs20 6\par The builder generates code output to file clcd..c\par \par \plain\f2\fs20\b \par Testing\plain\f2\fs20 ď\par A way of testing the simple remote terminal would be to use a terminal emulator such as Windows HyperTerminal. Set the emulator to Baud=1200, Data bits=8, Stop bits=2, Hardware flow control=none, and Comport to the port you are using.\par -\par The connections to the PC 9-way 'D' are:\par \par PC-Pin2 <- RS232_1-TX_OUT\par PC-Pin3 -> RS232_1-RX_IN\par PC-Pin5 - RS232-GND\par Z\par In HyperTerminal when the return key is pressed the LCD is cleared, any other key is Š\par printed on the display (not all characters will be printable). Pressing either of the two push switches will produce either a '1' or a '2' on the terminal emulator.\par \par &\par \plain\f2\fs20\b Application code \par \plain\f2\fs20 Below is the application code for this project. To use it, select and copy (ctr-insert) the below and past it into a text editor and save as a 'C' file in your working directory. You may also need to change the build output path using 'Project | Options'\par \plain\f2\fs20\b G\par \plain\f2\fs20 Note the inclusion of clcd.c with #include 'clcd.c'\par \par \par [\par \plain\f6\fs16 ///////////////////////////////////////////////////////////////////////L\par //// ACLCD.C ////L\par //// ////L\par //// Demo application of simple dumb terminal, consisting of ////L\par //// 2 x Push switchs ////L\par //// 1 x RS232 Tranceiver ////L\par //// 1 x LCD dot matrix display 44780 and compatibles ////L\par //// ////L\par //// ////L\par //// This program is an example of how your application code is ////L\par //// is organised. Note the #include "clcd.c", this include ////L\par //// file was generated by QuickBuilder and contains all ////L\par //// driver code. ////L\par //// ////L\par //// This demo is intended for a PIC16F871 ////L\par //// Compiled using CCS 'C' visit www.quickbuilder.co.uk/qb/ccs ////L\par //// for more information. ////L\par ///////////////////////////////////////////////////////////////////////\par #include <16f871.H>\par 6\par #fuses hs,nowdt,noprotect,put,nowrt,nolvp,nodebug\par  \par #case\par \par #define PORTA 5 \par #define PORTB 6\par #define PORTC 7\par #define PORTD 8\par #define PORTE 9\par #define TRISA 0x85 \par #define TRISB 0x86\par #define TRISC 0x87\par #define TRISD 0x88\par #define TRISE 0x89\par \par \par #include "clcd.c"\par \par \par \par main() \{\par int c;\par \par // initialise \par //\par INIT_SUB_CIRCUITS();%\par setup_adc_ports(NO_ANALOGS);\par \par \par // show ready \par //&\par printf(LCD_1PUTC, "Ready 1");\par LCD_1CURMOVE(0x40);&\par printf(LCD_1PUTC, "Ready 2");\par \par \par // main program loop \par //\par while(1) \{\par \par  \par // service rx comms\par //(\par if ( RS232_1INCOMING() ) \{E\par c = RS232_1IN(); // wait for character in \par >\par if (c==0x0a) \{ // line feed ^J G\par LCD_1CURMOVE(0x40); // move cursor to line 2D\par \} else if (c==0x0d) \{ // carriage return ^MG\par LCD_1CURHOME(); // move cursor to line 1>\par \} else if (c==0x0c) \{ // form feed ^L?\par LCD_1CLEAR(); // clear displayC\par \} else \{ // none of the aboveA\par LCD_1PUTC(c); // print character\par \}\par \}\par "\par // service user input\par //$\par if ( SW_1PRESSED() ) \{\par delay_ms(200);!\par RS232_1OUT('1');\par \par \}$\par if ( SW_2PRESSED() ) \{\par delay_ms(200);!\par RS232_1OUT('2');\par \} \par \}\par \}\par \plain\f2\fs20 \par \plain\f4\fs20 \par }TitleSimple remote terminal DT106Keywords+terminal;RS232;simple;dot matrix;dontronics AltTemplate˙ SCGENERIC0úTPF0 tScGenericLibName.C:\Program Files\QuickBuilder\\data\c_user.libcctnameLCD dot matrix display 44780 descriptionDot matrix LCDkeywordsDisplay,LCD,Dot matrix,44780ScTypeiocountrefnameLCD_CctAsMetafile.Data Ä_Ä_X÷‚˘]h%B˙* EMFŔ_Ź XӞ   XX  ``K@0 qiqiœ č& % 6œ % €( œ & % 6% €( & % 6č% €(  RL<Arial˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝% T`Ž%œ.= ‡@= ‡@ş &LTDB4÷˝&% €( RL<Arial÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝% T`Ž.œ7= ‡@= ‡@ś bLTDB5÷˝&% €( RL<Arial÷˝÷˝ď{ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝% T`Ž8œA= ‡@= ‡@ś žLTDB6&% €( RL<Arial÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝% T`ŽBœK= ‡@= ‡@ś ÚLTDB7÷˝&% €( RL<Arial÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙÷˝% TXK—T= ‡@= ‡@ą LPRS&% €( RL<Arial÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{% T`Uœ^= ‡@= ‡@° RLTR/Wď{% 2% €( RL<Arialď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{% TTŽ^’g= ‡@= ‡@š ŽLPE˙˙% €(  2 b& % 6\ b% €(   \ b& % 6\ p% €(   \ p& % 62 p% €(   2 p& % 62 b% €(  RLHArial% TŹŤ3 >= ‡@= ‡@n €LlALPHANUMERIC LCD% %,%,,,%,+,,% €(  œ č& % 6č% €(  RLHArial% T„Ă=ďH= ‡@= ‡@ ź L`(HD44780),, % €(  <č& % 6<$ % €(   $ & % 6x$ % €(   B & % 6ZB % €(   6` & % 6B` % €(     & % '% +ëžM% €(  ˙˙˙% €(  p& % % €6R% €(   ž& % 6€% €(   Ä4& % 6<ź% €(   čř& % 6Äř% €(   NÎ& % 6*°% €(   Ź& % 6p% €(   D& % 6€% €(   ˆř& % 6Äř% €(     & % 'ěz% V,@&J-L\L,DL\% €(  ˙˙˙% €(  LD& % % €6ˆD% €(     & % 'ěz% V,@CJJLŕLřLŕ% €(  ˙˙˙% €(  Lř& % % €6ˆř% €(     & % 'ěz% V,@[JbLvLŚŽLv% €(  ˙˙˙% €(  LŽ& % % €6ˆŽ% €(  RL<Arial% T`*%:.= ‡@= ‡@ˆ &LTVDD%&% €( RL<Arial% TX1=:F= ‡@= ‡@ł źLPVE % €( RL<Arial% T`,Z:c= ‡@= ‡@” pLTVSS % €( RL<„„Arial% T`kUz^= ‡@= ‡@RLT10K&% €(  <ę& % 6<Ž% €(   Ž& % 6ZŽ% €(  RL<Arial% T`fv = ‡@= ‡@SLTVDD%&% €(    & % '0% *ń.% €(  ˙˙˙% €(    & % 'Ž% *ńžĐ% €(  ˙˙˙% €(    & % 'ěz% V,= Fźxź¨řźx% €(  ˙˙˙% €(  źx& % % €6€% €(   ź¨& % 6€% €(  RL<Arial% T„Ac = ‡@= ‡@ÔA L`T1 ______ % €(    & % 'ěz% V,=F$źđź řźđ% €(  ˙˙˙% €(  źđ& % % €6€% €(   ź & % 6€% €(  RL<Arial% T„Ac= ‡@= ‡@Ôš L`T2 ______ % €(    & % 'ěz% V,=/F7źhź˜ř€źh% €(  ˙˙˙% €(  źh& % % €6€€% €(   ź˜& % 6€€% €(  RL<Arial% T„A'c0= ‡@= ‡@Ô1 L`T3 ______ % €(    & % 'ěz% V,=CFJźŕźřřźŕ% €(  ˙˙˙% €(  źŕ& % % €6€ř% €(   ź& % 6€ř% €(  RL<Arial% T„A:cC= ‡@= ‡@ÔŠ L`T4 ______ % €(    & % 'ěz% V,=VF]źXźˆřpźX% €(  ˙˙˙% €(  źX& % % €6€p% €(   źˆ& % 6€p% €(  RL<Arial% T„AMcV= ‡@= ‡@Ô! L`T5 ______ % €(    & % 'ěz% V,=iFqźĐź řčźĐ% €(  ˙˙˙% €(  źĐ& % % €6€č% €(   ź & % 6€č% €(  RL<Arial XӞ  XX  ``K@0 qiqiœ č& % 6œ % T„A`ci= ‡@= ‡@Ô™ L`T6 ______ % €(    & % 'ěz% V,=|F„źH źx ř` źH % €(  ˙˙˙% €(  źH & % % €6€` % €(   źx & % 6€` % €(  RL<ArialArial÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝% T„Asc|= ‡@= ‡@Ô L`T7 ______ % €(    & % '0% *’ :Ľ M% €(  ˙˙˙% €(    & % 'Ž% *’ rĽ …% €(  ˙˙˙% €(    & % 'Ž% *’ ąĽ Ä% €(  ˙˙˙% €(    & % 'Ž% *’ éĽ ü% €(  ˙˙˙% €(    & % 'Ž% *’ žĽ ą% €(  ˙˙˙% €(    & % 'Ž% *’ fĽ y% €(  ˙˙˙% €(    & % 'Ž% *’ (Ľ :% €(  ˙˙˙% €(  ź &$% % €6€ % €(     & % 'ěz% V,=˜B˘źö ź2 Ú źö % €(  ˙˙˙% €( % €RL<ArialTR/Wď{% 2% €( L<Arialď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{% T¨F˜‡Ą= ‡@= ‡@řő LlTARGET ________ %& % €(  €` & % 6D` % €(   D` & % 6$ % €(   €č& % 6Dč% €(   Dč& % 6Ź% €(   €p& % 6Dp% €(   Dp& % 64% €(   €ř& % 6Dř% €(   Dř& % 6ź% €(   €€& % 6D€% €(   D€& % 6D% €(   €& % 6D% €(   D& % 6Ě% €(   €& % 6D% €(   D& % 6T% €(  RLTArial<$ % €(  $ & % 6x$ % €(   B & % 6% T`o*‚6= ‡@= ‡@7DLTVR1,+&% €( RLTArial% '% +ëžM% €(  ˙˙˙% €(  p& % % €6R% % TX™ Ľ= ‡@= ‡@˙ LPU1+&% €(  &$% W(÷6 €  % €(   & % W$f%f*D&% €(   & % W(fp%<ę<&&% €(   & % W(S%f*ˆDˆ&&% €(   & % W(fhpm<č<ĘĘ% €(   & % W$fcfhŹĘ% €(   & % W(S^fhˆŽˆĘĘ% €(   & % W,3 Š*€` ` Dœ D% €(   & % W,3 Š3€$ $ €œ €% €(   & % W,33Š=€€č€čźœ ź% €(   & % W$3FŠF€řœ ř% €(   & % W,3cŠ€€` ` ` ` Źœ Ź% €(   & % W,3ZŠm€č$ č$ pœ p% €(   & % W,3PŠZ€pčpč4œ 4% €(   SwModuleAsStrings.Strings//
//
#if 0 // 1=debug#define PORT_P1_ PORTC#define TRIS_P1_ TRISC#define _BS1_ 4#define PORT_P2_ PORTC#define TRIS_P2_ TRISC#define _BS2_ 1#define _L_ 0#define _F_ 0#endif;// ------------------ modified by script ------------------$#define FUNC__ 0x20 | _L_ | _F_C#define P__ PORT_P1_ // LCD data lines interface#define TRISP__ TRIS_P1_A#define PD4__ PORT_P1_, 0 + _BS1_ // 4 bit portsh (db4-db7)'#define TRISPD4__ TRIS_P1_, 0 + _BS1_'#define PD5__ PORT_P1_, 1 + _BS1_'#define TRISPD5__ TRIS_P1_, 1 + _BS1_'#define PD6__ PORT_P1_, 2 + _BS1_'#define TRISPD6__ TRIS_P1_, 2 + _BS1_'#define PD7__ PORT_P1_, 3 + _BS1_'#define TRISPD7__ TRIS_P1_, 3 + _BS1_<#define PE__ PORT_P2_, _E_ // 3 bit portsh (e,rw,rs)!#define TRISPE__ TRIS_P2_, _E_"#define PRW__ PORT_P3_, _RW_"#define TRISPRW__ TRIS_P3_, _RW_"#define PRS__ PORT_P4_, _RS_"#define TRISPRS__ TRIS_P4_, _RS_9// ------------------------------------------------------@// ------------------------ macros -----------------------------)#define LCD_CURMOVE(x) LCD_IWR(0x80 | x)%#define LCD_CURHOME() LCD_IWR(0x02)%#define LCD_CLEAR() LCD_IWR(0x01)%#define LCD_CURLEFT() LCD_IWR(0x10)@// ------------------------ code -------------------------------//*********************void DATA_OUT__(BYTE data) {  bit_clear(*PD4__); if (bit_test(data,0) ) bit_set(*PD4__);  bit_clear(*PD5__); if (bit_test(data,1) ) bit_set(*PD5__);  bit_clear(*PD6__); if (bit_test(data,2) ) bit_set(*PD6__);  bit_clear(*PD7__); if (bit_test(data,3) ) bit_set(*PD7__); delay_cycles(2); }//*********************BYTE DATA_IN__( void ) { int dat; delay_cycles(2); dat = *PORT_P1_; dat = dat >> _BS1_;  return (dat);  }//********************* void BUSY__() { int R1;  do {( bit_set(*TRISPD4__); // input bit_set(*TRISPD5__); bit_set(*TRISPD6__); bit_set(*TRISPD7__);/ bit_clear(*PRS__); // hi nibble in delay_cycles(2); bit_set(*PRW__); delay_cycles(2); bit_set(*PE__); R1 = DATA_IN__(); bit_clear(*PE__); delay_cycles(2);, bit_set(*PE__); // lo nibble delay_cycles(2); bit_clear(*PE__); delay_cycles(2); } while ( bit_test(R1,3) ); : bit_clear(*TRISPD4__); // set data port to output bit_clear(*TRISPD5__); bit_clear(*TRISPD6__); bit_clear(*TRISPD7__); return; }//*********************void LCD_IWR(int command) { int cmd; * BUSY__(); // Wait while busy  cmd = command;( bit_clear(*PRS__); // hi nibble out bit_clear(*PE__); delay_cycles(2); bit_clear(*PRW__); delay_cycles(2); DATA_OUT__( cmd >> 4 ); delay_cycles(2); bit_set(*PE__); delay_cycles(2); bit_clear(*PE__); delay_cycles(2); ( DATA_OUT__( cmd ); // lo nibble out delay_cycles(2); bit_set(*PE__); delay_cycles(2); bit_clear(*PE__); delay_cycles(2); }void LCD_DWR(int data){ int R0,R1; int c;* BUSY__(); // Wait while busy c = data;( bit_clear(*PRS__); // hi nibble out bit_clear(*PE__); bit_clear(*PRW__); DATA_OUT__( c >> 4 ); delay_cycles(2); bit_set(*PRS__); delay_cycles(2); bit_set(*PE__); delay_cycles(2); bit_clear(*PE__); delay_cycles(2); ( DATA_OUT__( c ); // lo nibble out bit_set(*PE__); delay_cycles(2); bit_clear(*PE__); delay_cycles(2);}//*********************void LCD_PUTC(int character){ LCD_DWR(character);}//*********************void LCD_PUTC__(int character) { int R0,R1; int c;* BUSY__(); // Wait while busy c = character;( bit_clear(*PRS__); // hi nibble out delay_cycles(2); bit_clear(*PE__); delay_cycles(2); bit_clear(*PRW__); delay_cycles(2); DATA_OUT__( c >> 4 ); delay_cycles(2); bit_set(*PRS__); delay_cycles(2); bit_set(*PE__); delay_cycles(2); bit_clear(*PE__); delay_cycles(2); ( DATA_OUT__( c ); // lo nibble out delay_cycles(2); bit_set(*PE__); delay_cycles(2); bit_clear(*PE__); delay_cycles(2); }//*********************void DMODE__(int dmode) { dmode &= 0x007; dmode |= 0x008; LCD_IWR(dmode); }//*********************void EMODE__(int mode) { mode &= 0x003; mode |= 0x004; LCD_IWR(mode); }//*********************void LCD_INIT() {9 bit_clear(*TRISPD4__); // set data port to output bit_clear(*TRISPD5__); bit_clear(*TRISPD6__); bit_clear(*TRISPD7__); > bit_clear(*TRISPE__ ); // set control lines to output bit_clear(*TRISPRW__ ); bit_clear(*TRISPRS__ );1 delay_ms(15); // power-up delayC LCD_IWR(FUNC__); // 4-bit-interface, 1-line, 5x8font? DMODE__(0); // disp.off, curs.off, no-blink LCD_CLEAR();4 DMODE__(0x04); // disp.on, curs.off: EMODE__(0x02); // auto-inc (shift-cursor) LCD_CURHOME(); } //section>//
/* */ PartCountPreScale€˙?˙ SCGENERIC0QTPF0 tScGenericLibName*C:\WINDOWS\Desktop\picexp\\data\C_DEMO.libcctnamePush switch SPNO,PU description)Push to make switch with resistor pull upkeywordsSwitch;SPNO;Pull up;Push;ScTypeiocountrefnameSW_CctAsMetafile.Data ŒŒXČó@ű.˙X;|* EMFˆ XӞ   XX  ``K@0 qiqi  & % '% +g Œ ˇ% €(  ˙˙˙ % €( | Ě& % % €6| % €( | ř& % 6| ź% €(  RLZArial% TXŕě,= ‡@= ‡@ˇ LPR1+&% €( RL<Arial% T`ŕ.ě7= ‡@= ‡@ˇ ^LT10K% €(  | œ & % 6| Ř % €(   ¸ Ř & % 6@ Ř % €(   š ö & % 6^ ö % €(   ‚  & % 6v  % €(   | & % 6| T% €(   ^ T& % 6š T% €(  RLT„Courier New% T`Íóá˙= ‡@= ‡@@ đLTVCC+,,% €(    & % '(ň% *m €  % €(  ˙˙˙% €(    & % 'Ž% *m ą€ Ä% €(  ˙˙˙% €(  @ Ź& % % €6@ $ % €(   | Ź& % 6| ˛% €(   "  & % 6" Ę% €(   "  & % 6@  % €(   " Ę& % 6@ Ę% €(   | p& % 6| Ź% €(   | ` & % 6| $ % €(  RLZArial% T`Ţbôo= ‡@= ‡@Ť §LTSW1÷˝,>&% €(    & % 'ěz% V,ýLTl l L¨ 4l % €(  ˙˙˙% €(  l & % % €60 4% €(   l L& % 60 4% €(  RLT„Courier New÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝% T„@@L= ‡@= ‡@Š Đ L`T1 ______÷˝,,+,,,+,,% €(    & % '0% *m (€ :% €(  ˙˙˙% €(  & % % €W$Ö Ö| Ě| % €(   & % W$Ö€ÖŠ| œ | ` % €(   & % W$ÖFÖP| ř| 4% €(   & % W$ÖPÖZ| p| 4% €(   & % W$ÖPóP0 4| 4% €(   SwModuleAsStrings.Strings//
//
//
 PartCountPreScale€˙?˙ SCGENERIC0˝tTPF0 tScGenericLibName*C:\WINDOWS\Desktop\picexp\\data\C_DEMO.libcctnameRS232 Tranceiver description$RS232 serial tranceiver using MAX232keywordsRS232;Tranceiver;MAX232ScTypeiocountrefnameRS232_CctAsMetafile.Data ŘpŘpX“.ó…)ŕPT3 EMFÔp XӞ   XX  ``K@0 qiqiř& % 6ź% €( âź& % 6ź% €(  RL<Arial˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝% T`].m7= ‡@= ‡@ÄaLTVCC÷˝%&% €(  ¸ & % 6ô % €(   Äô & % 6<ô % €(   â & % 6 % €(   ú0 & % 60 % €(     & % '% +m é ý % €(  ˙˙˙% €(  ô $ & % % €6l $ % €(  RL<ArialƒŁŞ´8 ´h đP ´8 % €( ˙˙˙% €(  ´8 & % % €6xP % €(   % TTďlňu= ‡@= ‡@ ĺLP1% €(  ˆŘ & % 6Ř % €(  RL<Arial% 6l ` %€( % Txˆ˜˛Ą= ‡@= ‡@Ňő L\T1 [??]((((((%% T`.Ž:—= ‡@= ‡@Ą š LTRXi% % €( RL<Arial€(  ´° & % % €6xČ % €(   ´ŕ & % 6xČ % €% TXJ‰Q’= ‡@= ‡@L™ LP13% €(  ˆ & % 6 % €(  RL<Arial% TxˆŤ´= ‡@= ‡@Ňm L\T2 [??]((((((% €(  xP & % % T`,˜:Ą= ‡@= ‡@” ő LTRXo&% €( RL<Arial % 6ŕČ %    ŕČ & % 6Œ % €(   &$% ¸ % TXJ“Qœ= ‡@= ‡@LŐ LP12% €(  ˆP & % 6P % €(  RL<Arial˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙% T`/Ą:Ş= ‡@= ‡@§ 1 LTTXi˙˙ % €( RL<Arial÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙÷˝÷˝÷˝% TXJœQĽ= ‡@= ‡@L LP11% €(  ˆŒ & % 6Œ % €(  RL<Arial÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙÷˝÷˝i% TXJŚQŻ= ‡@= ‡@LM LP10% €(  ˆČ & % 6Č % €(  RL<Arialb\default.htt% TTJ°Mš= ‡@= ‡@L‰ LP9% €(  ˆœ & % 6œ % €(  RL<Arialfolder.htt% T`-…:Ž= ‡@= ‡@š } LTTXo % €( RL<ArialĄÚ  Q|Qę:i˘Ř+00#C:\î1&.•€Windows1&š™DesktopDESKTOP1H+ř“picexpPICEXPÚ  Q<Qh+&klibsourceLIBS~11W,Ä,SerialSERIAL"2ÜpV,÷u rs232.emfRS232.E!% TXJ€Q‰= ‡@= ‡@L] LP14% €(  ˆ` & % 6` % €(  RL<ArialpDESKTOP1H+ř“picexpPICEXP!1h+&kbsourceLIBSOU~11W,Ä,SerialSERIAL8'QĆđŕOĐ ę:i˘Ř+00#C:\î1&.•€Windows1&š™DesktopDESKTOP1H+ř“picexpPICEXP!1h+,% T`){:„= ‡@= ‡@ A LTGND&%&% €( RL<Arial% TXJvQ= ‡@= ‡@L! LP15% €(  ô ` & % 6l ` % €(  RL<Arial% TTďvň= ‡@= ‡@ ! LP2% €(  ô  & % 6l  % €(  RL<Arial% TTď“ňœ= ‡@= ‡@ Ő LP5% €(  ô P & % 6l P % €(  RL<Arial÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{÷˝% TTďœňĽ= ‡@= ‡@  LP6÷˝% €(  ô Œ & % 6l Œ % €(  RL<Arial÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{˙˙˙˙÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝÷˝ď{ď{÷˝% TTďŚňŻ= ‡@= ‡@ M LP7÷˝% €(  ô Č & % 6l Č % €(  RL<Arialď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{˙˙ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{% TTď°ňš= ‡@= ‡@ ‰ LP8% €(  ô Ř & % 6l Ř % €(  RL<Arial% TTď‰ň’= ‡@= ‡@ ™ LP4% €(  ô œ & % 6l œ % €(  RL<Arial% TTď€ň‰= ‡@= ‡@ ] LP3% €(  ˆ$ & % 6$ % €(  RL<Arial% T`*q:z= ‡@= ‡@ˆ  LTVCC%&% €( RL<Arial% TXJlQu= ‡@= ‡@LĺLP16% €( RLZArial% Tpü^$k= ‡@= ‡@g ‹LXMAX23222+&%&% €(    & % '% +Ÿ é¸ Z % €(  ˙˙˙% €(    & % '% +Z és Z % €(  ˙˙˙% €(  \ $ & % % €6P $ % €(   ź $ & % 6Č $ % €(   z  & % 6\ č% €(   z $ & % 6\  % €(   z B & % 6\ $ % €(   z ` & % 6\ B % €(    $ & % 6Č $ % €(    $ & % 6P $ % €(  RL<Arialď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{˙˙ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{ď{% T`—iŁr= ‡@= ‡@ň ÎLT1uF% €(    & % '% +Z  s † % €(  ˙˙˙% €(    & % '% +Ÿ  ¸ † % €(  ˙˙˙% €(  ź P & % % €6Č P % €(   \ P & % 6P P % €(   ž 2 & % 6ź  % €(   ž P & % 6ź 2 % €(   ž n & % 6ź P % €(   ž Œ & % 6ź n % €(    P & % 6P P % €(    P & % 6Č P % €(  RL<Arial ¸ & % 6ô % €(   Äô & 6<ô % €(  % T`—ŹŁľ= ‡@= ‡@ň r LT1uF% €(    & % '% +A × ˛ ę % €(  ˙˙˙% €(    & % '% +A  ˛ / % €(  ˙˙˙% €(  | 4 & % % €6| @ % €(   | Ô & % 6| Č % €(   š  & % 6¸ 4 % €(   |  & % 6š 4 % €(   ^  & % 6| 4 % €(   @  & % 6^ 4 % €(   | Œ & % 6| Č % €(   | | & % 6| @ % €(  RL<Arial €( RL<Arial€(  ´° & % % €6x% €(   ´% T`şžĆÇ= ‡@= ‡@Í á LT1uF% €(    & % '% +÷ ö l% €(  ˙˙˙% €(    & % '% +˛ öË l% €(  ˙˙˙% €(  ´ 4& % % €6¨ 4% €(    4& % 6 4% €(   Ň R& % 6´ p% €(   Ň 4& % 6´ R% €(   Ň & % 6´ 4% €(   Ň ř& % 6´ % €(   \ 4& % 6 4% €(   l 4& % 6¨ 4% €(  RL<Arial˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙% T`/Ą:އ@= ‡@§ 1 LTTXi˙˙% T`÷>G= ‡@= ‡@I ÁLT1uF% €(    & % '% *ń(:% €(  ˙˙˙% €(    & % 'Ž% *ńm € % €(  ˙˙˙% €(    & % '% *I o4 % €(  ˙˙˙% €(  F$ & % % €6ţ$ % €(  RL<Arial TXJŚQŻ= ‡@= ‡@LM LP10% €(  ˆČ & %6Č % €(  R% TpĐqîz= ‡@= ‡@” LXTX_OUT %&% €(    & % 'ŘÚ% *I† oą % €(  ˙˙˙% €(  Fœ & % % €6ţœ % €(  RL<ArialRL<Arifolder.htt% TlĐ…ćŽ= ‡@= ‡@”} LXRX_IN‡@& &% €(  X¸ &$% 6¸ % €(     & % 'ěz% V,ĆŰËĺXÖ Xš v¸ XÖ % €(  ˙˙˙% €( % €RL<Arial€Q‰= ‡@= ‡@L] LP14% €(  ˆ` & % 6% €(  RL<TO% T¨ĐŰä= ‡@= ‡@”™ LlTARGET ________0 %& % €(    & % 'ěz% V,ƒŁŞ´8 ´h đP ´8 % €(  ˙˙˙% €(  ´8 & % % €6xP % €(   ´h & % 6xP % €(  RL<Arial% TXJvQ‡@= ‡@L! LP15% €(  ô ` &% 6l ` % €( % Tˆ˜˛Ą= ‡@= ‡@Ňő LdT1 ________ % €(    & % 'ěz% V,ƒś˝´° ´ŕ đČ ´° % €(  ˙˙˙% €(  ´° & % % €6xČ % €(   ´ŕ & % 6xČ % €(  RL<Arial TTď“ňœ= ‡@= ‡@ Ő L% TˆŤ˛´= ‡@= ‡@Ňm LdT2 ________ % €(  xP & % 6ŕP % €(   ŕP & % 6 % €(   xČ & % 6ŕČ % €(   ŕČ & % 6Œ % €(   &$% W$şšŔ㸠 % €(   & % W$Ăvęvô $  $ % €(   & % W,“vęŠô œ Ř œ Ř $  $ % €(   & % W,““ęŚô Ř Ř Ř Ř P  P % €(   & % W(ÝęŚô     P % €(   & % W(ÖŚę°ô P | P | Œ % €(   & % W,ÖPý€ô ` | ` | 4l 4% €(   & % W$fFfPř4% €(   & % W(SPfvˆ$ $ 4% €(   & % W$#PfP\ 44% €(   & % W$fÖfภ| % €(   & % W(S€fÖˆ` ` | % €(   & % W0ÖÖfŕ| | | ¸ ô ¸ ô | | % €(   & % W,Sv¸Šˆœ <œ <$ ţ$ % €(   & % W,SЏ“ˆŘ xŘ xœ ţœ % €(   & % W$SŚzŚxP ˆP % €(   & % W,SzşxČ ÄČ Ä ˆ % €(   SwModuleAsStrings.Strings//
 //
PartCountPreScale€˙?˙ CCTOBJ0QTPF0tcctobjscale„Ąśý?qordxƒţqordy)IoSelectArray.Strings-188910-1-1-1 headertextLCD_1parentfrmmain.pnSheettopleft&cctnameLCD dot matrix display 44780refnameLCD_1 Annotated swincluded ScGeneric.OwnerIDEnabled SelectSheetNumPropertyValue.Strings-1-100-110-1˙ CCTOBJ0MTPF0tcctobjscale„Ąśý?qordx qordyIoSelectArray.Strings-118-1-1-1-1-1-1 headertextSW_1parentfrmmain.pnSheettopleftącctnamePush switch SPNO,PUrefnameSW_1 Annotated swincluded ScGeneric.OwnerIDEnabled SelectSheetNumPropertyValue.Strings-1-1-1-1-1-1-1-1˙ CCTOBJ0NTPF0tcctobjscale„Ąśý?qordxšqordyIoSelectArray.Strings-119-1-1-1-1-1-1 headertextSW_2parentfrmmain.pnSheettopleftăcctnamePush switch SPNO,PUrefnameSW_2 Annotated swincluded ScGeneric.OwnerIDEnabled SelectSheetNumPropertyValue.Strings-1-1-1-1-1-1-1-1˙ CCTOBJ0OTPF0tcctobjscale„Ąśý?qordx„ţqordyHIoSelectArray.Strings-12122-1-1-1-1-1 headertextRS232_1parentfrmmain.pnSheettop`left&cctnameRS232 TranceiverrefnameRS232_1 Annotated swincluded ScGeneric.OwnerIDEnabled SelectSheetNumPropertyValue.Strings-1-1-1-1-1-1-1-1