
MGC3130 PIC18F14K50 Host Reference Code V2.0
Microchip 29 August 2014

This package contains firmware, software and documentation of MGC3130 PIC18F14K50 
Host Reference Code V2.0

Unzip MGC3130_PIC18F14K50_Host_Reference_Code_V2.0.zip to your PC.

____________________________

c o n t e n t

The package contains the following data:

Main folder
  Readme.txt
    --> this document

Bootloader
  This folder contains the binary code and the PC tool (v2.9j) of the PIC18F14K50 Bootloader. 
  The applications 'I2C-to-USB bridge' and 'I2C message decoding demo' can both be 
  loaded on the PIC18F14K50 with this Bootloader. The Bootloader firmware is based 
  on the usb Bootloader from Microchip's MLA v2013_12_20. It is modified in such a 
  way that the PIC enters Bootloader mode if Pin RC6 is pulled to Ground during 
  power up (see Instruction below).
  Please note that the Bootloader binary on the PIC18F14K50 flash at time of delivery 
  is based on an older version of the MLA with same functionality.


I2C_Message_Decoding folder
  This folder contains a MPLAB X sample project demonstrating MGC3130 I2C 
  Message Decoding on the host side using Microchip's PIC18F14K50. Hereby, 
  two LEDs which are placed on the I2C-to-USB bridge can be controlled 
  using Flick, Tab and AirWheel gestures.
  This project can be used as a starting point to establish I2C communication 
  when  using a different host controller. 


I2C_TO_USB_Bridge_Binary folder
  This folder contains the binary files of the i2c-to-usb bridge included in the 
  MGC3130 Hillstar Development Kit. 
  There are two different binary hex files for the cases MGC3130 with I2C address 
  ox42 (default configuration in the Hillstar Kit) and MGC3130 with I2C address 0x43.

____________________________

T a r g e t

I2C-to-USB bridge of MGC3130 Hillstar Development Kit

____________________________

I n s t r u c t i o n

The PIC18F14K50 on the I2C-to-USB bridge of the Hillstar development kit is by default
flashed with an old version of the Bootloader and an I2C-to-USB bridge.
NOTE: in order to use this Demo, the Bootloader provided in this demo has to be flashed
on the part; an ICSP header is provided on the PCB as described in the 
MGC3130 Hillstar Development Kit User Guide (DS40001721A). 

The PIC18F14K50 on the I2C-to-USB module enters Bootloader mode in the case that the
PIN RC6 (MCLR of the MGC3130) is pulled to low by the user during power-up. Once the 
PIC18F14K50 is in Bootloader mode, the PC tool 'HIDBootloader.exe' can be
used to load the application ('I2C-to-USB bridge' or 'I2C-message-decoding demo')
on the part.

If the pin RC6 is pulled high during start-up, the PIC will go directly into the
application.

NOTE: By connecting the module to the MGC3130 unit, the Pin RC6 will be pulled high via 
a 10kOhm resistor located on the MGC3130 unit.

____________________________

C h a n g e  L o g

v2.0   Complete rework of code; main changes:
       * TS line polling is now interrupt driven
       * Timer0 runs only if needed
       * Fixed overflow bug for AirWheel
       * Added Tap decoding

V1.1   * Bugfix: Wrong Linker File in previous version
       * Removal of build option 'Unidirectional'

V1.0   Initial Version
