
	Test LdMicro for PIC16F microcontrollers :
	__________________________________________


	If everything is well configured, one can generate C files,
	hex file, and upload it to the target without exiting LdMicro



1)	Install Hi-Tech C (alias PicC) compiler for PIC16F from microchip site
	or any other


2)	Copy LdMicro executable, buildPic16.bat and flashMCU.bat in a same directory
	Also copy LIBRARIES_FOR directory and its content at the same place
	Verify that libraries' version is the same as LdMicro's one

3)	Edit buildPic16.bat (right click + Modify) and modify PCCPATH to point 
	to your Hi-Tech C path

	Then, edit if need be FlashMCU.bat (right click + Modify) 
	According to the programmer you intend to use, you can modify instructions 
	that will load the hex file into the target
	It'll be possible anyway to flash the target manually with hex file

4)	Create a ladder with LdMicro in a directory.

5)	Compile the ladder with "Compile HI-TECH C for PIC" 
	and generate the C file in the same directory as the source (.ld) 
	file, with the same name (.c)
	
	It also generates a (.h) file and a ladder.h header
	With joined libraries, it makes a ready-made C project

6)	Launch "Generate C solution" from LdMicro to get the hex file
	in "bin" directory

	Look at the command window ; there shouln't be compiling errors
	Librairies are automaticaly copied (first time only) in "lib" 
	subdirectory where they can be adapted if need be
	Intermediate files are generated in "obj" subdirectory

7)	Upload generated hex file into the target with "Call FlashMcu" or manually
	Test generated hex file on target...



NB:	The libraries have been tested on PIC16F876 and PIC16F877, but should
	work for all PIC16F declared in LdMicro.
	It's possible (and easy) to adapt the code to other targets of the 
	same family by using compiling directives.
	The name of the target is defined in ladder.h as LDTARGET_pic16fxxx

	You can use several ADCs or PWMs, but only one Uart, one SPI and one I2C
	(But with several peripherals with different software SS pins on SPI
	or with diferent addresses on I2C Bus)

NB:	SPI must be named "SPI" on PICs
	SPI new functions are:
	SPI Send/Receive, which sends and/or receives a byte 
	SPI Write, which send an alphanumerical string to SPI without reception

	SPI frequency is defined as UART's one in the global settings
	SPI works only in master mode with most standard config

NB:	I2C must be called "I2C" on PICs
	I2C new functions are:
	I2C Read to read one byte in a peripheral's register
	I2C Write to write a byte to a peripheral's register

	I2C frequency is also defined in global settings
	I2C also works only in master mode

NB:	All the frequencies used by ADC, PWM, SPI or I2Care obtained from CPU clock
	by a dividing factor. There are few choices for this factor, so frequencies
	are very approximative. 

NB:	ADC max available resolution is used
	PWM max resolution is used and parameter is only % between 0 and 100
