Firmware for uLI-master (PIC18F14K50 processor).
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
driver_win
uLI-master.X
.clang-format
.gitignore
Compiler.h
GenericTypeDefs.h
HardwareProfile.h
LICENSE
README.md
cdc-protocol.md
main.c
main.h
ringBuffer.c
ringBuffer.h
rm18F14K50.lkr
usart.c
usart.h
usb.h
usb_ch9.h
usb_common.h
usb_config.h
usb_descriptors.c
usb_device.c
usb_device.h
usb_function_cdc.c
usb_function_cdc.h
usb_hal.h
usb_hal_pic18.h

README.md

uLI-master

Ultimate LI – master is a XpressNET ↔ USB (CDC) inteface. It bahaves as a XpressNET master. In this scheme, computer basically replaces the command station.

  • Processor: PIC18F14K50
  • Programming language: C
  • PCB: uLI-04
  • Authors: Jan Horacek (c) 2016
  • License: Apache License v2

Used tools

  • MPLAB X IDE v3.45
  • C18 LITE v3.47 compiler (version for linux available here)
  • clang-format to format code

Windows driver

Windows CDC driver could be found in the Microchip Libraries for Applications.

However you do not need to download ~ 280 MB of data to get ~ 10 kB driver. We added custom driver (based on the Microchip driver) to the driver_win directory of this repo.

COM port specification

  • Any speed.
  • No flow control.

EEPROM

EEPROM is not used in this firmware.

Programming

We use PICPgm at RaspberryPi to program the PIC.

Note: When programming the processor for first time, do not forget to include -p_cfg argument to program fuses into the processor. Fuses are stored in main hex file.

LEDs

Input LED (green)

This LED is turned on by default. It turns off for a few miliseconds when a byte arrives from a XpressNET device to Master.

Output LED (green)

This LED is turned on before a valid connection with PC is established. After establishing the connection, this LED turns off and blinks only when a command is being received from PC.

Status LED (yellow)

  • 2 blinks = normal operations

RACK_ENABLE

When code is compiled with RACK_ENABLE defined, uLI-master will periodically ask devices to respond via Request for Acknowledgement command. uLI-mastter uses this command to keep list of active XpressNET devices. Changes in active devices list are reported to PC, see protocol.

Without this macro, this feature is disabled.

Protocols

  • On XpressNET side, Master uses standard XpressNET protocol.
  • On PC side, Master uses custom protocol.

Further reading