Ocelot

From Pixelbar
Jump to navigation Jump to search

Building custom firmware for Ocelot home automation controllers.

Ocelot
Ocelot
Main PCB of the Ocelot Home Automation Controller containing multiple integrated circuits and other electronic components.
StatusIn progress
TypeHome Automation Controller
MaintainersBeef
StartedJanuary 2015
Sourcetbd
Docstbd

Specs

The device has two processors: A Z180 MPU for the main operating system and a PIC16F for offloading real-time peripheral processing from the main processor.

Processors

Main processor:

  • Z180 MPU. Z8S18020VSC
  • Full backwards compatibility with Z80, but with enhanced instruction set and some built-in peripherals.

Secondary processor:

  • PIC16F MCU: Microchip PIC16F876
  • Program memory: Flash 8K x 14bit words (built-in)
  • Working memory: RAM 368 x 8 bits (built-in)
  • Data memory: EEPROM 256 x 8 bits (built-in)

Hacking

User "Beef" created custom software for the Ocelot.

Bootloader

The serial bootloader sits in FLASH memory at address 0x0000.

Usage:

  1. Send data to the Ocelot serial port in 1024 byte chunks at 57600 baud. All data must be padded to 1024 bytes. Data is loaded starting at address 0x8040.
  2. Data is loaded until the first byte of the new chunk is 0x00. (This can cause issues with binary data that contains 0x00 bytes. Bootloader code needs to be updated.)
  3. After 0x00 byte is received, the bootloader jumps to the start address 0x8040. (RAM starts at 0x8000. Stack takes up 0x8000-0x803F)

Bootloader includes a jump table to bootloader functions for use by the application code. This could be considered a simple BIOS.

  • ROM        .equ    $0000
  • BL        .equ    ROM + 0            ; Start the bootloader
  • PUTCB    .equ    ROM + 3            ; Print a character (blocking)
  • PUTC    .equ    ROM + 6            ; Print a character
  • PUTS    .equ    ROM + 9            ; Print a string
  • WDT        .equ    ROM + 12        ; Refresh WDT
  • GETCHAR    .equ    ROM + 15        ; Receive a character (blocking)

Monitor

History:

Manuals

ADICON Ocelot Manuals