<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-16316</id>
	<title>Nabble - PIC - [PIC]</title>
	<updated>2009-12-07T03:30:07Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/PIC----PIC--f16316.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/PIC----PIC--f16316.html" />
	<subtitle type="html">Strictly on the topic of PICs.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26676057</id>
	<title>Re: Audio recording in APR6008 chip With PIC16F877A.</title>
	<published>2009-12-07T03:30:07Z</published>
	<updated>2009-12-07T03:30:07Z</updated>
	<author>
		<name>Richard Seriani</name>
	</author>
	<content type="html">Victor,
&lt;br&gt;&lt;br&gt;The datasheet shows only 640 sectors, so your range is only 0x280, not 
&lt;br&gt;ox3ff. If you want to split that into three portions, they would have to 
&lt;br&gt;start at 0x000, 0x0d5, and 0x1ab.
&lt;br&gt;&lt;br&gt;You may want to look at the Current Device Status (CDS) Overflow and Illegal 
&lt;br&gt;Address flags to to help you see if either of those is a problem.
&lt;br&gt;&lt;br&gt;Good luck.
&lt;br&gt;&lt;br&gt;Richard
&lt;br&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: &amp;quot;VICTOR PV&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26676057&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;juo.victor@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26676057&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;piclist@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Sunday, December 06, 2009 11:34 PM
&lt;br&gt;Subject: [PIC] Audio recording in APR6008 chip With PIC16F877A.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Hi all
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am developing an automatic bell system which records audio in
&lt;br&gt;APR6008 and plays at predetermined time. The controller used in PIC16F877A.
&lt;br&gt;I recorded audio in the APR6008 and played back. The problem is when
&lt;br&gt;recording time increases early recorded area replaces with new data.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The datasheet of APR6008 shows that there is 10bits address for
&lt;br&gt;the memory(out of total 15 bits, 5 bits reserved for future use.) So my plan
&lt;br&gt;was to divide total 3FF range Divided into three portions. Since APR6008 can
&lt;br&gt;store 8min audio, now each section will get 160 seconds. The starting
&lt;br&gt;addresses for each section selected as 0x 000, 0x155, 0x2AA. I wrote code
&lt;br&gt;with this addresses. Then address 0x2AA didn’t accepted by the device. Other
&lt;br&gt;two portions recorded but over lapped. This problem is confusing me for some
&lt;br&gt;days. If any body have idea please help. &amp;nbsp; &amp;nbsp; &amp;nbsp;Thanks in advance.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Victor.
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Audio-recording-in-APR6008-chip-With-PIC16F877A.-tp26672418p26676057.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26672418</id>
	<title>Audio recording in APR6008 chip With PIC16F877A.</title>
	<published>2009-12-06T20:34:05Z</published>
	<updated>2009-12-06T20:34:05Z</updated>
	<author>
		<name>VICTOR PV</name>
	</author>
	<content type="html">Hi all
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I am developing an automatic bell system which records audio in
&lt;br&gt;APR6008 and plays at predetermined time. The controller used in PIC16F877A.
&lt;br&gt;I recorded audio in the APR6008 and played back. The problem is when
&lt;br&gt;recording time increases early recorded area replaces with new data.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The datasheet of APR6008 shows that there is 10bits address for
&lt;br&gt;the memory(out of total 15 bits, 5 bits reserved for future use.) So my plan
&lt;br&gt;was to divide total 3FF range Divided into three portions. Since APR6008 can
&lt;br&gt;store 8min audio, now each section will get 160 seconds. The starting
&lt;br&gt;addresses for each section selected as 0x 000, 0x155, 0x2AA. I wrote code
&lt;br&gt;with this addresses. Then address 0x2AA didn’t accepted by the device. Other
&lt;br&gt;two portions recorded but over lapped. This problem is confusing me for some
&lt;br&gt;days. If any body have idea please help. &amp;nbsp; &amp;nbsp; &amp;nbsp;Thanks in advance.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Victor.
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Audio-recording-in-APR6008-chip-With-PIC16F877A.-tp26672418p26672418.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26666723</id>
	<title>Any one has serial smart card programer interface schematic</title>
	<published>2009-12-06T08:53:19Z</published>
	<updated>2009-12-06T08:53:19Z</updated>
	<author>
		<name>phong ly</name>
	</author>
	<content type="html">Any one has serial smart card programer interface schematic? I am doing a final project about read/write cryptogaphic smart card? I am a newbie so i want to know smart card schematic and principle of circuit. Please help me. So thanks thanks thanks!!!!!!!!!!!!!!!!!</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Any-one-has-serial-smart-card-programer-interface-schematic-tp26666723p26666723.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26651415</id>
	<title>Re: de facto standard for intel hex files produced by MPLAB?</title>
	<published>2009-12-04T16:04:32Z</published>
	<updated>2009-12-04T16:04:32Z</updated>
	<author>
		<name>Christopher Head-4</name>
	</author>
	<content type="html">-----BEGIN PGP SIGNED MESSAGE-----
&lt;br&gt;Hash: SHA1
&lt;br&gt;&lt;br&gt;On Fri, 04 Dec 2009 11:00:29 -0300
&lt;br&gt;Mauricio Giovagnini &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26651415&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;maugiovagnini@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Peter escribió:
&lt;br&gt;&amp;gt; &amp;gt; Is the default setting for MPLAB hex output INHX32 ? which is
&lt;br&gt;&amp;gt; &amp;gt; INHX8M with an opcode 04 record to select INHX32 ?
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; thanks,
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; Peter
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Peter, the default output of the LINKER (MPLINK) is INHX32, 
&lt;br&gt;&amp;gt; if you wish to use another one you have to specify it (via 
&lt;br&gt;&amp;gt; command line. ex using the parameter /aINHX8S or via the 
&lt;br&gt;&amp;gt; MPLAB IDE in your project settings, under the LINKER tabsheet).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; About the opcode 04, I don't undestand the question, can you 
&lt;br&gt;&amp;gt; repost it?
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;He means opcode 04 of the Intel HEX file format, not of the PIC
&lt;br&gt;instruction set. Opcode 4 is the &amp;quot;extended linear address record&amp;quot; type
&lt;br&gt;code, which is used to provide the upper 16 bits of a 32-bit address
&lt;br&gt;and is used in I32HEX but not I16HEX.
&lt;br&gt;&lt;br&gt;Chris
&lt;br&gt;-----BEGIN PGP SIGNATURE-----
&lt;br&gt;Version: GnuPG v2.0.11 (GNU/Linux)
&lt;br&gt;Comment: GnuPT 2.7.2
&lt;br&gt;&lt;br&gt;iEYEARECAAYFAksZo4gACgkQXUF6hOTGP7flGwCdG9tkqhf8p+rRw/FypQ3yLFO2
&lt;br&gt;d2EAoJOHQsuwe+ADLDBP+pGYvzoZaHqm
&lt;br&gt;=4mqY
&lt;br&gt;-----END PGP SIGNATURE-----
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/de-facto-standard-for-intel-hex-files-produced-by-MPLAB--tp26465096p26651415.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26646436</id>
	<title>RE: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-04T09:41:53Z</published>
	<updated>2009-12-04T09:41:53Z</updated>
	<author>
		<name>Michael Rigby-Jones-2</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26646436&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;piclist-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26646436&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;piclist-bounces@...&lt;/a&gt;] On
&lt;br&gt;Behalf
&lt;br&gt;&amp;gt; Of cllow2020
&lt;br&gt;&amp;gt; Sent: 04 December 2009 15:32
&lt;br&gt;&amp;gt; To: Microcontroller discussion list - Public.
&lt;br&gt;&amp;gt; Subject: Re: [PIC] increase pic program flash memory size ? possible ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; thanks jinx,
&lt;br&gt;&lt;br&gt;&amp;lt;snip&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;gt; an0_value=(an0_value/10)*2441 / 1000 &amp;nbsp; //: get back reading in mv
&lt;br&gt;range
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; an1_value=(an1_value/10)*2441 / 1000
&lt;br&gt;&amp;gt; an2_value=(an2_value/10)*2441 / 1000
&lt;br&gt;&amp;gt; an3_value=(an3_value/10)*2441 / 1000
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; an4_value=(an4_value/10)*2441 / 1000 *16 &amp;nbsp; &amp;nbsp;//: get back reading in mv
&lt;br&gt;&amp;gt; range
&lt;br&gt;&amp;gt; and 16x
&lt;br&gt;&amp;gt; an5_value=(an5_value/10)*2441 / 1000 *16
&lt;br&gt;&amp;gt; an6_value=(an6_value/10)*2441 / 1000 *16
&lt;br&gt;&amp;gt; an7_value=(an7_value/10)*2441 / 1000 *16
&lt;br&gt;&amp;gt; --
&lt;/div&gt;&lt;br&gt;You would probably save a useful amount of program memory if you can put
&lt;br&gt;the ADC values into an array and iterate through them in a loop rather
&lt;br&gt;than calculating each one explicitly.
&lt;br&gt;&lt;br&gt;Also assuming you are using integers in the calculations you could save
&lt;br&gt;a little more memory and improve speed by scaling the constants to avoid
&lt;br&gt;the two divide/multiply operations e.g.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; an0_value=(an0_value/10)*2441 / 1000
&lt;br&gt;&lt;br&gt;can be reduced to
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; an0_value=(an0_value * 125) / 512
&lt;br&gt;&lt;br&gt;and 
&lt;br&gt;&amp;nbsp; &amp;nbsp; an4_value=(an4_value/10)*2441 / 1000 *16
&lt;br&gt;&lt;br&gt;can be reduced to
&lt;br&gt;&amp;nbsp; &amp;nbsp; an4_value=(an4_value * 125) / 8192
&lt;br&gt;&lt;br&gt;If your compiler is smart enough the divisions will be reduced to shift
&lt;br&gt;operations, or you could do them explicitly. &amp;nbsp;
&lt;br&gt;&lt;br&gt;These are not exactly equivalent; the scaling factor is 0.2441 in the
&lt;br&gt;original and 0.244140 in the optimised version, giving an error of
&lt;br&gt;0.016% which is probably insignificant compared to component tolerances
&lt;br&gt;(scaling resistors and voltage reference for ADC. This gives a maximum
&lt;br&gt;error in the reported value of 1mv.
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;=======================================================================
&lt;br&gt;This e-mail is intended for the person it is addressed to only. The
&lt;br&gt;information contained in it may be confidential and/or protected by
&lt;br&gt;law. If you are not the intended recipient of this message, you must
&lt;br&gt;not make any use of this information, or copy or show it to any
&lt;br&gt;person. Please contact us immediately to tell us that you have
&lt;br&gt;received this e-mail, and return the original to us. Any use,
&lt;br&gt;forwarding, printing or copying of this message is strictly prohibited.
&lt;br&gt;No part of this message can be considered a request for goods or
&lt;br&gt;services.
&lt;br&gt;=======================================================================
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26646436.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26644429</id>
	<title>Re: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-04T07:31:38Z</published>
	<updated>2009-12-04T07:31:38Z</updated>
	<author>
		<name>cllow2020-2</name>
	</author>
	<content type="html">thanks jinx,
&lt;br&gt;you lightup my mind, below my optimize sample coding after modified, looks
&lt;br&gt;better now, and i like the idea of 'moving averages' but difficult to added
&lt;br&gt;in.,
&lt;br&gt;&lt;br&gt;8 analog split in 2 groups,
&lt;br&gt;Group_A : ext_vref=2.5v, 2.441mV/step, measure range 0~2.5v..
&lt;br&gt;Group_B : ext_vref=2.5v, (2.441mV*16)/step, measure range up to 40v
&lt;br&gt;@ 39.056mv / step , use devided resister 150k//10k..
&lt;br&gt;&lt;br&gt;for i=1 to 10
&lt;br&gt;&amp;nbsp; raw_value=adc_read(an0) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//: sub call, multiplx and select
&lt;br&gt;an0, read value put in raw_value
&lt;br&gt;&amp;nbsp; an0_value=an0_value+raw_value
&lt;br&gt;&amp;nbsp; raw_value=adc_read(an1)
&lt;br&gt;&amp;nbsp; an1_value=an1_value+raw_value
&lt;br&gt;&amp;nbsp; &amp;nbsp;raw_value=adc_read(an2)
&lt;br&gt;&amp;nbsp; an2_value=an2_value+raw_value
&lt;br&gt;&amp;nbsp; &amp;nbsp;raw_value=adc_read(an3)
&lt;br&gt;&amp;nbsp; an3_value=an3_value+raw_value
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;raw_value=adc_read(an4)
&lt;br&gt;&amp;nbsp; an4_value=an4_value+raw_value
&lt;br&gt;&amp;nbsp; &amp;nbsp;raw_value=adc_read(an5)
&lt;br&gt;&amp;nbsp; an5_value=an5_value+raw_value
&lt;br&gt;&amp;nbsp; &amp;nbsp;raw_value=adc_read(an6)
&lt;br&gt;&amp;nbsp; an6_value=an6_value+raw_value
&lt;br&gt;&amp;nbsp; &amp;nbsp;raw_value=adc_read(an7)
&lt;br&gt;&amp;nbsp; an7_value=an7_value+raw_value
&lt;br&gt;next i
&lt;br&gt;&lt;br&gt;an0_value=(an0_value/10)*2441 / 1000 &amp;nbsp; //: get back reading in mv range
&lt;br&gt;an1_value=(an1_value/10)*2441 / 1000
&lt;br&gt;an2_value=(an2_value/10)*2441 / 1000
&lt;br&gt;an3_value=(an3_value/10)*2441 / 1000
&lt;br&gt;&lt;br&gt;an4_value=(an4_value/10)*2441 / 1000 *16 &amp;nbsp; &amp;nbsp;//: get back reading in mv range
&lt;br&gt;and 16x
&lt;br&gt;an5_value=(an5_value/10)*2441 / 1000 *16
&lt;br&gt;an6_value=(an6_value/10)*2441 / 1000 *16
&lt;br&gt;an7_value=(an7_value/10)*2441 / 1000 *16
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26644429.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26643043</id>
	<title>Re: de facto standard for intel hex files produced by MPLAB?</title>
	<published>2009-12-04T06:00:29Z</published>
	<updated>2009-12-04T06:00:29Z</updated>
	<author>
		<name>Mauricio Giovagnini</name>
	</author>
	<content type="html">Peter escribió:
&lt;br&gt;&amp;gt; Is the default setting for MPLAB hex output INHX32 ? which is INHX8M with an
&lt;br&gt;&amp;gt; opcode 04 record to select INHX32 ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; thanks,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; Peter
&lt;br&gt;&lt;br&gt;&lt;br&gt;Peter, the default output of the LINKER (MPLINK) is INHX32, 
&lt;br&gt;if you wish to use another one you have to specify it (via 
&lt;br&gt;command line. ex using the parameter /aINHX8S or via the 
&lt;br&gt;MPLAB IDE in your project settings, under the LINKER tabsheet).
&lt;br&gt;&lt;br&gt;About the opcode 04, I don't undestand the question, can you 
&lt;br&gt;repost it?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;------------------------------
&lt;br&gt;Mauricio Giovagnini (Maunix)
&lt;br&gt;www.maunix.com.ar
&lt;br&gt;Cordoba, Arg.
&lt;br&gt;LinkedIn Profile: &lt;a href=&quot;http://www.linkedin.com/in/mgiovagnini&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.linkedin.com/in/mgiovagnini&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/de-facto-standard-for-intel-hex-files-produced-by-MPLAB--tp26465096p26643043.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26641939</id>
	<title>Re: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-04T04:26:49Z</published>
	<updated>2009-12-04T04:26:49Z</updated>
	<author>
		<name>Gerhard Fiedler</name>
	</author>
	<content type="html">Tamas Rudnai wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; FORTH! The answer is always FORTH.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; How fast is Forth on PIC? Forth was designed onto a stack based
&lt;br&gt;&amp;gt; machine, was not it? And PIC (mid-range) need to emulate a stack
&lt;br&gt;&amp;gt; using indirect addressing, so I thought it might not be very fast but
&lt;br&gt;&amp;gt; I might wrong? Or maybe not slower than any other interpreter?
&lt;br&gt;&lt;br&gt;I don't think that it's any slower than what a BASIC or Pascal p-code
&lt;br&gt;(or any other) interpreter would do. They all have to have some
&lt;br&gt;structured means of indirectly addressing variables and function
&lt;br&gt;arguments; on a more &amp;quot;common&amp;quot; architecture, that's naturally the machine
&lt;br&gt;stack, but on a PIC that would be something else -- but still the same
&lt;br&gt;mechanism, whether you call it an emulated stack or something else.
&lt;br&gt;&lt;br&gt;Gerhard
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26641939.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26639332</id>
	<title>Re: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-04T00:35:09Z</published>
	<updated>2009-12-04T00:35:09Z</updated>
	<author>
		<name>Jinx-4</name>
	</author>
	<content type="html">&amp;gt; it seem like 10 times of avg reading loop of each analog input,
&lt;br&gt;&amp;gt; taking up 30% total flash memory in 4Kword
&lt;br&gt;&lt;br&gt;That seems an awful lot of memory for what seems a simple function
&lt;br&gt;&lt;br&gt;&amp;gt; is there a way for optimize adc avg reading method ?
&lt;br&gt;&lt;br&gt;If by 'average' you mean arithmetic mean, then add the 10 samples
&lt;br&gt;to a 16-bit accumulator and divide by 10. Or to simplify, take 8
&lt;br&gt;and right-shift 3 times, or take 16 and right-shift 4 times. There are
&lt;br&gt;also 'moving averages', where you'd re-calculate the mean after
&lt;br&gt;discarding sample1 from the queue/array and adding the latest
&lt;br&gt;&lt;br&gt;Finding a mode might take a little more work, but you can narrow
&lt;br&gt;the range to limit the number of each number and its frequency
&lt;br&gt;&lt;br&gt;Similarly, other methods exist when looking for other &amp;quot;expected&amp;quot;
&lt;br&gt;values
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Arithmetic_mean&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://en.wikipedia.org/wiki/Arithmetic_mean&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26639332.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26639085</id>
	<title>Re: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-03T23:59:43Z</published>
	<updated>2009-12-03T23:59:43Z</updated>
	<author>
		<name>cllow2020-2</name>
	</author>
	<content type="html">facing flash memory shortage is PIC16F688, intend to increase some function
&lt;br&gt;but i try not too many re-engineering on PCB hardware to suit for it, b'cos
&lt;br&gt;there will be PCB cost. it seem like the only way is to optimize the
&lt;br&gt;&amp;quot;codes&amp;quot;.
&lt;br&gt;&lt;br&gt;i use 1 internal ADC at AN0, mutiplx-ed externally(using CD4051) get 8
&lt;br&gt;analog inputs, &amp;nbsp;it seem like 10 times of avg reading loop of each analog
&lt;br&gt;input, taking up 30% total flash memory in 4Kword, is there a way for
&lt;br&gt;optimize adc avg reading method ?
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26639085.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26637260</id>
	<title>Re: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-03T19:02:07Z</published>
	<updated>2009-12-03T19:02:07Z</updated>
	<author>
		<name>Tamas Rudnai</name>
	</author>
	<content type="html">On Thu, Dec 3, 2009 at 11:23 PM, Marcel Birthelmer
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26637260&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;marcelb.lists@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;  So... what to interpret? Tokenized Basic? Pascal p-code? Java?
&lt;br&gt;&amp;gt;&amp;gt; ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; FORTH! The answer is always FORTH.
&lt;br&gt;&lt;br&gt;How fast is Forth on PIC? Forth was designed onto a stack based
&lt;br&gt;machine, was not it? And PIC (mid-range) need to emulate a stack using
&lt;br&gt;indirect addressing, so I thought it might not be very fast but I
&lt;br&gt;might wrong? Or maybe not slower than any other interpreter?
&lt;br&gt;&lt;br&gt;BTW: BasicStamp is doing this Basic interpreter thingy on , never
&lt;br&gt;tried that though:
&lt;br&gt;&lt;a href=&quot;http://www.parallax.com/tabid/295/Default.aspx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.parallax.com/tabid/295/Default.aspx&lt;/a&gt;&lt;br&gt;&lt;br&gt;And PICBASIC seems to be very similar to that but on the 'real' PIC:
&lt;br&gt;&lt;a href=&quot;http://www.comfile.co.kr/english2/study/pbmanualf.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.comfile.co.kr/english2/study/pbmanualf.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Tamas
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;&amp;gt; View/change your membership options at
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;/* www.mcuhobby.com */ int main() { char *a,*s,*q; printf(s=&amp;quot;/*
&lt;br&gt;www.mcuhobby.com */ int main() { char *a,*s,*q; printf(s=%s%s%s,
&lt;br&gt;q=%s%s%s%s,s,q,q,a=%s%s%s%s,q,q,q,a,a,q); }&amp;quot;,
&lt;br&gt;q=&amp;quot;\&amp;quot;&amp;quot;,s,q,q,a=&amp;quot;\\&amp;quot;,q,q,q,a,a,q); }
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26637260.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26636828</id>
	<title>Re: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-03T18:21:00Z</published>
	<updated>2009-12-03T18:21:00Z</updated>
	<author>
		<name>Harold Hallikainen-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; &amp;nbsp;So... what to interpret? Tokenized Basic? Pascal p-code? Java?
&lt;br&gt;&amp;gt;&amp;gt; ...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; FORTH! The answer is always FORTH.
&lt;br&gt;&lt;br&gt;&lt;br&gt;I was thinking that, but forgot to include it in the list! I used to have
&lt;br&gt;an MC6800 STD bus card with FORTH on it. I even went to a one day class
&lt;br&gt;put on by Forth Inc.
&lt;br&gt;&lt;br&gt;Harold
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;FCC Rules Updated Daily at &lt;a href=&quot;http://www.hallikainen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.hallikainen.com&lt;/a&gt;&amp;nbsp;- Advertising
&lt;br&gt;opportunities available!
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26636828.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26635115</id>
	<title>Re: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-03T15:23:20Z</published>
	<updated>2009-12-03T15:23:20Z</updated>
	<author>
		<name>Marcel Birthelmer-2</name>
	</author>
	<content type="html">&amp;nbsp;So... what to interpret? Tokenized Basic? Pascal p-code? Java?
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&lt;br&gt;FORTH! The answer is always FORTH.
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26635115.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26635027</id>
	<title>Re: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-03T15:20:33Z</published>
	<updated>2009-12-03T15:20:33Z</updated>
	<author>
		<name>Harold Hallikainen-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt;&amp;gt; Another option is to have the code inside the PIC as an interpreter,
&lt;br&gt;&amp;gt;&amp;gt; and put the tokens that get interpreted in external EEPROM
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I believe that's how the PIC-AXE works, using internal EEPROM,
&lt;br&gt;&amp;gt; so programs are/were quite short
&lt;br&gt;&lt;br&gt;I had not thought of the internal interpreter, external program idea, but
&lt;br&gt;that's a good idea for large programs. If each instruction read in from
&lt;br&gt;outside resulted in a lot of internal code being run, it could be pretty
&lt;br&gt;fast too. So... what to interpret? Tokenized Basic? Pascal p-code? Java?
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;Harold
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;FCC Rules Updated Daily at &lt;a href=&quot;http://www.hallikainen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.hallikainen.com&lt;/a&gt;&amp;nbsp;- Advertising
&lt;br&gt;opportunities available!
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26635027.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26634629</id>
	<title>Re: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-03T14:36:06Z</published>
	<updated>2009-12-03T14:36:06Z</updated>
	<author>
		<name>Jinx-4</name>
	</author>
	<content type="html">&amp;gt; Another option is to have the code inside the PIC as an interpreter,
&lt;br&gt;&amp;gt; and put the tokens that get interpreted in external EEPROM
&lt;br&gt;&lt;br&gt;I believe that's how the PIC-AXE works, using internal EEPROM,
&lt;br&gt;so programs are/were quite short
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26634629.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26633007</id>
	<title>Re: Problem on LCD (SPLC780D controller) + 18F4525 PIC + MPLAB</title>
	<published>2009-12-03T12:52:30Z</published>
	<updated>2009-12-03T12:52:30Z</updated>
	<author>
		<name>raulg1</name>
	</author>
	<content type="html">Hey do you have any sample code for the A/D converter?? Im new at this and I am having trouble with the understanding how to code the A/D converter. Thanks.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;lionkid wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi all!
&lt;br&gt;&lt;br&gt;Well, i'm new in PIC but i've already tested differents PIC functions as : the ADC, the LED blinking and so on...
&lt;br&gt;&lt;br&gt;So, i've got an LCD which is based on the SPLC780D controller (you can find the datasheet here : &lt;a href=&quot;http://www.hebeiltd.com.cn/lcm.datasheet/SPLC780D_DS.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.hebeiltd.com.cn/lcm.datasheet/SPLC780D_DS.pdf&lt;/a&gt;)
&lt;br&gt;i've tried a lot of things in order to display caracters but nothing seems to be displayed...More over, i've spent approximately 2 weeks in order to make this stuff working, but no results... :(
&lt;br&gt;&lt;br&gt;So, what i have and what i've done is here...
&lt;br&gt;&lt;br&gt;1° I've got a Schaer+ programmer that i've done and which works very well, so the problem doesn't come from this one...
&lt;br&gt;&lt;br&gt;2° I send the program (the .hex file) into the PIC thanks to the Winpic software.
&lt;br&gt;&lt;br&gt;3° I use MPLAB (V 8.00.000) + C18 to compile the source files which are given in the src and the h folder for obtaining this &amp;quot;famous&amp;quot; .hex file..
&lt;br&gt;&lt;br&gt;4° I use a 18F4525 Microchip PIC with the following connexions :
&lt;br&gt;&lt;br&gt;The control bits :
&lt;br&gt;&lt;br&gt;=&amp;gt; RA0 : R/W pin.
&lt;br&gt;&lt;br&gt;=&amp;gt; RA1 : RS pin.
&lt;br&gt;&lt;br&gt;=&amp;gt; RA2 : E pin.
&lt;br&gt;&lt;br&gt;=&amp;gt; OSC1 &amp; OSC2 : a 20Mhz crystal resonator with 2* 15pF capacitors ( as mentionned by the 18F4525 datasheet )
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;Data bits :
&lt;br&gt;&lt;br&gt;=&amp;gt; RB7 : D7
&lt;br&gt;&lt;br&gt;=&amp;gt; RB6 : D6
&lt;br&gt;&lt;br&gt;=&amp;gt; RB5 : D5
&lt;br&gt;&lt;br&gt;=&amp;gt; RB4 : D4
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;PIC alimentation :
&lt;br&gt;&lt;br&gt;Vdd = +5V (given by a 78M05)
&lt;br&gt;Vss = 0V = GND.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;All the previous tests with differents functions were OK (ADC and LED blinking), so may the problem come from my personal C code ?
&lt;br&gt;&lt;br&gt;Here is the main :
&lt;br&gt;&lt;br&gt;[code]
&lt;br&gt;&lt;br&gt;/********* USE OF THE MPLAB libraries ************/
&lt;br&gt;&lt;br&gt;#include &amp;quot;p18f4525.h&amp;quot;
&lt;br&gt;#include &amp;quot;delays.h&amp;quot;
&lt;br&gt;#include &amp;quot;xlcd.h&amp;quot;
&lt;br&gt;&lt;br&gt;/*************************************************/
&lt;br&gt;&lt;br&gt;/**************** Configuration bits *************/
&lt;br&gt;&lt;br&gt;#pragma config OSC = HS &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 20Mhz.
&lt;br&gt;#pragma config FCMEN = OFF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Fail Safe Clock Monitor : Disabled.
&lt;br&gt;#pragma config IESO = OFF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Internal External Osc. Switch Over : Disabled.
&lt;br&gt;#pragma config PWRT = OFF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Power Up Timer : Disabled.
&lt;br&gt;#pragma config BOREN = OFF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Brown Out Reset : Disabled.
&lt;br&gt;#pragma config WDT = OFF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Watch Dog Timer : Disabled.
&lt;br&gt;#pragma config MCLRE = OFF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// MCLRE : Disabled.
&lt;br&gt;#pragma config PBADEN = OFF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Port B A/D Enable : Disabled. =&amp;gt; sortie numérique sur RESET.
&lt;br&gt;#pragma config STVREN = OFF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Stack oVerflow Reset : Disabled.
&lt;br&gt;#pragma config LVP = OFF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Low voltage ICSP : Disabled.
&lt;br&gt;&lt;br&gt;&lt;br&gt;/**************************************************/
&lt;br&gt;&lt;br&gt;&lt;br&gt;/***************** MAIN FUNCTION ******************/
&lt;br&gt;&lt;br&gt;void main(void)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; /****************** Config des broches reliées au LCD *******/
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; TRISB = 0x00; &amp;nbsp; &amp;nbsp;// All the port B is made as an output. (can put 0x0F but 0x00 should be OK)
&lt;br&gt;&amp;nbsp; &amp;nbsp; TRIS_RW = 0; &amp;nbsp; &amp;nbsp;// Read/Write is made as an output.
&lt;br&gt;&amp;nbsp; &amp;nbsp; TRIS_RS = 0; &amp;nbsp; &amp;nbsp;// Register Select is made as an output.
&lt;br&gt;&amp;nbsp; &amp;nbsp; TRIS_E = 0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Enable is made as an Output.
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; /************************************************************/
&lt;br&gt;&amp;nbsp; &amp;nbsp;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; OpenXLCD(FOUR_BIT &amp; LINES_5X7);
&lt;br&gt;&amp;nbsp; &amp;nbsp; while(BusyXLCD());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; putrsXLCD(&amp;quot;Test&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; while(1);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;/************ END OF MAIN FUNCTION ********************/
&lt;br&gt;&lt;br&gt;/************** DELAYS NECESSARY USED BY THE MPLAB LIBRARIES ************/
&lt;br&gt;&lt;br&gt;void DelayXLCD(void) // Delay of 5ms
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; Delay1KTCYx(25);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;void DelayPORXLCD(void) &amp;nbsp; &amp;nbsp;// Delay of 18ms
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; Delay1KTCYx(90);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;void DelayFor18TCY(void) // Delay of 3.6µs
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; Nop();Nop();
&lt;br&gt;&amp;nbsp; &amp;nbsp; Nop();Nop();
&lt;br&gt;&amp;nbsp; &amp;nbsp; Nop();Nop();
&lt;br&gt;&amp;nbsp; &amp;nbsp; Nop();Nop();
&lt;br&gt;&amp;nbsp; &amp;nbsp; Nop();Nop();
&lt;br&gt;&amp;nbsp; &amp;nbsp; Nop();Nop();
&lt;br&gt;&amp;nbsp; &amp;nbsp; Nop();Nop(); &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; Nop();Nop();
&lt;br&gt;&amp;nbsp; &amp;nbsp; Nop();Nop(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;/**************************************************************************/
&lt;br&gt;[/code]
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is the xlcd.h :
&lt;br&gt;&lt;br&gt;[code]
&lt;br&gt;&lt;br&gt;#ifndef __XLCD_H
&lt;br&gt;#define __XLCD_H
&lt;br&gt;&lt;br&gt;/* PIC18 XLCD peripheral routines.
&lt;br&gt;&amp;nbsp;*
&lt;br&gt;&amp;nbsp;* &amp;nbsp; Notes:
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp;- These libraries routines are written to support the
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Hitachi HD44780 LCD controller.
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp;- The user must define the following items:
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- The LCD interface type (4- or 8-bits)
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- If 4-bit mode
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- whether using the upper or lower nibble
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- The data port
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- The tris register for data port
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- The control signal ports and pins
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- The control signal port tris and pins
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- The user must provide three delay routines:
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- DelayFor18TCY() provides a 18 Tcy delay
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- DelayPORXLCD() provides at least 15ms delay
&lt;br&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- DelayXLCD() provides at least 5ms delay
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;&lt;br&gt;/* Interface type 8-bit or 4-bit
&lt;br&gt;&amp;nbsp;* For 8-bit operation uncomment the #define BIT8
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;/* #define BIT8 */
&lt;br&gt;&lt;br&gt;/* When in 4-bit interface define if the data is in the upper
&lt;br&gt;&amp;nbsp;* or lower nibble. &amp;nbsp;For lower nibble, comment the #define UPPER
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;&amp;nbsp;#define UPPER
&lt;br&gt;&lt;br&gt;/* DATA_PORT defines the port to which the LCD data lines are connected */
&lt;br&gt;#define DATA_PORT &amp;nbsp; &amp;nbsp; &amp;nbsp;PORTB
&lt;br&gt;#define TRIS_DATA_PORT TRISB
&lt;br&gt;&lt;br&gt;/* CTRL_PORT defines the port where the control lines are connected.
&lt;br&gt;&amp;nbsp;* These are just samples, change to match your application.
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;#define RW_PIN &amp;nbsp; LATAbits.LATA0 &amp;nbsp; /* PORT for RW */
&lt;br&gt;#define TRIS_RW &amp;nbsp;DDRAbits.RA0 &amp;nbsp; &amp;nbsp;/* TRIS for RW */
&lt;br&gt;&lt;br&gt;#define RS_PIN &amp;nbsp; LATAbits.LATA1 &amp;nbsp; /* PORT for RS */
&lt;br&gt;#define TRIS_RS &amp;nbsp;DDRAbits.RA1 &amp;nbsp; &amp;nbsp;/* TRIS for RS */
&lt;br&gt;&lt;br&gt;#define E_PIN &amp;nbsp; &amp;nbsp;LATAbits.LATA2 &amp;nbsp; /* PORT for D &amp;nbsp;*/
&lt;br&gt;#define TRIS_E &amp;nbsp; DDRAbits.RA2 &amp;nbsp; &amp;nbsp;/* TRIS for E &amp;nbsp;*/
&lt;br&gt;&lt;br&gt;/* Display ON/OFF Control defines */
&lt;br&gt;#define DON &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0b00001111 &amp;nbsp;/* Display on &amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;#define DOFF &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0b00001011 &amp;nbsp;/* Display off &amp;nbsp; &amp;nbsp; */
&lt;br&gt;#define CURSOR_ON &amp;nbsp; 0b00001111 &amp;nbsp;/* Cursor on &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;#define CURSOR_OFF &amp;nbsp;0b00001101 &amp;nbsp;/* Cursor off &amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;#define BLINK_ON &amp;nbsp; &amp;nbsp;0b00001111 &amp;nbsp;/* Cursor Blink &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;#define BLINK_OFF &amp;nbsp; 0b00001110 &amp;nbsp;/* Cursor No Blink */
&lt;br&gt;&lt;br&gt;/* Cursor or Display Shift defines */
&lt;br&gt;#define SHIFT_CUR_LEFT &amp;nbsp; &amp;nbsp;0b00010011 &amp;nbsp;/* Cursor shifts to the left &amp;nbsp; */
&lt;br&gt;#define SHIFT_CUR_RIGHT &amp;nbsp; 0b00010111 &amp;nbsp;/* Cursor shifts to the right &amp;nbsp;*/
&lt;br&gt;#define SHIFT_DISP_LEFT &amp;nbsp; 0b00011011 &amp;nbsp;/* Display shifts to the left &amp;nbsp;*/
&lt;br&gt;#define SHIFT_DISP_RIGHT &amp;nbsp;0b00011111 &amp;nbsp;/* Display shifts to the right */
&lt;br&gt;&lt;br&gt;/* Function Set defines */
&lt;br&gt;#define FOUR_BIT &amp;nbsp; 0b00101111 &amp;nbsp;/* 4-bit Interface &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;#define EIGHT_BIT &amp;nbsp;0b00111111 &amp;nbsp;/* 8-bit Interface &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;#define LINE_5X7 &amp;nbsp; 0b00110011 &amp;nbsp;/* 5x7 characters, single line &amp;nbsp; */
&lt;br&gt;#define LINE_5X10 &amp;nbsp;0b00110111 &amp;nbsp;/* 5x10 characters &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&lt;br&gt;#define LINES_5X7 &amp;nbsp;0b00111011 &amp;nbsp;/* 5x7 characters, multiple line */
&lt;br&gt;&lt;br&gt;#define PARAM_SCLASS auto
&lt;br&gt;#define MEM_MODEL far &amp;nbsp;/* Change this to near for small memory model */
&lt;br&gt;&lt;br&gt;/* OpenXLCD
&lt;br&gt;&amp;nbsp;* Configures I/O pins for external LCD
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;void OpenXLCD(PARAM_SCLASS unsigned char);
&lt;br&gt;&lt;br&gt;/* SetCGRamAddr
&lt;br&gt;&amp;nbsp;* Sets the character generator address
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;void SetCGRamAddr(PARAM_SCLASS unsigned char);
&lt;br&gt;&lt;br&gt;/* SetDDRamAddr
&lt;br&gt;&amp;nbsp;* Sets the display data address
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;void SetDDRamAddr(PARAM_SCLASS unsigned char);
&lt;br&gt;&lt;br&gt;/* BusyXLCD
&lt;br&gt;&amp;nbsp;* Returns the busy status of the LCD
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;unsigned char BusyXLCD(void);
&lt;br&gt;&lt;br&gt;/* ReadAddrXLCD
&lt;br&gt;&amp;nbsp;* Reads the current address
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;unsigned char ReadAddrXLCD(void);
&lt;br&gt;&lt;br&gt;/* ReadDataXLCD
&lt;br&gt;&amp;nbsp;* Reads a byte of data
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;char ReadDataXLCD(void);
&lt;br&gt;&lt;br&gt;/* WriteCmdXLCD
&lt;br&gt;&amp;nbsp;* Writes a command to the LCD
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;void WriteCmdXLCD(PARAM_SCLASS unsigned char);
&lt;br&gt;&lt;br&gt;/* WriteDataXLCD
&lt;br&gt;&amp;nbsp;* Writes a data byte to the LCD
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;void WriteDataXLCD(PARAM_SCLASS char);
&lt;br&gt;&lt;br&gt;/* putcXLCD
&lt;br&gt;&amp;nbsp;* A putc is a write
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;#define putcXLCD WriteDataXLCD
&lt;br&gt;&lt;br&gt;/* putsXLCD
&lt;br&gt;&amp;nbsp;* Writes a string of characters to the LCD
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;void putsXLCD(PARAM_SCLASS char *);
&lt;br&gt;&lt;br&gt;/* putrsXLCD
&lt;br&gt;&amp;nbsp;* Writes a string of characters in ROM to the LCD
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;void putrsXLCD(PARAM_SCLASS const /*MEM_MODEL*/ rom char *);
&lt;br&gt;&lt;br&gt;/* User defines these routines according to the oscillator frequency */
&lt;br&gt;extern void DelayFor18TCY(void);
&lt;br&gt;extern void DelayPORXLCD(void);
&lt;br&gt;extern void DelayXLCD(void);
&lt;br&gt;&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;[/code]
&lt;br&gt;&lt;br&gt;Here is the OpenXLCD.c code if necessary... :
&lt;br&gt;&lt;br&gt;[code]
&lt;br&gt;&lt;br&gt;#include &amp;lt;p18cxxx.h&amp;gt;
&lt;br&gt;#include &amp;lt;xlcd.h&amp;gt;
&lt;br&gt;&lt;br&gt;/********************************************************************
&lt;br&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; Function Name: &amp;nbsp;OpenXLCD &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*
&lt;br&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; Return Value: &amp;nbsp; void &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*
&lt;br&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; Parameters: &amp;nbsp; &amp;nbsp; lcdtype: sets the type of LCD (lines) &amp;nbsp; &amp;nbsp; &amp;nbsp; *
&lt;br&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; Description: &amp;nbsp; &amp;nbsp;This routine configures the LCD. Based on &amp;nbsp; *
&lt;br&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; the Hitachi HD44780 LCD controller. The &amp;nbsp; &amp;nbsp; *
&lt;br&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; routine will configure the I/O pins of the &amp;nbsp;*
&lt;br&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; microcontroller, setup the LCD for 4- or &amp;nbsp; &amp;nbsp;*
&lt;br&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8-bit mode and clear the display. The user &amp;nbsp;*
&lt;br&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; must provide three delay routines: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;*
&lt;br&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DelayFor18TCY() provides a 18 Tcy delay &amp;nbsp; &amp;nbsp; *
&lt;br&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DelayPORXLCD() provides at least 15ms delay *
&lt;br&gt;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DelayXLCD() provides at least 5ms delay &amp;nbsp; &amp;nbsp; *
&lt;br&gt;********************************************************************/
&lt;br&gt;void OpenXLCD(unsigned char lcdtype)
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // The data bits must be either a 8-bit port or the upper or
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // lower 4-bits of a port. These pins are made into inputs
&lt;br&gt;#ifdef BIT8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 8-bit mode, use whole port
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT = 0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRIS_DATA_PORT = 0xff;
&lt;br&gt;#else &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 4-bit mode
&lt;br&gt;#ifdef UPPER &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Upper 4-bits of the port
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT &amp;= 0x0f;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRIS_DATA_PORT |= 0xf0;
&lt;br&gt;#else &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Lower 4-bits of the port
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT &amp;= 0xf0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRIS_DATA_PORT |= 0x0f;
&lt;br&gt;#endif
&lt;br&gt;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRIS_RW = 0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// All control signals made outputs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRIS_RS = 0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRIS_E = 0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RW_PIN = 0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // R/W pin made low
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RS_PIN = 0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Register select pin made low
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; E_PIN = 0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Clock pin made low
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Delay for 15ms to allow for LCD Power on reset
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DelayPORXLCD();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Setup interface to LCD
&lt;br&gt;#ifdef BIT8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 8-bit mode interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRIS_DATA_PORT = 0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Data port output
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT = 0b00110000; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Function set cmd(8-bit interface)
&lt;br&gt;#else &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 4-bit mode interface
&lt;br&gt;#ifdef UPPER &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Upper nibble interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRIS_DATA_PORT &amp;= 0x0f;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT &amp;= 0x0f;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT |= 0b00100000; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Function set cmd(4-bit interface)
&lt;br&gt;#else &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Lower nibble interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRIS_DATA_PORT &amp;= 0xf0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT &amp;= 0xf0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT |= 0b00000010; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Function set cmd(4-bit interface)
&lt;br&gt;#endif
&lt;br&gt;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; E_PIN = 1; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Clock the cmd in
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DelayFor18TCY();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; E_PIN = 0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Delay for at least 4.1ms
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DelayXLCD();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Setup interface to LCD
&lt;br&gt;#ifdef BIT8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 8-bit interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT = 0b00110000; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Function set cmd(8-bit interface)
&lt;br&gt;#else &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 4-bit interface
&lt;br&gt;#ifdef UPPER &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Upper nibble interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT &amp;= 0x0f; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Function set cmd(4-bit interface)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT |= 0b00100000;
&lt;br&gt;#else &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Lower nibble interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT &amp;= 0xf0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Function set cmd(4-bit interface)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT |= 0b00000010;
&lt;br&gt;#endif
&lt;br&gt;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; E_PIN = 1; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Clock the cmd in
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DelayFor18TCY();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; E_PIN = 0;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Delay for at least 100us
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DelayXLCD();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Setup interface to LCD
&lt;br&gt;#ifdef BIT8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 8-bit interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT = 0b00110000; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Function set cmd(8-bit interface)
&lt;br&gt;#else &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 4-bit interface
&lt;br&gt;#ifdef UPPER &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Upper nibble interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT &amp;= 0x0f; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Function set cmd(4-bit interface)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT |= 0b00100000;
&lt;br&gt;#else &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Lower nibble interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT &amp;= 0xf0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Function set cmd(4-bit interface)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATA_PORT |= 0b00000010;
&lt;br&gt;#endif
&lt;br&gt;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; E_PIN = 1; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Clock cmd in
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DelayFor18TCY();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; E_PIN = 0;
&lt;br&gt;&lt;br&gt;#ifdef BIT8 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 8-bit interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRIS_DATA_PORT = 0xff; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Make data port input
&lt;br&gt;#else &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 4-bit interface
&lt;br&gt;#ifdef UPPER &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Upper nibble interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRIS_DATA_PORT |= 0xf0; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Make data nibble input
&lt;br&gt;#else &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Lower nibble interface
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TRIS_DATA_PORT |= 0x0f; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Make data nibble input
&lt;br&gt;#endif
&lt;br&gt;#endif
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Set data interface width, # lines, font
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(BusyXLCD()); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Wait if LCD busy
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WriteCmdXLCD(lcdtype); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Function set cmd
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Turn the display on then off
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(BusyXLCD()); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Wait if LCD busy
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WriteCmdXLCD(DOFF&amp;CURSOR_OFF&amp;BLINK_OFF); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Display OFF/Blink OFF
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(BusyXLCD()); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Wait if LCD busy
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WriteCmdXLCD(DON&amp;CURSOR_ON&amp;BLINK_ON); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Display ON/Blink ON
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Clear display
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(BusyXLCD()); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Wait if LCD busy
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WriteCmdXLCD(0x01); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Clear display
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Set entry mode inc, no shift
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(BusyXLCD()); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Wait if LCD busy
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WriteCmdXLCD(SHIFT_CUR_LEFT); &amp;nbsp; // Entry Mode
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Set DD Ram address to 0
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(BusyXLCD()); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Wait if LCD busy
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SetDDRamAddr(0); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Set Display data ram address to 0
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;[/code]
&lt;br&gt;&lt;br&gt;I work on a project board for avoiding any soldering operation... @20Mhz (xtal resonator) does it induce any problem?
&lt;br&gt;&lt;br&gt;Thanks to all per advance!
&lt;br&gt;&lt;br&gt;PS : Sorry for my english... I'm french ;)
&lt;br&gt;&lt;br&gt;See ya!
&lt;br&gt;&amp;nbsp;
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Problem-on-LCD-%28SPLC780D-controller%29-%2B-18F4525-PIC-%2B-MPLAB-tp21724656p26633007.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26630659</id>
	<title>Re: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-03T10:04:57Z</published>
	<updated>2009-12-03T10:04:57Z</updated>
	<author>
		<name>Alan B. Pearce-2</name>
	</author>
	<content type="html">&amp;gt; does anyone know how to increase pic flash memory size by using external
&lt;br&gt;&amp;gt; eeprom ? is this possible to have extended flash memory?
&lt;br&gt;&lt;br&gt;There is an 18 series PIC that can use external memory, but then all memory 
&lt;br&gt;is external.
&lt;br&gt;&lt;br&gt;Most people just go and choose the next memory size up chip.
&lt;br&gt;&lt;br&gt;As others have noted, you can put constant data in an external EEPROM, e.g. 
&lt;br&gt;strings for display on an LCD. Another option is to have the code inside the 
&lt;br&gt;PIC as an interpreter, and put the tokens that get interpreted in external 
&lt;br&gt;EEPROM.
&lt;br&gt;&lt;br&gt;You don't say just which chip you are using, or why you think you need more 
&lt;br&gt;memory. 
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26630659.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26630303</id>
	<title>Re: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-03T09:59:59Z</published>
	<updated>2009-12-03T09:59:59Z</updated>
	<author>
		<name>Harold Hallikainen-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; need &amp;nbsp;help,
&lt;br&gt;&amp;gt; does anyone know how to increase pic flash memory size by using external
&lt;br&gt;&amp;gt; eeprom ? is this possible to have extended flash memory?
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;&amp;gt; View/change your membership options at
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Generally, no. You cannot execute code from external memory. You can, of
&lt;br&gt;course, add external RAM, EEPROM, or flash for data.
&lt;br&gt;&lt;br&gt;Harold
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;FCC Rules Updated Daily at &lt;a href=&quot;http://www.hallikainen.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.hallikainen.com&lt;/a&gt;&amp;nbsp;- Advertising
&lt;br&gt;opportunities available!
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26630303.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26629932</id>
	<title>Re: increase pic program flash memory size ? possible ?</title>
	<published>2009-12-03T09:26:27Z</published>
	<updated>2009-12-03T09:26:27Z</updated>
	<author>
		<name>Tamas Rudnai</name>
	</author>
	<content type="html">Not for running program from -- but you can use an external eeprom to
&lt;br&gt;store static data (text or graphics for example), so you can free up
&lt;br&gt;space from the flas which then can be used for storing code instead.
&lt;br&gt;&lt;br&gt;Tamas
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Thu, Dec 3, 2009 at 5:09 PM, cllow2020 &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26629932&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cllow2020@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; need  help,
&lt;br&gt;&amp;gt; does anyone know how to increase pic flash memory size by using external
&lt;br&gt;&amp;gt; eeprom ? is this possible to have extended flash memory?
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;&amp;gt; View/change your membership options at
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;/* www.mcuhobby.com */ int main() { char *a,*s,*q; printf(s=&amp;quot;/*
&lt;br&gt;www.mcuhobby.com */ int main() { char *a,*s,*q; printf(s=%s%s%s,
&lt;br&gt;q=%s%s%s%s,s,q,q,a=%s%s%s%s,q,q,q,a,a,q); }&amp;quot;,
&lt;br&gt;q=&amp;quot;\&amp;quot;&amp;quot;,s,q,q,a=&amp;quot;\\&amp;quot;,q,q,q,a,a,q); }
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26629932.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26629739</id>
	<title>increase pic program flash memory size ? possible ?</title>
	<published>2009-12-03T09:09:35Z</published>
	<updated>2009-12-03T09:09:35Z</updated>
	<author>
		<name>cllow2020-2</name>
	</author>
	<content type="html">need &amp;nbsp;help,
&lt;br&gt;does anyone know how to increase pic flash memory size by using external
&lt;br&gt;eeprom ? is this possible to have extended flash memory?
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/increase-pic-program-flash-memory-size---possible---tp26629739p26629739.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26590039</id>
	<title>Re: PIC 16F1936 -- is this for real?</title>
	<published>2009-12-01T03:02:44Z</published>
	<updated>2009-12-01T03:02:44Z</updated>
	<author>
		<name>John msinstruments</name>
	</author>
	<content type="html">I'm running my PIC18F4420 and PIC18F4520 at 32Mhz...by 8Mhz*4 using PLL
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Sean Breheny wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Yes, although I was slightly wrong: at least for the chip I checked,
&lt;br&gt;the max is 32MHz using the PLL plus the internal osc.
&lt;br&gt;&lt;br&gt;See the datasheet for the 18F8722 family, section 2.6.4
&lt;br&gt;&lt;br&gt;&lt;br&gt;2.6.4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PLL IN INTOSC MODES
&lt;br&gt;The 4x Phase Locked Loop (PLL) can be used with the
&lt;br&gt;internal oscillator block to produce faster device clock
&lt;br&gt;speeds than are normally possible with the internal
&lt;br&gt;oscillator sources. When enabled, the PLL produces a
&lt;br&gt;clock speed of 16 MHz or 32 MHz.
&lt;br&gt;Unlike HSPLL mode, the PLL is controlled through
&lt;br&gt;software. The control bit, PLLEN (OSCTUNE&amp;lt;6&amp;gt;), is
&lt;br&gt;used to enable or disable its operation.
&lt;br&gt;&lt;br&gt;The PLL is available when the device is configured to
&lt;br&gt;use the internal oscillator block as its primary clock
&lt;br&gt;source (FOSC&amp;lt;3:0&amp;gt; = 1001 or 1000). Additionally, the
&lt;br&gt;PLL will only function when the selected output fre-
&lt;br&gt;quency is either 4 MHz or 8 MHz (OSCCON&amp;lt;6:4&amp;gt; = 111
&lt;br&gt;or 110). If both of these conditions are not met, the PLL
&lt;br&gt;is disabled and the PLLEN bit remains clear (writes are
&lt;br&gt;ignored).
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Tue, Sep 8, 2009 at 8:10 PM, Funny NYPD&amp;lt;funnynypd@yahoo.com&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;20 or even 40MHz.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any reference?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;  Funny N.
&lt;br&gt;&amp;gt; Au Group Electronics, &lt;a href=&quot;http://www.AuElectronics.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.AuElectronics.com&lt;/a&gt;&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.AuElectronics.com/products&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.AuElectronics.com/products&lt;/a&gt;&lt;br&gt;&amp;gt; &lt;a href=&quot;http://augroups.blogspot.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://augroups.blogspot.com/&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ________________________________
&lt;br&gt;&amp;gt; From: Sean Breheny &amp;lt;shb7@cornell.edu&amp;gt;
&lt;br&gt;&amp;gt; To: Microcontroller discussion list - Public. &amp;lt;piclist@mit.edu&amp;gt;
&lt;br&gt;&amp;gt; Sent: Tuesday, September 8, 2009 6:27:40 PM
&lt;br&gt;&amp;gt; Subject: Re: [PIC] PIC 16F1936 -- is this for real?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is a bit late, but I wanted to point out that some PICs (in the
&lt;br&gt;&amp;gt; 18 series I think) allow you to run the internal PLL from the RC
&lt;br&gt;&amp;gt; oscillator to multiply the frequency up to 20 or even 40MHz.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sean
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; O
&lt;br&gt;&amp;gt; View/change your membership options at
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;&amp;gt; View/change your membership options at
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/PIC-16F1936----is-this-for-real--tp25105285p26590039.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26577751</id>
	<title>Re: Experimental LCD/USB Solar Design</title>
	<published>2009-11-30T08:28:25Z</published>
	<updated>2009-11-30T08:28:25Z</updated>
	<author>
		<name>M. Adam Davis-2</name>
	</author>
	<content type="html">Driving a simple numeric LCD display is easy from any microcontroller,
&lt;br&gt;with very low power:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.ubasics.com/driving_static_lcds&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ubasics.com/driving_static_lcds&lt;/a&gt;&lt;br&gt;&lt;br&gt;With a two digit display counting from 32 to 0 you need 12 output
&lt;br&gt;lines, and they will need to change state about 30-60 times a second.
&lt;br&gt;Put them on an interrupt, and put the processor to sleep, and it'll
&lt;br&gt;consume less than 1mA for the LCD and timer.
&lt;br&gt;&lt;br&gt;The USB function of the microcontroller can be turned off until you
&lt;br&gt;detect 5V on the USB V+ line.
&lt;br&gt;&lt;br&gt;So the only current you'll need beyond 1mA is the current required to
&lt;br&gt;activate that external signal you mention.
&lt;br&gt;&lt;br&gt;The PIC18F24J50 might be agood candidate. &amp;nbsp;It has more than enough
&lt;br&gt;pins to drive the LCD and talk via USB, it's part of the extra low
&lt;br&gt;power line of microchip's parts, built in real time clock/counter. &amp;nbsp;It
&lt;br&gt;has a high precision internal oscillator to the USB, and a low speed
&lt;br&gt;internal oscillator which you can use for the timer/clock and for low
&lt;br&gt;power LCD driving. &amp;nbsp;And it's relatively inexpensive.
&lt;br&gt;&lt;br&gt;The MAX1555 IC is good for lithium-ion charging. &amp;nbsp;It'll accept
&lt;br&gt;charging from either a USB port or from a 3.7-7V input (solar cell,
&lt;br&gt;for instance) and performs all the work required for safely charging
&lt;br&gt;the cell. &amp;nbsp;You can get it on a breakout board here:
&lt;br&gt;&lt;a href=&quot;http://www.sparkfun.com/commerce/product_info.php?products_id=726&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sparkfun.com/commerce/product_info.php?products_id=726&lt;/a&gt;&lt;br&gt;&lt;br&gt;That may help with hardware selection, but the hardware design and
&lt;br&gt;more difficult software design still lie ahead. &amp;nbsp;If the system is as
&lt;br&gt;simple as you suggest, then using the USB libraries provided by
&lt;br&gt;microchip and just adding your LCD/timer/external output code should
&lt;br&gt;be relatively easy.
&lt;br&gt;&lt;br&gt;On Mon, Nov 30, 2009 at 9:36 AM, patrickdel1982 &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26577751&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;patrick.del@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; •       My objective is to create a battery-operated counter-controller which shuts
&lt;br&gt;&amp;gt; down an external function “X” via an analog signal after one cycle of
&lt;br&gt;&amp;gt; thirty-two (32) days (e.g. 2764800 seconds) unless the counter-controller is
&lt;br&gt;&amp;gt; “unlocked” through a security code is entered through a USB port to renew
&lt;br&gt;&amp;gt; the count.
&lt;br&gt;&amp;gt; •       The unit should be able to display the number of days left in the counting
&lt;br&gt;&amp;gt; cycle on a small LCD, starting from thirty-two (32) days and counting down
&lt;br&gt;&amp;gt; to zero (0).
&lt;br&gt;&amp;gt; •       The external function is run through a PIC16F785, which has an available
&lt;br&gt;&amp;gt; analog input.  There should be a string of five (5) security codes stored on
&lt;br&gt;&amp;gt; the counter-controller memory which repeat every five (5) cycles.
&lt;br&gt;&amp;gt; •       The counter-controller should be as low-power, running as few watts as
&lt;br&gt;&amp;gt; possible.  The system should also work on a 3.0-4.0 volt range (single
&lt;br&gt;&amp;gt; lithium-ion battery).
&lt;br&gt;&amp;gt; •       The default mode for if the battery has low power below 3.0V is, “locked,
&lt;br&gt;&amp;gt; but not counting,” meaning that the external device cannot function but the
&lt;br&gt;&amp;gt; counter-controller stops counting for the time being until the battery is
&lt;br&gt;&amp;gt; charged above 3.0V.
&lt;br&gt;&amp;gt; •       Since the unit is solar powered, the entire counting and controlling
&lt;br&gt;&amp;gt; regime must be super low-power.  There is a switch which a human user will
&lt;br&gt;&amp;gt; push periodically (perhaps 3-20 times per day) to activate and deactivate
&lt;br&gt;&amp;gt; the external function “X,” so a count check, date display and control
&lt;br&gt;&amp;gt; function can be hypothetically performed only at these times.
&lt;br&gt;&amp;gt; •       As a side note, the USB port used to unlock the system should use its
&lt;br&gt;&amp;gt; external 5V power source to charge the battery while unlocking.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; My experience with microcontrollers, counters and IC’s is limited, having a
&lt;br&gt;&amp;gt; fair working knowledge of 8-bit MCUs, perhaps able to debug codes written in
&lt;br&gt;&amp;gt; C format, but not a true designer or troubleshooter.  Overall I am a
&lt;br&gt;&amp;gt; beginner level with microcontrollers, but have a good working knowledge of
&lt;br&gt;&amp;gt; circuit design.  I know how to “flash an LED.”  In fact, I can make an LED
&lt;br&gt;&amp;gt; run on PWM using 16F785.  Can anyone give me a recommendation of where to
&lt;br&gt;&amp;gt; start?  I am interested in PIC microcontrollers, but not strictly limited if
&lt;br&gt;&amp;gt; nothing fits the design parameters above.
&lt;br&gt;&amp;gt; Here is a basic diagram of the functionality of the counter-controller:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/file/p26575712/simple_diagram.jpg&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/file/p26575712/simple_diagram.jpg&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://imgur.com/g2eg1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://imgur.com/g2eg1&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Can anyone offer any help with what PIC families and features I should look
&lt;br&gt;&amp;gt; for?  Is there any PIC which has both LCD and USB capability?  How much
&lt;br&gt;&amp;gt; memory will I need?  How can I find a PIC or incorporate a design that will
&lt;br&gt;&amp;gt; fulfill all of the above requirements?  What approach should I use on this
&lt;br&gt;&amp;gt; design?  Any ideas or tips?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Experimental-LCD-USB-Solar-Design-tp26575712p26575712.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Experimental-LCD-USB-Solar-Design-tp26575712p26575712.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the PIC - [PIC] mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;&amp;gt; View/change your membership options at
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Experimental-LCD-USB-Solar-Design-tp26575712p26577751.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26575712</id>
	<title>Experimental LCD/USB Solar Design</title>
	<published>2009-11-30T06:36:34Z</published>
	<updated>2009-11-30T06:36:34Z</updated>
	<author>
		<name>patrickdel1982</name>
	</author>
	<content type="html">•	My objective is to create a battery-operated counter-controller which shuts down an external function “X” via an analog signal after one cycle of thirty-two (32) days (e.g. 2764800 seconds) unless the counter-controller is “unlocked” through a security code is entered through a USB port to renew the count.
&lt;br&gt;•	The unit should be able to display the number of days left in the counting cycle on a small LCD, starting from thirty-two (32) days and counting down to zero (0). 
&lt;br&gt;•	The external function is run through a PIC16F785, which has an available analog input. &amp;nbsp;There should be a string of five (5) security codes stored on the counter-controller memory which repeat every five (5) cycles. &amp;nbsp;
&lt;br&gt;•	The counter-controller should be as low-power, running as few watts as possible. &amp;nbsp;The system should also work on a 3.0-4.0 volt range (single lithium-ion battery). &amp;nbsp;
&lt;br&gt;•	The default mode for if the battery has low power below 3.0V is, “locked, but not counting,” meaning that the external device cannot function but the counter-controller stops counting for the time being until the battery is charged above 3.0V. &amp;nbsp;
&lt;br&gt;•	Since the unit is solar powered, the entire counting and controlling regime must be super low-power. &amp;nbsp;There is a switch which a human user will push periodically (perhaps 3-20 times per day) to activate and deactivate the external function “X,” so a count check, date display and control function can be hypothetically performed only at these times.
&lt;br&gt;•	As a side note, the USB port used to unlock the system should use its external 5V power source to charge the battery while unlocking.
&lt;br&gt;&lt;br&gt;My experience with microcontrollers, counters and IC’s is limited, having a fair working knowledge of 8-bit MCUs, perhaps able to debug codes written in C format, but not a true designer or troubleshooter. &amp;nbsp;Overall I am a beginner level with microcontrollers, but have a good working knowledge of circuit design. &amp;nbsp;I know how to “flash an LED.” &amp;nbsp;In fact, I can make an LED run on PWM using 16F785. &amp;nbsp;Can anyone give me a recommendation of where to start? &amp;nbsp;I am interested in PIC microcontrollers, but not strictly limited if nothing fits the design parameters above. &amp;nbsp;
&lt;br&gt;Here is a basic diagram of the functionality of the counter-controller:
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;img src=&quot;http://old.nabble.com/file/p26575712/simple_diagram.jpg&quot; border=&quot;0&quot; /&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://imgur.com/g2eg1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://imgur.com/g2eg1&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Can anyone offer any help with what PIC families and features I should look for? &amp;nbsp;Is there any PIC which has both LCD and USB capability? &amp;nbsp;How much memory will I need? &amp;nbsp;How can I find a PIC or incorporate a design that will fulfill all of the above requirements? &amp;nbsp;What approach should I use on this design? &amp;nbsp;Any ideas or tips?
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Experimental-LCD-USB-Solar-Design-tp26575712p26575712.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26564857</id>
	<title>Re: Macro usage</title>
	<published>2009-11-29T10:48:03Z</published>
	<updated>2009-11-29T10:48:03Z</updated>
	<author>
		<name>Josh Koffman</name>
	</author>
	<content type="html">On Sun, Nov 29, 2009 at 6:30 AM, Jan-Erik Soderholm
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26564857&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jan-erik.soderholm@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Since it is a macro (which always is expanded into real code)
&lt;br&gt;&amp;gt; it will work. There will be one BSF instruction for each
&lt;br&gt;&amp;gt; &amp;quot;call&amp;quot; (which isn't a real call, of course) of the macro.
&lt;br&gt;&amp;gt; It would not have worked if the BSF was in e.g. a normal
&lt;br&gt;&amp;gt; subroutine (that is CALL'ed).
&lt;br&gt;&lt;br&gt;Ok, perfect. I thought that was the case. I must admit I totally
&lt;br&gt;forgot about checking the output listing.
&lt;br&gt;&lt;br&gt;Thanks everyone!
&lt;br&gt;&lt;br&gt;Josh
&lt;br&gt;-- 
&lt;br&gt;A common mistake that people make when trying to design something
&lt;br&gt;completely foolproof is to underestimate the ingenuity of complete
&lt;br&gt;fools.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Douglas Adams
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Macro-usage-tp26559293p26564857.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26563158</id>
	<title>Experimental Solar Auto-Shutdown Controller</title>
	<published>2009-11-29T07:53:33Z</published>
	<updated>2009-11-29T07:53:33Z</updated>
	<author>
		<name>patrickdel1982</name>
	</author>
	<content type="html">•	My objective is to create a battery-operated counter-controller which shuts down an external function “X” via an analog signal after one cycle of thirty-two (32) days (e.g. 2764800 seconds) unless the counter-controller is “unlocked” through a security code is entered through a USB port to renew the count.
&lt;br&gt;•	The unit should be able to display the number of days left in the counting cycle on a small LCD, starting from thirty-two (32) days and counting down to zero (0). 
&lt;br&gt;•	The external function is run through a PIC16F785, which has an available analog input. &amp;nbsp;There should be a string of five (5) security codes stored on the counter-controller memory which repeat every five (5) cycles. &amp;nbsp;
&lt;br&gt;•	The counter-controller should be as low-power, running as few watts as possible. &amp;nbsp;The system should also work on a 3.0-4.0 volt range (single lithium-ion battery). &amp;nbsp;
&lt;br&gt;•	The default mode for if the battery has low power below 3.0V is, “locked, but not counting,” meaning that the external device cannot function but the counter-controller stops counting for the time being until the battery is charged above 3.0V. &amp;nbsp;
&lt;br&gt;•	Since the unit is solar powered, the entire counting and controlling regime must be super low-power. &amp;nbsp;There is a switch which a human user will push periodically (perhaps 3-20 times per day) to activate and deactivate the external function “X,” so a count check, date display and control function can be hypothetically performed only at these times.
&lt;br&gt;•	As a side note, the USB port used to unlock the system should use its external 5V power source to charge the battery while unlocking.
&lt;br&gt;&lt;br&gt;My experience with microcontrollers, counters and IC’s is limited, having a fair working knowledge of 8-bit MCUs, perhaps able to debug codes written in C format, but not a true designer or troubleshooter. &amp;nbsp;Overall I am a beginner level with microcontrollers, but have a good working knowledge of circuit design. &amp;nbsp;Can anyone give me a recommendation of where to start? &amp;nbsp;I am interested in PIC microcontrollers, but not strictly limited if nothing fits the design parameters above. &amp;nbsp;
&lt;br&gt;Here is a basic diagram of the functionality of the counter-controller:
&lt;br&gt;&lt;br&gt;&lt;img src=&quot;http://old.nabble.com/file/p26563158/simple_diagram.jpg&quot; border=&quot;0&quot; /&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://imgur.com/g2eg1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://imgur.com/g2eg1&lt;/a&gt;&lt;br&gt;&lt;br&gt;Can anyone offer any help with what PIC families and features I should look for? &amp;nbsp;Are there any PICs which provide counting units? &amp;nbsp;How much memory will I need? &amp;nbsp;How can I find a PIC or incorporate a design that will fulfill all of the above requirements? &amp;nbsp;What approach should I use on this design? &amp;nbsp;Any ideas or tips?
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thank you for your time.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Experimental-Solar-Auto-Shutdown-Controller-tp26563158p26563158.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26561621</id>
	<title>Re: Macro usage</title>
	<published>2009-11-29T04:17:46Z</published>
	<updated>2009-11-29T04:17:46Z</updated>
	<author>
		<name>Tamas Rudnai</name>
	</author>
	<content type="html">On Sun, Nov 29, 2009 at 4:26 AM, Josh Koffman &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26561621&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;joshybear@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; mShiftOut macro _data, _port, _ClockPin, _DataPin, LatchPin
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If I did that, could I then use the following line within the macro?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; bsf     _port,_ClockPin
&lt;br&gt;&lt;br&gt;Yes, you could. For the sake of simplicity you can look in that way:
&lt;br&gt;Macro for the compiler is like a search-and-replace for your text
&lt;br&gt;editor. Every time you mention you macro in your 'real' code the
&lt;br&gt;compiler looks up your macro definition and replaces the code whatever
&lt;br&gt;it finds there.
&lt;br&gt;&lt;br&gt;Tamas
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It seems to assemble, I just don't have my board ready to test it yet.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Josh
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; A common mistake that people make when trying to design something
&lt;br&gt;&amp;gt; completely foolproof is to underestimate the ingenuity of complete
&lt;br&gt;&amp;gt; fools.
&lt;br&gt;&amp;gt;        -Douglas Adams
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;&amp;gt; View/change your membership options at
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;/* www.mcuhobby.com */ int main() { char *a,*s,*q; printf(s=&amp;quot;/*
&lt;br&gt;www.mcuhobby.com */ int main() { char *a,*s,*q; printf(s=%s%s%s,
&lt;br&gt;q=%s%s%s%s,s,q,q,a=%s%s%s%s,q,q,q,a,a,q); }&amp;quot;,
&lt;br&gt;q=&amp;quot;\&amp;quot;&amp;quot;,s,q,q,a=&amp;quot;\\&amp;quot;,q,q,q,a,a,q); }
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Macro-usage-tp26559293p26561621.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26561187</id>
	<title>Re: Macro usage</title>
	<published>2009-11-29T03:30:21Z</published>
	<updated>2009-11-29T03:30:21Z</updated>
	<author>
		<name>Jan-Erik Soderholm</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;Josh Koffman wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi all.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm a bit confused by exactly what MPLAB will let me do with a macro.
&lt;br&gt;&amp;gt; I have a routine that I use for sending data to a shift register. Now
&lt;br&gt;&amp;gt; I want to do two separate shift registers (not chained, different
&lt;br&gt;&amp;gt; pins). So what I'd like to do is define a macro like this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; mShiftOut macro _data, _port, _ClockPin, _DataPin, LatchPin
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If I did that, could I then use the following line within the macro?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; bsf &amp;nbsp; &amp;nbsp; _port,_ClockPin
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It seems to assemble, I just don't have my board ready to test it yet.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Josh
&lt;/div&gt;&lt;br&gt;Since it is a macro (which always is expanded into real code)
&lt;br&gt;it will work. There will be one BSF instruction for each
&lt;br&gt;&amp;quot;call&amp;quot; (which isn't a real call, of course) of the macro.
&lt;br&gt;It would not have worked if the BSF was in e.g. a normal
&lt;br&gt;subroutine (that is CALL'ed).
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Macro-usage-tp26559293p26561187.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26560183</id>
	<title>Re: Macro usage</title>
	<published>2009-11-29T00:39:18Z</published>
	<updated>2009-11-29T00:39:18Z</updated>
	<author>
		<name>Marcel Birthelmer-2</name>
	</author>
	<content type="html">2009/11/29 Ruben Jönsson &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26560183&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ruben@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Why can't you use the MPLAB simulator to test it?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; /Ruben
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Or just look at the listing file to to verify that that's what's happening.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Macro-usage-tp26559293p26560183.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26560096</id>
	<title>Re: Macro usage</title>
	<published>2009-11-29T00:15:31Z</published>
	<updated>2009-11-29T00:15:31Z</updated>
	<author>
		<name>Ruben Jönsson</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Why can't you use the MPLAB simulator to test it?
&lt;br&gt;&lt;br&gt;/Ruben
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi all.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm a bit confused by exactly what MPLAB will let me do with a macro.
&lt;br&gt;&amp;gt; I have a routine that I use for sending data to a shift register. Now
&lt;br&gt;&amp;gt; I want to do two separate shift registers (not chained, different
&lt;br&gt;&amp;gt; pins). So what I'd like to do is define a macro like this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; mShiftOut macro _data, _port, _ClockPin, _DataPin, LatchPin
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If I did that, could I then use the following line within the macro?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; bsf &amp;nbsp; &amp;nbsp; _port,_ClockPin
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; It seems to assemble, I just don't have my board ready to test it yet.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Josh
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; A common mistake that people make when trying to design something
&lt;br&gt;&amp;gt; completely foolproof is to underestimate the ingenuity of complete
&lt;br&gt;&amp;gt; fools.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Douglas Adams
&lt;/div&gt;==============================
&lt;br&gt;Ruben Jönsson
&lt;br&gt;AB Liros Electronic
&lt;br&gt;Box 9124, 200 39 Malmö, Sweden
&lt;br&gt;TEL INT +46 40142078
&lt;br&gt;FAX INT +46 40947388
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26560096&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ruben@...&lt;/a&gt;
&lt;br&gt;==============================
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Macro-usage-tp26559293p26560096.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26559293</id>
	<title>Macro usage</title>
	<published>2009-11-28T20:26:15Z</published>
	<updated>2009-11-28T20:26:15Z</updated>
	<author>
		<name>Josh Koffman</name>
	</author>
	<content type="html">Hi all.
&lt;br&gt;&lt;br&gt;I'm a bit confused by exactly what MPLAB will let me do with a macro.
&lt;br&gt;I have a routine that I use for sending data to a shift register. Now
&lt;br&gt;I want to do two separate shift registers (not chained, different
&lt;br&gt;pins). So what I'd like to do is define a macro like this:
&lt;br&gt;&lt;br&gt;mShiftOut macro _data, _port, _ClockPin, _DataPin, LatchPin
&lt;br&gt;&lt;br&gt;If I did that, could I then use the following line within the macro?
&lt;br&gt;&lt;br&gt;bsf &amp;nbsp; &amp;nbsp; _port,_ClockPin
&lt;br&gt;&lt;br&gt;It seems to assemble, I just don't have my board ready to test it yet.
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Josh
&lt;br&gt;-- 
&lt;br&gt;A common mistake that people make when trying to design something
&lt;br&gt;completely foolproof is to underestimate the ingenuity of complete
&lt;br&gt;fools.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Douglas Adams
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Macro-usage-tp26559293p26559293.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26531998</id>
	<title>Re: Microchip new Tag-Connect for ICD2/3/REAL ICE</title>
	<published>2009-11-26T08:32:38Z</published>
	<updated>2009-11-26T08:32:38Z</updated>
	<author>
		<name>Wouter van Ooijen</name>
	</author>
	<content type="html">&amp;gt; PICkit2 button could have been there too -- so then this
&lt;br&gt;&amp;gt; press-to-program function works with the original pk2 software (no
&lt;br&gt;&amp;gt; beeps though).
&lt;br&gt;&lt;br&gt;I think for a real hands-off-the-PC programming some feedback is 
&lt;br&gt;necessary. The pickit 2 has is LEDs.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;br&gt;Wouter van Ooijen
&lt;br&gt;&lt;br&gt;-- -------------------------------------------
&lt;br&gt;Van Ooijen Technische Informatica: www.voti.nl
&lt;br&gt;consultancy, development, PICmicro products
&lt;br&gt;docent Hogeschool van Utrecht: www.voti.nl/hvu
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Microchip-new-Tag-Connect-for-ICD2-3-REAL-ICE-tp26495832p26531998.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26531445</id>
	<title>Re: Microchip new Tag-Connect for ICD2/3/REAL ICE</title>
	<published>2009-11-26T07:49:55Z</published>
	<updated>2009-11-26T07:49:55Z</updated>
	<author>
		<name>Tamas Rudnai</name>
	</author>
	<content type="html">On Thu, Nov 26, 2009 at 3:41 PM, Wouter van Ooijen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531445&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;wouter@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Your programming pen's neat.  But what's the function of the button?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; mid-volume production. get the PCB, connect, press the button wait for
&lt;br&gt;&amp;gt; readly (beep? signal?), disconnect, repeat.
&lt;br&gt;&lt;br&gt;PICkit2 button could have been there too -- so then this
&lt;br&gt;press-to-program function works with the original pk2 software (no
&lt;br&gt;beeps though).
&lt;br&gt;&lt;br&gt;Tamas
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Wouter van Ooijen
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- -------------------------------------------
&lt;br&gt;&amp;gt; Van Ooijen Technische Informatica: www.voti.nl
&lt;br&gt;&amp;gt; consultancy, development, PICmicro products
&lt;br&gt;&amp;gt; docent Hogeschool van Utrecht: www.voti.nl/hvu
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;&amp;gt; View/change your membership options at
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;/* www.mcuhobby.com */ int main() { char *a,*s,*q; printf(s=&amp;quot;/*
&lt;br&gt;www.mcuhobby.com */ int main() { char *a,*s,*q; printf(s=%s%s%s,
&lt;br&gt;q=%s%s%s%s,s,q,q,a=%s%s%s%s,q,q,q,a,a,q); }&amp;quot;,
&lt;br&gt;q=&amp;quot;\&amp;quot;&amp;quot;,s,q,q,a=&amp;quot;\\&amp;quot;,q,q,q,a,a,q); }
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Microchip-new-Tag-Connect-for-ICD2-3-REAL-ICE-tp26495832p26531445.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26531334</id>
	<title>Re: Microchip new Tag-Connect for ICD2/3/REAL ICE</title>
	<published>2009-11-26T07:41:16Z</published>
	<updated>2009-11-26T07:41:16Z</updated>
	<author>
		<name>Wouter van Ooijen</name>
	</author>
	<content type="html">&amp;gt; Your programming pen's neat. &amp;nbsp;But what's the function of the button?
&lt;br&gt;&lt;br&gt;mid-volume production. get the PCB, connect, press the button wait for 
&lt;br&gt;readly (beep? signal?), disconnect, repeat.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;br&gt;Wouter van Ooijen
&lt;br&gt;&lt;br&gt;-- -------------------------------------------
&lt;br&gt;Van Ooijen Technische Informatica: www.voti.nl
&lt;br&gt;consultancy, development, PICmicro products
&lt;br&gt;docent Hogeschool van Utrecht: www.voti.nl/hvu
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Microchip-new-Tag-Connect-for-ICD2-3-REAL-ICE-tp26495832p26531334.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26530952</id>
	<title>Re: Microchip new Tag-Connect for ICD2/3/REAL ICE</title>
	<published>2009-11-26T07:14:28Z</published>
	<updated>2009-11-26T07:14:28Z</updated>
	<author>
		<name>WH Tan</name>
	</author>
	<content type="html">2009/11/25 Funny NYPD wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; A few URLs are listed below:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;WH Tan
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Microchip-new-Tag-Connect-for-ICD2-3-REAL-ICE-tp26495832p26530952.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26530951</id>
	<title>Re: Microchip new Tag-Connect for ICD2/3/REAL ICE</title>
	<published>2009-11-26T07:13:52Z</published>
	<updated>2009-11-26T07:13:52Z</updated>
	<author>
		<name>WH Tan</name>
	</author>
	<content type="html">2009/11/24 Vicent Colomar Prats &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530951&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;vicentecolomar@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; CCS, Inc. was using it some time ago:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.ccsinfo.com/content.php?page=tagConnect&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ccsinfo.com/content.php?page=tagConnect&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;Hi Vicent,
&lt;br&gt;&lt;br&gt;Those cables look-alike! &amp;nbsp;I wonder if Microchip bought it from CCS...
&lt;br&gt;&lt;br&gt;Thanks for the info.
&lt;br&gt;Best regards,
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;WH Tan
&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.piclist.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.piclist.com&lt;/a&gt;&amp;nbsp;PIC/SX FAQ &amp; list archive
&lt;br&gt;View/change your membership options at
&lt;br&gt;&lt;a href=&quot;http://mailman.mit.edu/mailman/listinfo/piclist&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mailman.mit.edu/mailman/listinfo/piclist&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Microchip-new-Tag-Connect-for-ICD2-3-REAL-ICE-tp26495832p26530951.html" />
</entry>

</feed>
