<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Trevor&#039;s Electonics Blog</title>
	<atom:link href="http://electronics.trev.id.au/feed/" rel="self" type="application/rss+xml" />
	<link>http://electronics.trev.id.au</link>
	<description>A log of my electronics adventures</description>
	<lastBuildDate>Sat, 21 Apr 2012 20:41:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>chipKIT Max32 UART mapping</title>
		<link>http://electronics.trev.id.au/2012/04/22/chipkit-max32-uart-mapping/</link>
		<comments>http://electronics.trev.id.au/2012/04/22/chipkit-max32-uart-mapping/#comments</comments>
		<pubDate>Sat, 21 Apr 2012 20:35:24 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[chipKIT]]></category>
		<category><![CDATA[PIC32]]></category>
		<category><![CDATA[C32]]></category>
		<category><![CDATA[Max32]]></category>
		<category><![CDATA[PIC32MX795F512L.PIC32]]></category>
		<category><![CDATA[Serial]]></category>
		<category><![CDATA[UART]]></category>

		<guid isPermaLink="false">http://electronics.trev.id.au/?p=234</guid>
		<description><![CDATA[Been playing with the chipKIT Max32 a bit lately and using the native Microchip C32 compiler with MPLab X. Anyway, something not to well documented is the mapping between the different UARTs. This is what I&#8217;ve found: UART1 = UART1A = (RX0 pin A0 / TX0 pin A1) UART2 = UART3A = (RX2 pin 17<a href="http://electronics.trev.id.au/2012/04/22/chipkit-max32-uart-mapping/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>Been playing with the chipKIT Max32 a bit lately and using the native Microchip C32 compiler with MPLab X. Anyway, something not to well documented is the mapping between the different UARTs. This is what I&#8217;ve found:</p>
<ul>
<li>UART1 = UART1A = (RX0 pin A0 / TX0 pin A1)</li>
<li>UART2 = UART3A = (RX2 pin 17 / TX2 pin 16)</li>
<li>UART3 = UART2A = (RX pin 29 / TX pin 43)</li>
<li>UART4 = UART1B =  (RX1 pin 19 / TX1 pin 18)</li>
<li>UART5 = UART3B =  (RX3 pin 15 / TX3 pin 14)</li>
<li>UART6 = UART2B =  (RX pin A3 / TX pin A2)</li>
</ul>
<p>Note, the chipKIT Max32 uses the PIC32MX795F512L hence the 6 UART&#8217;s.</p>
]]></content:encoded>
			<wfw:commentRss>http://electronics.trev.id.au/2012/04/22/chipkit-max32-uart-mapping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microchip C32 UART library example (modified)</title>
		<link>http://electronics.trev.id.au/2012/04/14/microchip-c32-uart-library-example-modified/</link>
		<comments>http://electronics.trev.id.au/2012/04/14/microchip-c32-uart-library-example-modified/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 07:19:07 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[chipKIT]]></category>
		<category><![CDATA[PIC32]]></category>
		<category><![CDATA[C32]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[PIC32MX]]></category>
		<category><![CDATA[PIC32MX795F512L]]></category>
		<category><![CDATA[UART]]></category>

		<guid isPermaLink="false">http://electronics.trev.id.au/?p=227</guid>
		<description><![CDATA[I&#8217;ve modified the original UART example that comes with the Microchip C32 compiler to easily handle different UART&#8217;s along with adding a compare function that compares what is recieved over the UART to a pre-defined set of characters. See the description in the source below for more. /********************************************************************* UART Library Interface Example Summary: This file<a href="http://electronics.trev.id.au/2012/04/14/microchip-c32-uart-library-example-modified/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve modified the original UART example that comes with the Microchip C32 compiler to easily handle different UART&#8217;s along with adding a compare function that compares what is recieved over the UART to a pre-defined set of characters. See the description in the source below for more.</p>
<pre class="Codeblock">
/*********************************************************************
  UART Library Interface Example

  Summary:
    This file contains the interface definition for the UART peripheral
    library.

  Description:
    This library provides a low-level abstraction of the UART (Universal
    Asynchronous Receiver/Transmtter) module on Microchip PIC32MX family
    microcontrollers with a convenient C language interface.  It can be
    used to simplify low-level access to the module without the
    necessity of interacting directly with the module's registers, thus
    hiding differences from one microcontroller variant to another.

 Modifications:
    This version has been modified from the original by Trevor
    (http://electronics.trev.id.au) to allow use of the functions with
    multiple UART's. The three functions
        * SendDataBuffer,
        * GetMenuChoice,
        * GetDataBuffer
    now reqiure the UART id to be the first variable passed to
    the function (eg: GetMenuChoice(UART1);)
    Also added a buffer compare function to allow comparison of what is
    recieved. Key point to note with the compare, the buffer is not
    a \0 terminated string.
 Testing modifications:
    This has been tested on the chipKIT Max32 from Digilent using
    UART1 -> FTDI chip -> PC. The source is compiled using
    MPLAB X IDE v1.10 and programmed into the device using an MPLAB
    ICD3. Compiler was the Microchip C32 v2.02.

**********************************************************************/
//DOM-IGNORE-BEGIN
/*********************************************************************
FileName:       main.c
Dependencies:   See includes
Processor:      PIC32MX

Complier:       Microchip MPLAB C32 v1.06 or higher
Company:        Microchip Technology Inc.

Copyright © 2008-2009 released Microchip Technology Inc.  All
rights reserved.
Modifications as described above are Copyright © 2012 released
by Trevor van der Linden. All rights reserved.

The modifications have the same license terms as the original
Microchip license, with the exception that where it states Microchip,
it should be read as Trevor van der Linden.

Microchip licenses to you the right to use, modify, copy and distribute
Software only when embedded on a Microchip microcontroller or digital
signal controller that is integrated into your product or third party
product (pursuant to the sublicense terms in the accompanying license
agreement).

You should refer to the license agreement accompanying this Software
for additional information regarding your rights and obligations.

SOFTWARE AND DOCUMENTATION ARE PROVIDED ?AS IS? WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION,
ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS
FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROCHIP, TREVOR VAN DER
LINDEN, OR THEIR LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR
EXPENSES INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL,
INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST
DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES,
OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY
DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
*********************************************************************/
//DOM-IGNORE-END

// ******************************************************************
// ******************************************************************
// Section: Includes
// ******************************************************************
// ******************************************************************
#include &lt;GenericTypeDefs.h&gt;
#include &lt;plib.h&gt;

// ******************************************************************
// ******************************************************************
// Section: Configuration bits
// ******************************************************************
// ******************************************************************
#pragma config FPLLODIV = DIV_1, FPLLMUL = MUL_20, FPLLIDIV = DIV_2,\
                FWDTEN = OFF, FCKSM = CSECME, FPBDIV = DIV_1
#pragma config OSCIOFNC = ON, POSCMOD = XT, FSOSCEN = ON,\
                FNOSC = PRIPLL
#pragma config CP = OFF, BWP = OFF, PWP = OFF

// ******************************************************************
// ******************************************************************
// Section: System Macros
// ******************************************************************
// ******************************************************************
#define	GetSystemClock()      (80000000ul)
#define	GetPeripheralClock()  (GetSystemClock()/(1 << OSCCONbits.PBDIV))
#define	GetInstructionClock() (GetSystemClock())

// ******************************************************************
// ******************************************************************
// Section: Function Prototypes
// ******************************************************************
// ******************************************************************
BOOL BufferCompare(char *buffer, UINT32 size,\
                    const unsigned char *compareto,\
                    UINT32 expectedSize);
void SendDataBuffer(UART_MODULE id, const char *buffer, UINT32 size);
UINT32 GetMenuChoice(UART_MODULE id);
UINT32 GetDataBuffer(UART_MODULE id, char *buffer, UINT32 max_size);
// ******************************************************************
// ******************************************************************
// Section: Constant Data
// ******************************************************************
// ******************************************************************
const char mainMenu[] =
{
    "Welcome to PIC32 UART Peripheral Library Demo! (Trevor's mods)\r\n"\
    "Here are the main menu choices\r\n"\
    "1. View Actual BAUD rate\r\n"\
    "2. Use AUTOBAUD\r\n"\
    "3. Set Line Control\r\n"\
    "4. ECHO\r\n"
    "\r\n\r\nPlease Choose a number\r\n"
};
const char lineMenu[] =
{
  "Line Control Menu\r\n"\
  "You may need to change the line control on the terminal to see data\r\n"\
  "1. 8-N-1\r\n"\
  "2. 8-E-1\r\n"\
  "3. 8-O-1\r\n"\
  "4. 8-N-2\r\n"\
  "5. 8-E-2\r\n"\
  "6. 8-O-2\r\n"\
  "\r\n\r\nPlease Choose a number\r\n"
};
const UINT32 lineControl[] =
{
    (UART_DATA_SIZE_8_BITS | UART_PARITY_NONE | UART_STOP_BITS_1),
    (UART_DATA_SIZE_8_BITS | UART_PARITY_EVEN | UART_STOP_BITS_1),
    (UART_DATA_SIZE_8_BITS | UART_PARITY_ODD | UART_STOP_BITS_1),
    (UART_DATA_SIZE_8_BITS | UART_PARITY_NONE | UART_STOP_BITS_2),
    (UART_DATA_SIZE_8_BITS | UART_PARITY_EVEN | UART_STOP_BITS_2),
    (UART_DATA_SIZE_8_BITS | UART_PARITY_ODD | UART_STOP_BITS_2)
};
const unsigned char response[] = {"AOK"};

const UART_MODULE monitorUART = UART1;
const UART_MODULE WiFlyUART = UART2;
const UART_MODULE gpsUART = UART3;

// ******************************************************************
// Section: Code
// ******************************************************************
// ******************************************************************

// ******************************************************************
// int main(void)
// ******************************************************************
int main(void)
{
    UINT32  menu_choice;
    UINT8   buf[1024];

    UARTConfigure(monitorUART, UART_ENABLE_PINS_TX_RX_ONLY);
    UARTSetFifoMode(monitorUART, UART_INTERRUPT_ON_TX_NOT_FULL\
            | UART_INTERRUPT_ON_RX_NOT_EMPTY);
    UARTSetLineControl(monitorUART, UART_DATA_SIZE_8_BITS\
            | UART_PARITY_NONE\
            | UART_STOP_BITS_1);
    UARTSetDataRate(monitorUART, GetPeripheralClock(), 115200);
    UARTEnable(monitorUART, UART_ENABLE_FLAGS(UART_PERIPHERAL\
            | UART_RX |\
            UART_TX));

    SendDataBuffer(monitorUART, mainMenu, sizeof(mainMenu));

    while(1)
    {
        menu_choice = GetMenuChoice(monitorUART);

        switch(menu_choice)
        {
        case 1:
            sprintf(buf, "Actual Baud Rate: %ld\r\n\r\n",\
                 UARTGetDataRate(monitorUART, GetPeripheralClock()));
            SendDataBuffer(monitorUART, buf, strlen(buf));
            break;

        case 2:
            SendDataBuffer(monitorUART,\
               "Press 'U' to allow AUTO BAUD to sync\r\n",\
               strlen("Press 'U' to allow AUTO BAUD to sync\r\n"));

            UARTStartAutoDataRateDetect(monitorUART);

            while(!UARTDataRateDetected(monitorUART))
                ;

            sprintf(buf, "Actual Baud Rate: %ld\r\n\r\n",\
                 UARTGetDataRate(monitorUART, GetPeripheralClock()));
            SendDataBuffer(monitorUART, buf, strlen(buf));
            break;

        case 3:
            SendDataBuffer(monitorUART, lineMenu, sizeof(lineMenu));
            menu_choice = GetMenuChoice(monitorUART);
            menu_choice--;

            if(menu_choice >= 6)
            {
                SendDataBuffer(monitorUART, "Invalid Choice",\
                        sizeof("Invalid Choice"));
                SendDataBuffer(monitorUART, mainMenu,\
                        sizeof(mainMenu));
                break;
            }

            SendDataBuffer(monitorUART,\
  "Press Any Character after re-configuring you terminal\r\n",\
  strlen("Press Any Character after re-configuring you terminal\r\n"));
            UARTSetLineControl(monitorUART, lineControl[menu_choice]);

            menu_choice = GetMenuChoice(monitorUART);
            SendDataBuffer(monitorUART, mainMenu, sizeof(mainMenu));
           break;

        case 4:
            {
                UINT32 rx_size;
                unsigned char s[1024];
                BOOL strcorrect;
                SendDataBuffer(monitorUART,\
"Type a message (less than 100 characters) and press return\r\n",\
strlen("Type a message (less than 100 characters) and press return\r\n"));

                rx_size = GetDataBuffer(monitorUART, buf, 1024);
                strcorrect = BufferCompare(buf, rx_size,\
                        "AOK", sizeof("AOK") - 1);  // dont count the \0
                if(strcorrect == TRUE)
                {
                    SendDataBuffer(monitorUART,\
                        "recieved expected response\r\n\r\n",\
                        strlen("recieved expected response\r\n\r\n"));
                }
                else
                {
                    SendDataBuffer(monitorUART,\
                            "You Typed:\r\n\r\n",\
                            strlen("You Typed:\r\n\r\n"));
                    SendDataBuffer(monitorUART, buf, rx_size);
                }
                SendDataBuffer(monitorUART,\
                   "\r\n\r\nPress any key to continue\r\n\r\n",\
                   strlen("\r\n\r\nPress any key to continue\r\n\r\n"));
                GetMenuChoice(monitorUART);
            }
            break;

        default:
            SendDataBuffer(monitorUART, mainMenu, sizeof(mainMenu));

        }
    }

    return -1;
}

/********************************************************************
BOOL BufferCompare(\
        char *buffer,UINT32 size,\
        char *compareto,\
        UINT32 expectedSize)
 Inputs:
 * buffer - the buffer containing the data returned from the UART
 * size - the number of charachters that the UART returned in buffer
 * compareto - char array of the characters to compare buffer to
 * expected size - the number of characters in compareto excluding
        any \0 chars
 Returns:
 * Boolean - True if the two are the same, otherwise false.
 SPECIAL NOTE:
 * The contents of the buffer coming from the UART is not a
    traditional null terminated string (does not have a \0 as
    a terminating char. For this reason you need to provide the
    size and expectedSize variables so the function knows how
    many characters from the start of buffer to compare.

********************************************************************/
BOOL BufferCompare(char *buffer,\
        UINT32 size,\
        const unsigned char *compareto,\
        UINT32 expectedSize)
{
    UINT8 i;
    BOOL same;
    same = FALSE;                   // 1st default to false
    if(size == expectedSize)   // check to see if the size is the same
    {
        same = TRUE;                // default to true
        for (i=0;i<=size-1;i++)
        {
            if(buffer[i] != compareto[i])   // compare
            {
                same = FALSE;       // if not the same, set to false
            }
        }
    }
    return same;                    // return result.
}
// ******************************************************************
// void UARTTxBuffer(UART_MODULE id, char *buffer, UINT32 size)
// ******************************************************************
void SendDataBuffer(UART_MODULE id, const char *buffer, UINT32 size)
{
    while(size)
    {
        while(!UARTTransmitterIsReady(id))
            ;
        UARTSendDataByte(id, *buffer);
        buffer++;
        size--;
    }
    while(!UARTTransmissionHasCompleted(id))
        ;
}
// *******************************************************************
// UINT32 GetDataBuffer(UART_MODULE id, char *buffer, UINT32 max_size)
// *******************************************************************
UINT32 GetDataBuffer(UART_MODULE id, char *buffer, UINT32 max_size)
{
    UINT32 num_char;

    num_char = 0;

    while(num_char < max_size)
    {
        UINT8 character;

        while(!UARTReceivedDataIsAvailable(id))
            ;
        character = UARTGetDataByte(id);
        if(character == '\r')
            break;
        *buffer = character;
        buffer++;
        num_char++;
    }

    return num_char;
}
// *******************************************************************
// UINT32 GetMenuChoice(UART_MODULE id)
// *******************************************************************
UINT32 GetMenuChoice(UART_MODULE id)
{
    UINT8  menu_item;

    while(!UARTReceivedDataIsAvailable(id))
        ;
    menu_item = UARTGetDataByte(id);
    menu_item -= '0';

    return (UINT32)menu_item;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://electronics.trev.id.au/2012/04/14/microchip-c32-uart-library-example-modified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C32 &#8211; Global variable across multiple files</title>
		<link>http://electronics.trev.id.au/2012/04/02/c32-global-variable-across-multiple-files/</link>
		<comments>http://electronics.trev.id.au/2012/04/02/c32-global-variable-across-multiple-files/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 21:42:49 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[PIC32]]></category>
		<category><![CDATA[C32]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[global]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[variable]]></category>

		<guid isPermaLink="false">http://electronics.trev.id.au/?p=222</guid>
		<description><![CDATA[This is a simple example on how to use the same variable across multiple files using Microchip C32 compliler. The main file is (with void main(void) in it) is source-file-one.c. It has the include statement for source-file-two.h. The variable globalvariable is defined in the main source file, and then refered to in source-file-two.c using the<a href="http://electronics.trev.id.au/2012/04/02/c32-global-variable-across-multiple-files/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>This is a simple example on how to use the same variable across multiple files using Microchip C32 compliler. The main file is (with void main(void) in it) is source-file-one.c. It has the include statement for source-file-two.h.</p>
<p>The variable globalvariable is defined in the main source file, and then refered to in source-file-two.c using the extern command.</p>
<p>The #warning statements are there only to see how the compiler compiles each part. They can be left out without any impact.</p>
<p>***********************   source-file-one.c   ***************************</p>
<pre class="Codeblock">#warning begin source-file-one.c
#include &lt;plib.h&gt;   // so Nop() is recognised
#include "source-file-two.h"
int globalvariable;     // this is where you declare the variable
int main(void)
{
   initGlobalVariable();
   while(1)
   {
       if (globalvariable &gt; _MAX_GLOBAL_VARIABLE_VALUE)
       {
           globalvariable = 0;
       }
       else
       {
           incrementValue();
       }
       Nop(); // something to put a break point on
    }
}
#warning end source-file-one.c</pre>
<p>&nbsp;</p>
<p>**********************  source-file-two.h  ************************</p>
<pre class="Codeblock">#warning begin source-file-two.h
#ifndef _SOURCEFILETWO_H
#define _SOURCEFILETWO_H
#warning including source-file-two.h main content

#define _INCREMENT_VARIABLE_BY 2
#define _MAX_GLOBAL_VARIABLE_VALUE 500

void incrementValue(void);
void initGlobalVariable(void);

#endif
#warning end source-file-two.h</pre>
<p>&nbsp;</p>
<p>****************   source-file-two.c   *********************</p>
<pre class="Codeblock">#warning begin source-file-two.c
#include "source-file-two.h"

extern int globalvariable;    // declare variable as a variable in another file

void incrementValue(void)
{
    globalvariable = globalvariable + _INCREMENT_VARIABLE_BY;
}

void initGlobalVariable(void)
{
    globalvariable = 0;
}
#warning end source-file-two.c</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://electronics.trev.id.au/2012/04/02/c32-global-variable-across-multiple-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gainspan WiFi library for chipKit and Arduino</title>
		<link>http://electronics.trev.id.au/2012/02/07/gainspan-wifi-library-for-chipkit-and-arduino/</link>
		<comments>http://electronics.trev.id.au/2012/02/07/gainspan-wifi-library-for-chipkit-and-arduino/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 19:53:28 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[chipKIT]]></category>
		<category><![CDATA[Gainspan]]></category>
		<category><![CDATA[Max32]]></category>
		<category><![CDATA[mpide]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[PIC32]]></category>
		<category><![CDATA[PIC32MX]]></category>
		<category><![CDATA[PIC32MX795F512L]]></category>
		<category><![CDATA[WiFi]]></category>

		<guid isPermaLink="false">http://electronics.trev.id.au/?p=206</guid>
		<description><![CDATA[After forking the DIYSandbox Wirefree library, modified it using compiler directives to also be compatible with the chipKIT Max32 board. This library uses Serial1 for the Gainspan GS1011 module (instead of the original Serial0). It&#8217;s retained the same name as the original. The library uses the standard Arduino Server and Client libraries for compatibility with existing<a href="http://electronics.trev.id.au/2012/02/07/gainspan-wifi-library-for-chipkit-and-arduino/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>After forking the DIYSandbox Wirefree library, modified it using compiler directives to also be compatible with the chipKIT Max32 board. This library uses Serial1 for the Gainspan <em>GS1011</em> module (instead of the original Serial0). It&#8217;s retained the same name as the original.</p>
<p>The library uses the standard Arduino Server and Client libraries for compatibility with existing scripts.</p>
<p>Platform I&#8217;m using is the chipKIT Max32 which has the Microchip PIC32MX795F512L along with my Max32 breadboard with LED&#8217;s connected to pins 3, 5 &amp; 6. I have the <a title="GainSpan WiFi Breakout" href="http://www.sparkfun.com/products/10505" target="_blank">GainSpan WiFi Breakout</a> connected to pins 18 and 19 on the Max32 (UART1).</p>
<p>The library is available on github at <a title="http://github.com/smitthhyy/wirefree" href="http://github.com/smitthhyy/wirefree" target="_blank">http://github.com/smitthhyy/wirefree</a>.</p>
<p>Installation:</p>
<ol>
<li><a title="Smitthhyy/Wirefree zipball" href="https://github.com/smitthhyy/Wirefree/zipball/master" target="_blank">Download library</a></li>
<li>Copy the folder within the zip file to your Arduino libraries folder. ([sketch folder]\libraries\).</li>
<li>Rename folder to Wirefree</li>
<li>Restart mpide and/or arduino ide.</li>
</ol>
<p>Over time will develop the library further. Please see it&#8217;s readme for latest on it&#8217;s status.</p>
<p>You can also get a Arduino Uno shield with the Gainspan module from <a href="http://diysandbox.com/our-products/arduino-shields/hydrogen">http://diysandbox.com/our-products/arduino-shields/hydrogen</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://electronics.trev.id.au/2012/02/07/gainspan-wifi-library-for-chipkit-and-arduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mississippi State Uni and Reese Micro PIC24 library fix for Explorer 16</title>
		<link>http://electronics.trev.id.au/2011/07/16/mississippi-state-uni-pic24-library-fix-for-explorer-16/</link>
		<comments>http://electronics.trev.id.au/2011/07/16/mississippi-state-uni-pic24-library-fix-for-explorer-16/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 04:14:01 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Assembly to C book]]></category>
		<category><![CDATA[PIC24]]></category>
		<category><![CDATA[Explorer 16]]></category>
		<category><![CDATA[EXPLORER16_100P]]></category>
		<category><![CDATA[HARDWARE_PLATFORM]]></category>
		<category><![CDATA[heartbeat]]></category>
		<category><![CDATA[LED]]></category>
		<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[MPLab]]></category>
		<category><![CDATA[PIC24HJ]]></category>
		<category><![CDATA[PIC24HJ256GP610]]></category>
		<category><![CDATA[PIC24HJ256GP610A]]></category>
		<category><![CDATA[pic24_libconfig.h]]></category>
		<category><![CDATA[PIM]]></category>
		<category><![CDATA[reset.c]]></category>
		<category><![CDATA[UART]]></category>

		<guid isPermaLink="false">http://electronics.trev.id.au/?p=181</guid>
		<description><![CDATA[This fix refers to the library version release 12 April 2011. When using an Explorer 16 board and setting the Macro definition of EXPLORER16_100P in MPLab, parts of the library do not pick it up correctly rendering the heartbeat LED and the UART to not work. No compilor error is noticed. In the file lib\include\pic24_libconfig.h<a href="http://electronics.trev.id.au/2011/07/16/mississippi-state-uni-pic24-library-fix-for-explorer-16/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>This fix refers to the library version release 12 April 2011. When using an Explorer 16 board and setting the Macro definition of EXPLORER16_100P in MPLab, parts of the library do not pick it up correctly rendering the heartbeat LED and the UART to not work. No compilor error is noticed.</p>
<p>In the file lib\include\pic24_libconfig.h at line 76, change the following section of code:</p>
<pre class="Codeblock">
/** Select one of the hardware platform above to compile for. */
#ifndef HARDWARE_PLATFORM
#define HARDWARE_PLATFORM DEFAULT_DESIGN
#endif
// Verify that a valid hardware platform is selectd
#if (HARDWARE_PLATFORM != EXPLORER16_100P)   &amp;&amp; \
    (HARDWARE_PLATFORM != DANGEROUS_WEB)     &amp;&amp; \
    (HARDWARE_PLATFORM != STARTER_BOARD_28P) &amp;&amp; \
    (HARDWARE_PLATFORM != DEFAULT_DESIGN)
#error Invalid hardware platform selected.
#endif
//@}</pre>
<p>Replacing the above code with this code:</p>
<pre class="Codeblock">
/** Select one of the hardware platform above to compile for. */
/* The automated method expects the board is defined in MPLAB
   using Use Project-&gt;Build Options-&gt; Project, click on
   the MPLAB C30 tab, and in Macro Definitions click 'Add',
   and add:
      - For the Explorer 16 board - EXPLORER16_100P
      - For the Dangerous Prototypes web server - DANGEROUS_WEB
      - For the Microchip 16-bit 28-pin Starter Board - STARTER_BOARD_28P
   If the above is not set, the code will compile with the default
   of DEFAULT_DESIGN
*/
#ifndef HARDWARE_PLATFORM
#ifdef EXPLORER16_100P
#define HARDWARE_PLATFORM EXPLORER16_100P
#elif STARTER_BOARD_28P
#define HARDWARE_PLATFORM STARTER_BOARD_28P
#elif DANGEROUS_WEB
#define HARDWARE_PLATFORM DANGEROUS_WEB
#else
#define HARDWARE_PLATFORM DEFAULT_DESIGN
#endif
#endif
// Verify that a valid hardware platform is selectd
#if (HARDWARE_PLATFORM != EXPLORER16_100P)   &amp;&amp; \
    (HARDWARE_PLATFORM != DANGEROUS_WEB)     &amp;&amp; \
    (HARDWARE_PLATFORM != STARTER_BOARD_28P) &amp;&amp; \
    (HARDWARE_PLATFORM != DEFAULT_DESIGN)
#error Invalid hardware platform selected.
#endif
//@}</pre>
<p>This will now pick up the Macro definition set in MPLab and compile the components of the library needed for the Explorer 16 to function.</p>
<p>So far have tested the above with the Explorer 16, PIC24HJ256GP610A PIM, and the reset.c example from chapter 8 in the <a dir="ltr" href="http://www.reesemicro.com/Home">Microcontrollers: From Assembly Language to C Using the PIC24 Family.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://electronics.trev.id.au/2011/07/16/mississippi-state-uni-pic24-library-fix-for-explorer-16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling the PIC24 library collection from Mississippi State Uni and Reese Micro for the new PIC24HJ256GP610A PIM</title>
		<link>http://electronics.trev.id.au/2011/07/16/enabling-the-pic24-library-collection-from-mississippi-state-uni-and-reese-micro-for-the-new-pic24hj256gp610a-pim/</link>
		<comments>http://electronics.trev.id.au/2011/07/16/enabling-the-pic24-library-collection-from-mississippi-state-uni-and-reese-micro-for-the-new-pic24hj256gp610a-pim/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 03:20:17 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Assembly to C book]]></category>
		<category><![CDATA[PIC24]]></category>
		<category><![CDATA[EXPECTED_REVISION1]]></category>
		<category><![CDATA[Explorer 16]]></category>
		<category><![CDATA[EXPLORER16_100P]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[MA240012]]></category>
		<category><![CDATA[Microchip]]></category>
		<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[PIC24HJ256GP610]]></category>
		<category><![CDATA[PIC24HJ256GP610A]]></category>
		<category><![CDATA[PIM]]></category>

		<guid isPermaLink="false">http://electronics.trev.id.au/?p=161</guid>
		<description><![CDATA[For those that use the Explorer 16 board and have in the last 12 or so months purchased the PIC24HJ256GP610 PIM from Microchip (part number MA240012) may have noticed it’s got a different chip on it. It now uses the PIC24HJ256GP610A which has some issues when using the library included with the book Microcontrollers: From<a href="http://electronics.trev.id.au/2011/07/16/enabling-the-pic24-library-collection-from-mississippi-state-uni-and-reese-micro-for-the-new-pic24hj256gp610a-pim/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>For those that use the Explorer 16 board and have in the last 12 or so months purchased the PIC24HJ256GP610 PIM from Microchip (part number MA240012) may have noticed it’s got a different chip on it. It now uses the PIC24HJ256GP610A which has some issues when using the library included with the book Microcontrollers: From Assembly Language to C Using the PIC24 Family.</p>
<p>This article shows how I modified the library (12 Apr 2011 version) from <a title="http://www.ece.msstate.edu/courses/ece3724/main_pic24/labs/files/pic24_code_examples.zip" href="http://www.ece.msstate.edu/courses/ece3724/main_pic24/labs/files/pic24_code_examples.zip">http://www.ece.msstate.edu/courses/ece3724/main_pic24/labs/files/pic24_code_examples.zip</a></p>
<p>In lib\common\pic24_configbits.c at about line 261 fine the line that contains</p>
<pre class="Codeblock">
#if defined(EXPLORER16_100P) &amp;&amp; defined(__PIC24HJ256GP610__)
</pre>
<p>and change it to</p>
<pre class="Codeblock">
#if defined(EXPLORER16_100P) &amp;&amp; (defined(__PIC24HJ256GP610__) || defined(__PIC24HJ256GP610A__))
</pre>
<p>In lib\include\pic24_ports.h at about line 700 you will find the following:</p>
<pre class="Codeblock">
00700 #elif defined(__PIC24HJ256GP610__)
00701
00702 #include "devices/pic24hj256gp610_ports.h"
</pre>
<p>Change line 700 to:</p>
<pre class="Codeblock">
#elif defined((__PIC24HJ256GP610__) || defined(__PIC24HJ256GP610A__))
</pre>
<p>The above uses the same .h file for the 610A as for the 610 on the assumption the two are pin compatible in every way. I have not yet found they are not, or any other reason to use a seperate ports file for the chip.</p>
<p>In lib\include\pic24_chip.h at aprox line 336 you will find the following little block of code:</p>
<pre class="Codeblock">
#ifdef __PIC24HJ256GP610__
#define DEV_ID 0x00007B
#define DEV_ID_STR "PIC24HJ256GP610"
#endif

#if (defined(__PIC24HJ64GP206__) || defined(__PIC24HJ64GP210__) || defined(__PIC24HJ64GP506__)
|| defined(__PIC24HJ64GP510__)\
|| defined(__PIC24HJ128GP206__) || defined(__PIC24HJ128GP210__) || defined(__PIC24HJ128GP306__)\
|| defined(__PIC24HJ128GP310__) || defined(__PIC24HJ128GP506__)|| defined(__PIC24HJ128GP510__)\
|| defined(__PIC24HJ256GP206__) || defined(__PIC24HJ256GP210__)|| defined(__PIC24HJ256GP610__))

#define EXPECTED_REVISION1 0x003002
#define EXPECTED_REVISION1_STR "A2"
#define EXPECTED_REVISION2 0x003004
#define EXPECTED_REVISION2_STR "A3"
#define EXPECTED_REVISION3 0x003040
#define EXPECTED_REVISION3_STR "A4"
#endif
</pre>
<p>Replace this block of code above with:</p>
<pre class="Codeblock">
#ifdef __PIC24HJ256GP610__
#define DEV_ID 0x00007B
#define DEV_ID_STR "PIC24HJ256GP610"
#endif

#ifdef __PIC24HJ256GP610A__
#define DEV_ID 0x0000077B
#define DEV_ID_STR "PIC24HJ256GP610A"
#endif

#if (defined(__PIC24HJ64GP206__) || defined(__PIC24HJ64GP210__) || defined(__PIC24HJ64GP506__)\
|| defined(__PIC24HJ64GP510__)\
|| defined(__PIC24HJ128GP206__) || defined(__PIC24HJ128GP210__) || defined(__PIC24HJ128GP306__)\
|| defined(__PIC24HJ128GP310__) || defined(__PIC24HJ128GP506__)|| defined(__PIC24HJ128GP510__)\
|| defined(__PIC24HJ256GP206__) || defined(__PIC24HJ256GP210__)|| defined(__PIC24HJ256GP610__))
#define EXPECTED_REVISION1 0x003002
#define EXPECTED_REVISION1_STR "A2"
#define EXPECTED_REVISION2 0x003004
#define EXPECTED_REVISION2_STR "A3"
#define EXPECTED_REVISION3 0x003040
#define EXPECTED_REVISION3_STR "A4"
#endif

#if defined(__PIC24HJ256GP610A__)
#define EXPECTED_REVISION1 0x003003
#define EXPECTED_REVISION1_STR "A1"
#endif
</pre>
<p>I&#8217;m not sure what the second last line #define EXPECTED_REVISION1_STR &#8220;A1&#8243; should be and have not been able to find it, but the above has been tested using the reset.c example from chapter 8 of the book on the Explorer 16 and is working (provided you have also performed the mod described in <a title="Mississippi State Uni and Reese Micro PIC24 library fix for Explorer 16" href="http://electronics.trev.id.au/2011/07/16/mississippi-state-uni-pic24-library-fix-for-explorer-16/" target="_blank">this article</a>).</p>
<p>This will update the library to accommodate for the new version of the PIC24HJ256GP610 PIM which now uses a PIC24HJ256GP610A.</p>
]]></content:encoded>
			<wfw:commentRss>http://electronics.trev.id.au/2011/07/16/enabling-the-pic24-library-collection-from-mississippi-state-uni-and-reese-micro-for-the-new-pic24hj256gp610a-pim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digital Compass using I2C, Arduino, and Sparkfun Compass Module</title>
		<link>http://electronics.trev.id.au/2011/06/19/digital-compass-using-i2c-arduino-and-sparkfun-compass-module/</link>
		<comments>http://electronics.trev.id.au/2011/06/19/digital-compass-using-i2c-arduino-and-sparkfun-compass-module/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 12:52:04 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[Arduino]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[compass]]></category>
		<category><![CDATA[HMC6352]]></category>
		<category><![CDATA[I2C]]></category>
		<category><![CDATA[logic level converter]]></category>
		<category><![CDATA[Mega]]></category>
		<category><![CDATA[SCL]]></category>
		<category><![CDATA[SDA]]></category>
		<category><![CDATA[Serial]]></category>
		<category><![CDATA[Sparkfun]]></category>
		<category><![CDATA[TWI]]></category>
		<category><![CDATA[Two Wire Interface]]></category>
		<category><![CDATA[Uno]]></category>

		<guid isPermaLink="false">http://electronics.trev.id.au/?p=124</guid>
		<description><![CDATA[This mini project shows how to connect the Sparkfun Compass Module (SKU SEN-07915) to both the Arduino Uno and the Arduino Mega 2560. As these two Arduino boards are 5V devices, and the Compass Module is a 3.3V module, the I2C bus must be translated. This is done using the Logic Level Converter from Sparkfun<a href="http://electronics.trev.id.au/2011/06/19/digital-compass-using-i2c-arduino-and-sparkfun-compass-module/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>This mini project shows how to connect the Sparkfun Compass Module (SKU SEN-07915) to both the Arduino Uno and the Arduino Mega 2560. As these two Arduino boards are 5V devices, and the Compass Module is a 3.3V module, the I2C bus must be translated. This is done using the Logic Level Converter from Sparkfun (SKU BOB-08745).</p>
<p>To help, included here are two diagrams of the wiring needed. Note that the Mega has specific I2C pins available while the Uno uses Analog pin 4 for SDA and Analog pin 5 for SCL. SDA is the data line, and SCL is the clock line.</p>
<p>The Arduino has pull up resistors built in and the Compass Module has them as well so there is no need to add them in this case.</p>
<p>Both the wiring diagrams and the code will read the compass module twice per second and send it out via serial to the computer where it can be viewed by a serial aware program like the serial viewer in the Arduino software.</p>
<p>Wiring up the Uno, connect the following:</p>
<ul>
<li>+5V and GND connects from the UNO to the “hv” side of the level converter</li>
<li>+3.3V and GND connects from the UNO to the “lv” side of the level converter</li>
<li>Connect Analog pin A4 from the UNO to Ch1 TXO on the level converter</li>
<li>Connect Analog pin A5 from the UNO to Ch2 TXO on the level converter</li>
<li>+3.3V from the UNO also connects to the VCC on the compas module</li>
<li>GND from the UNO connects to the GND on the compas module</li>
<li>SDA on the compas module connects to Ch1 TXI on the level converter</li>
<li>SCL on the compas module connects to Ch2 TXI on the level converter</li>
</ul>
<p>See the following picture for details</p>
<p><a href="http://electronics.trev.id.au/wp-content/uploads/2011/06/uno-wiring.jpg"><img class="aligncenter" title="Wiring the compass module to the Arduino Uno" src="http://electronics.trev.id.au/wp-content/uploads/2011/06/uno-wiring.jpg" alt="Compass - Uno" width="669" height="833" /></a></p>
<p><em>How to wire the compass module to the Arduino Uno via the level shifter from Sparkfun</em><br />
Wiring up the Uno, connect the following:</p>
<ul>
<li>+5V and GND connects from the MEGA to the “hv” side of the level converter</li>
<li>+3.3V and GND connects from the MEGA to the “lv” side of the level converter</li>
<li>Connect  pin 21 SCL from the MEGA to Ch1 TXO on the level converter</li>
<li>Connect pin 20 SDA from the MEGA to Ch2 TXO on the level converter</li>
<li>+3.3V from the UNO also connects to the VCC on the compas module</li>
<li>GND from the UNO connects to the GND on the compas module</li>
<li>SDA on the compas module connects to Ch1 TXI on the level converter</li>
<li>SCL on the compas module connects to Ch2 TXI on the level converter</li>
</ul>
<p>See the following picture for details</p>
<p><a href="http://electronics.trev.id.au/wp-content/uploads/2011/06/mega-wiring.jpg"><img class="aligncenter" title="Wiring the Compass Module to the Arduino Mega 2560" src="http://electronics.trev.id.au/wp-content/uploads/2011/06/mega-wiring.jpg" alt="How to wire the compass to the Mega 2560" width="639" height="697" /></a></p>
<p><em>How to wire the Sparkfun Compass Module to the Arduino Mega 2560</em></p>
<h4>The source code.</h4>
<p>And here is the code, inspired by the code posted by Vaibhav Bhawsar. Note the source is the same for both boards.</p>
<pre class="Codeblock">
#include &lt;Wire.h&gt;              // Where all the routines for controlling
                               //    the I2C bus are
int HMC6352 = 0x42;            // device address from the data sheet
int slaveAddress;              // variable to hold the slave address
int ledPin = 13;               // LED on the Arduino board
boolean ledState = false;      // state of the LED for the flash routine
byte headingFromCompass[2];    // array to store the two byte data from compass
int i;                         // array element id
int heading;                   // calculated heading for printing

void setup()
{
  slaveAddress = HMC6352 &gt;&gt; 1;   // The wire library only wants the 7 most significant
                                  //   bits of the address.
  Serial.begin(9600);            // Start Serial, change baud rate to suit
  pinMode(ledPin, OUTPUT);       // Set the LED pin as output to show program is running
  Wire.begin();                  // Initialise the Two Wire Interface (I2C)
}

void loop()
{
  ledState = !ledState;
  if (ledState)
  {
    digitalWrite(ledPin,HIGH);
  }
  else
  {
    digitalWrite(ledPin,LOW);
  }

Wire.beginTransmission(slaveAddress);
  Wire.send(0x41);                          // Send the Get Data command
  Wire.endTransmission();
  delay(10);                                // The HMC6352 needs 70us delay
  Wire.requestFrom(slaveAddress, 2);        // Request 2 bytes of data (MSB then LSB)
  i = 0;                                    // This is used as the array element pointer for
                                            //   data
  while(Wire.available() &amp;&amp; i &lt; 2)          // We're receiving data
  {
    headingFromCompass[i] = Wire.receive(); // Put the data into the array element
    i++;                                    // increment for the next data piece
  }
  heading = headingFromCompass[0]*256 + headingFromCompass[1];  // Combine MSB and LSB
  // Change the following output to suit your application
  Serial.print("Heading: ");
  Serial.print(int (heading / 10));     // The whole number part of the heading
  Serial.print(".");
  Serial.print(int (heading % 10));     // The fractional part of the heading
  Serial.println(" degrees");
  delay(500);
}
</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://electronics.trev.id.au/2011/06/19/digital-compass-using-i2c-arduino-and-sparkfun-compass-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MPLab C18 v3.38 Error &#8211; Device not specified. Use /p option to specify a device</title>
		<link>http://electronics.trev.id.au/2011/05/14/mplab-c18-v3-38-error-device-not-specified-use-p-option-to-specify-a-device/</link>
		<comments>http://electronics.trev.id.au/2011/05/14/mplab-c18-v3-38-error-device-not-specified-use-p-option-to-specify-a-device/#comments</comments>
		<pubDate>Sat, 14 May 2011 12:27:50 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[programming tools]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[C18]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[linker]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[Microcontrollers]]></category>
		<category><![CDATA[MPLab]]></category>
		<category><![CDATA[MPLink]]></category>
		<category><![CDATA[PIC18]]></category>
		<category><![CDATA[processor]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://electronics.trev.id.au/?p=112</guid>
		<description><![CDATA[If your using a different linker file than what comes with the compiler you will need to set the /p option for the linker to specify your processor manually. For some reason v3.38 doesn&#8217;t pick this up automatically. If this is not done, the following error message will probably be recieved: Error &#8211; Device not<a href="http://electronics.trev.id.au/2011/05/14/mplab-c18-v3-38-error-device-not-specified-use-p-option-to-specify-a-device/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>If your using a different linker file than what comes with the compiler you will need to set the /p option for the linker to specify your processor manually. For some reason v3.38 doesn&#8217;t pick this up automatically. If this is not done, the following error message will probably be recieved:</p>
<p>Error &#8211; Device not specified. Use /p option to specify a device.</p>
<p>Setting the /p option is simple, click &#8216;Project &#8211; Build Options &#8211; Project&#8217;, go to the MPLINK Linker tab. Then check the &#8216;Use Alternate Settings&#8217; check box.</p>
<p>The default string will look like:</p>
<p>/m&#8221;$(BINDIR_)$(TARGETBASE).map&#8221; /w /o&#8221;$(BINDIR_)$(TARGETBASE).cof&#8221;</p>
<p>Change this to:</p>
<p>/m&#8221;$(BINDIR_)$(TARGETBASE).map&#8221; /w <strong>/p18F2450  </strong>/o&#8221;$(BINDIR_)$(TARGETBASE).cof&#8221;</p>
<p>using your processor instead of the /p18F2450 in the above example. Note, there is no space between the p and the 1. It&#8217;s just the font makes it look like there is.</p>
]]></content:encoded>
			<wfw:commentRss>http://electronics.trev.id.au/2011/05/14/mplab-c18-v3-38-error-device-not-specified-use-p-option-to-specify-a-device/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>String to Hex converter</title>
		<link>http://electronics.trev.id.au/2010/09/03/string-to-hex-converter/</link>
		<comments>http://electronics.trev.id.au/2010/09/03/string-to-hex-converter/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 09:59:38 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[programming tools]]></category>
		<category><![CDATA[character]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[hex]]></category>
		<category><![CDATA[str2hex]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://electronics.trev.id.au/?p=100</guid>
		<description><![CDATA[Had the need to create some strings in the form of an array of hex codes for the charachters the other day which was a little cumbersom, so put together some quick php code to do it for me. So thought I&#8217;d share it with you. You can access it at http://electronics.trev.id.au/str2hex.php. Just enter your<a href="http://electronics.trev.id.au/2010/09/03/string-to-hex-converter/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>Had the need to create some strings in the form of an array of hex codes for the charachters the other day which was a little cumbersom, so put together some quick php code to do it for me. So thought I&#8217;d share it with you. You can access it at <a href="http://electronics.trev.id.au/str2hex.php">http://electronics.trev.id.au/str2hex.php</a>. Just enter your string and click convert.</p>
]]></content:encoded>
			<wfw:commentRss>http://electronics.trev.id.au/2010/09/03/string-to-hex-converter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>South Australian PIC Users Group</title>
		<link>http://electronics.trev.id.au/2010/07/31/south-australian-pic-users-group/</link>
		<comments>http://electronics.trev.id.au/2010/07/31/south-australian-pic-users-group/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 23:48:43 +0000</pubDate>
		<dc:creator>Trevor</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Group]]></category>
		<category><![CDATA[MCU]]></category>
		<category><![CDATA[MOSFET]]></category>
		<category><![CDATA[PIC]]></category>
		<category><![CDATA[SAPUG]]></category>
		<category><![CDATA[Users]]></category>

		<guid isPermaLink="false">http://electronics.trev.id.au/?p=97</guid>
		<description><![CDATA[Last Tuesday (27 Jul 2010) I attended a meeting at the South Australian PIC User Group (SAPUG) which was excellent. A great bunch of people that are all keen to help. Ian from The Leon Audio Company gave a talk on how to use MOSFET’s with a PIC and some things to watch out for.<a href="http://electronics.trev.id.au/2010/07/31/south-australian-pic-users-group/"> <br /><br /> (Read More...)</a>]]></description>
			<content:encoded><![CDATA[<p>Last Tuesday (27 Jul 2010) I attended a meeting at the South Australian PIC User Group (SAPUG) which was excellent. A great bunch of people that are all keen to help. Ian from The Leon Audio Company gave a talk on how to use MOSFET’s with a PIC and some things to watch out for. They are a great device, but needs to be used in the right way or you destroy your PIC MCU. The group is planning a weekend of activities in October so keep the weekend of 16<sup>th</sup> and 17<sup>th</sup> free and keep an eye on the groups web site for details at <a title="South Australian PIC Users Group" href="http://www.users.on.net/~sapug/" target="_blank">http://www.users.on.net/~sapug/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://electronics.trev.id.au/2010/07/31/south-australian-pic-users-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

