It seemed to 'build' with no errors ! (Plenty of comments)<br><br>So what next ?  How do I get it to produce a file that I can transfer to the Pic chip ?<br><br>:  ))))<br><br>Tim<br><br><div class="gmail_quote">On 24 June 2013 12:57, Tim Moore <span dir="ltr"><<a href="mailto:timmoore47@gmail.com" target="_blank">timmoore47@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Justin,<br><br>Last touched MPLAB 10 years ago and have never written anything in 'C',<br><br>so your help with the source is very greatly appreciated !<br>
<br>:  )))<span class="HOEnZb"><font color="#888888"><br><br>Tim</font></span><div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On 24 June 2013 12:00,  <span dir="ltr"><<a href="mailto:hackspace-request@swansea.hackspace.org.uk" target="_blank">hackspace-request@swansea.hackspace.org.uk</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Hackspace mailing list submissions to<br>
        <a href="mailto:hackspace@swansea.hackspace.org.uk" target="_blank">hackspace@swansea.hackspace.org.uk</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://stoneship.org.uk/mailman/listinfo/hackspace" target="_blank">http://stoneship.org.uk/mailman/listinfo/hackspace</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:hackspace-request@swansea.hackspace.org.uk" target="_blank">hackspace-request@swansea.hackspace.org.uk</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:hackspace-owner@swansea.hackspace.org.uk" target="_blank">hackspace-owner@swansea.hackspace.org.uk</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Hackspace digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Re: Hackspace Digest, Vol 6, Issue 9 (Justin Mitchell)<br>
   2. PIC Workshops (Justin Mitchell)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sun, 23 Jun 2013 20:33:31 +0100<br>
From: Justin Mitchell <<a href="mailto:justin@discordia.org.uk" target="_blank">justin@discordia.org.uk</a>><br>
Subject: Re: [Swansea Hackspace] Re: Hackspace Digest, Vol 6, Issue 9<br>
To: <a href="mailto:hackspace@swansea.hackspace.org.uk" target="_blank">hackspace@swansea.hackspace.org.uk</a><br>
Message-ID: <<a href="mailto:1372016011.6126.10.camel@emerald.geode.org.uk" target="_blank">1372016011.6126.10.camel@emerald.geode.org.uk</a>><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
On Sun, 2013-06-23 at 19:14 +0100, Tim Moore wrote:<br>
> Slowly getting it together on the Pic demo program.  I've retyped the<br>
> source and have this:-<br>
><br>
>  * File:   cointoss5.c<br>
>  * Author: Tim<br>
>  *<br>
>  * Created on 20 June 2013, 07:51<br>
>  */<br>
><br>
> #include <stdio.h><br>
> #include <stdlib.h><br>
> #include <xc.h><br>
> #include <pic12f1840.h><br>
><br>
> #define INT_OSC 500000L<br>
> #define _XTAL_FREQ _INT_OSC<br>
><br>
> /* 12.0 page 101 setup the ports<br>
>  */<br>
><br>
> TRISAbits.TRISA0 = 0;<br>
> TRISAbits.TRISA1 = 0;<br>
> TRISAbits.TRISA2 = 1;<br>
><br>
<br>
<br>
I guess your not experienced with C programming then, and of course you<br>
wern't up to speed in the workshop to get help with this part because of<br>
your laptop problems.<br>
<br>
The port setup code goes inside the main() function.<br>
<br>
I have added the completed C code to the downloads on the meetings page<br>
on the website, you can see what it is meant to look like.<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sun, 23 Jun 2013 20:41:16 +0100<br>
From: Justin Mitchell <<a href="mailto:justin@discordia.org.uk" target="_blank">justin@discordia.org.uk</a>><br>
Subject: [Swansea Hackspace] PIC Workshops<br>
To: <a href="mailto:hackspace@swansea.hackspace.org.uk" target="_blank">hackspace@swansea.hackspace.org.uk</a><br>
Message-ID: <<a href="mailto:1372016476.6126.17.camel@emerald.geode.org.uk" target="_blank">1372016476.6126.17.camel@emerald.geode.org.uk</a>><br>
Content-Type: text/plain; charset="UTF-8"<br>
<br>
i have been investigating bootloaders for use with the 12f1840 and other<br>
chips.  It looks entirely feasible to lose just 100 - 300 words (of the<br>
4K word) program memory to a bootloader, which will allow people to<br>
re-program their devices at will without needing a dedicated programmer<br>
device, just using the usb-serial port devices we were using.<br>
<br>
So i am looking to put together another workshop for the near future,<br>
which will utilise a bootloader, talk through the serial port, and<br>
perhaps play with analog inputs.<br>
<br>
Would people be interested if i also offered the chance to keep the kit<br>
of parts after the workshop for cost ?<br>
<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Hackspace mailing list<br>
<a href="mailto:Hackspace@swansea.hackspace.org.uk" target="_blank">Hackspace@swansea.hackspace.org.uk</a><br>
<a href="http://stoneship.org.uk/mailman/listinfo/hackspace" target="_blank">http://stoneship.org.uk/mailman/listinfo/hackspace</a><br>
<br>
<br>
End of Hackspace Digest, Vol 6, Issue 11<br>
****************************************<br>
</blockquote></div><br>
</div></div></blockquote></div><br>