PROG209

Wireless AI-Driven Self-Programming Smart PLC
Version 1.0 ATmega128 & SoifGo

📑 Table of Contents

  1. Project Concept & Architecture
  2. Workflow: From AI to Flash
  3. Programmer MCU Firmware
  4. SoifGo Mobile Integration

1. Project Concept & Architecture

PROG209 is a wireless, self-programming Smart PLC system built around the ATmega128 microcontroller. Instead of manual programming via cables or relying on heavy onboard compilers, PROG209 splits the workload intelligently between the cloud AI, the SoifGo mobile app, and a dedicated hardware programmer MCU.

2. Workflow: From AI to Flash

  1. AI Generation: You describe your logic to the AI (e.g., "turn on a pin after 3 seconds upon reset"). The AI prepares the compiled binary structure.
  2. Paste & Transport: Paste the generated hex/binary packet into the SoifGo mobile application.
  3. Wireless Transmission: SoifGo transmits the packet wirelessly via Bluetooth (UART 115200 baud) to the programmer microcontroller.
  4. Direct Flashing: The programmer MCU takes the received binary data and flashes the target microcontroller via standard ISP pins (MOSI, MISO, SCK, RESET).

3. Programmer MCU Firmware

Sample BASCOM-AVR skeleton for the programmer microcontroller handling Bluetooth serial input and ISP flashing:

$regfile = "m128def.dat"
$crystal = 11059200
$baud = 115200

Config Portb.0 = Output : Isp_sck Alias Portb.0
Config Portb.1 = Output : Isp_mosi Alias Portb.1
Config Portb.2 = Input  : Isp_miso Alias Pinb.2
Config Portb.3 = Output : Isp_reset Alias Portb.3

Config Serialin = Buffered, Size = 254, Bytematch = 13
Enable Interrupts

Dim Rx_text As String * 254
Print "Wireless ISP Programmer Ready."

Do
   ' Wait for incoming packets from SoifGo via Bluetooth
Loop

Serial0charmatch:
   Input Rx_text Noecho
   If Instr(rx_text, "PROG_START") > 0 Then
      Reset Isp_reset ' Enter programming mode
      Print "ISP_MODE_ON"
   End If
Return

4. SoifGo Mobile Integration

The SoifGo app provides the wireless terminal interface to paste, manage, and transmit binary update packets directly to the hardware programmer module.