	*** OLIMEX demo project for MOD-RS485-ISO ***

1. Description	
	This demo shows how to interface between host and slave via I2C protocol. The host is PIC18F26J50. The communication uses UEXT cable. The slave I2C recive address and command, each 1 byte. The format of the protocol is:
	
	*****************************
	S	aaaaaaaaA	ccccccccA	P
	*****************************
	
	Wrere
	S - Star Condition
	a - Address - 8-bits
	A - Acknowledge bit
	c - Command - 8-bits
	P - Stop Condition
	
	!NOTE: This is not a standart I2C protocol due the fact that the slave I2C is only recieving. Therefor is no need for R/W control bit.
	
	The default address is 0xFF, stored in the Flash Program Memory @0x600; The algorithm for new address is:
		1. Set the program jumper (labeled PROG)
		2. Reset the device (RST button)
		3. Wait for the host device to complete addressing sequence
		4. Remove the jumper
		
	The new address if from 0xF0 to 0xF4; This could be changed by the host program.
		
		!NOTE: Only ONE device should be with set jumper. When host sends new address the protocol should be:
			<Start> - <0xFF> - <ACK> - <New Address> - <ACK> - <Stop>
		
	The transmiting of data is done by the CLC peripherial. The configuration of this peripherial is done with the help of CLC Desigh Tool (It can be downloaded for Microchip site). CLC1 is used for TX and CLC2 - RX. There are following commands:
		0x11	-	Open CLC1	(Only TX);
		0x12	-	Open CLC2	(Only RX);
		0x13	-	Open both CLC1 and CLC2;
		0x21	-	Close CLC1;
		0x22	-	Close CLC2;
		0x23	-	Close both CLC1 and CLC2;
		
		!IMPORTANT NOTE:	There is major issue with CLC1IN1, known by Microchip, so you can reffer to Errata for more information. The following segment is needed for the proper function of the CLC peripherial:
		
		NCO1CLKbits.N1CKS = 11;
		NCO1CONbits.N1EN = 1;
		
		
		The two jumpers Z-A and Z-B can be used for configurating the RS485 communication as Half-Duplex or Full-Duplex.

2. Support
	http://www.olimex.com/dev/
	http://www.atmel.com/

3. Revision history
	8 May 2012 - v1.00 - initial release
