Kernel Real Time for PIC16F628

Port of K-RT for Microchip PIC16F628

Key Features

⚙️ Microcontroller
PIC16F628, 4-20MHz, 18/20 pins, 16 GPIO
🧠 Firmware footprint
1.5KB Flash
91 Bytes SRAM
⏱ Scheduler support
4ms, 20ms, 100ms, 1s
Scheduler stack depth 16
🧩 Drivers
GPIO, UART, Pull-Up
📂 Free & Open-Source (GPLv3 / commercial)

Getting Started

Supported MCUs

PIC16F628 Port mature, others coming (Arduino Uno, Beagle-Board, Raspberry PI)

Steps:

  1. Download HEX here or from GitHub to customize the Kernel core MCU code
  2. Flash using ICSP
  3. Connect the MCU device via Serial-to-UART USB Dongle
  4. Start Micro-StudioPLC and connect to the device
// Example of customized embedded code:
// blink LED in 4ms Real Time and 1s scheduler

inline void k_rt_task_4ms_user(void) {
  blink_1(); // Runs in RT Context
}

void k_st_task_1s_user(void) {
  blink_2(); // Runs Scheduled Context
}

Web UI Applications

Download the HTML/JS page and place in "pages" folder under MSPLC root install.

GPIO Lab, Light theme
Control the GPIO, turn as inputs/output, set Pull up, turn outputs on-off
Download
GPIO Lab, Dark theme
Same with a different color scheme.
Download

Embedded Kernel

Firmware flashable Hex file only
The Kernel to Flash with ICSP
Download
Github (entire MPLab Project)
Entire MPLab-X project to modify/add custom embedded code
Download

Micro-StudioPLC Software

Download the HTML/JS page and place in "pages" folder under MSPLC root install.

Web UI Version
Provides Local Web server for HTML/JS Applications
Download
Console version
Runs in console mode only, provides commands access to hardware
Download

Hardware

USB-to-UART converters

Go Tronic DFR0065
3.3V and 5.0V UART USB transciever up to 3 Mbps
Go Tronic DFR0065 - Buy via Farnell
Olimex USB-SERIAL-F
3.3V UART USB transciever up to 1Mbps speed
Buy via Olimex - Buy via Digikey

Microcontrollers

PIC16F628
PDIP / SSOP
Datasheet - Buy via Farnell
PIC16F628
PDIP / SSOP
Datasheet - Buy via Digikey

Navigate through