{"id":20518637,"url":"https://github.com/ramizpolic/control-emulator","last_synced_at":"2026-06-01T03:31:49.722Z","repository":{"id":155134223,"uuid":"379236575","full_name":"ramizpolic/control-emulator","owner":"ramizpolic","description":"Microwave controller emulator for PIC16F18857","archived":false,"fork":false,"pushed_at":"2021-06-22T11:45:32.000Z","size":64,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T23:45:01.136Z","etag":null,"topics":["c","emulator","microcontroller","mplabx","oop-principles"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ramizpolic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-22T10:55:13.000Z","updated_at":"2023-02-01T02:26:33.000Z","dependencies_parsed_at":"2023-05-14T21:30:30.253Z","dependency_job_id":null,"html_url":"https://github.com/ramizpolic/control-emulator","commit_stats":null,"previous_names":["ramizpolic/control-emulator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ramizpolic/control-emulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramizpolic%2Fcontrol-emulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramizpolic%2Fcontrol-emulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramizpolic%2Fcontrol-emulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramizpolic%2Fcontrol-emulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ramizpolic","download_url":"https://codeload.github.com/ramizpolic/control-emulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramizpolic%2Fcontrol-emulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33759178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","emulator","microcontroller","mplabx","oop-principles"],"created_at":"2024-11-15T21:45:33.017Z","updated_at":"2026-06-01T03:31:49.702Z","avatar_url":"https://github.com/ramizpolic.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microwave controller\r\n\r\nImplements microwave emulator which relies on polling, interrupts, and serial communication. \r\nWritten by following OOP approach in C, developed in **MPLAB X v5.45**, and works for **PIC16F18857** microcontrollers.\r\n\r\n### References\r\n  * [PIC16F18857 Datasheet](https://www.microchip.com/wwwproducts/en/PIC16F18857)\r\n\r\n## Description\r\n\u003e **Timer:**\r\nThe backing time can be set up with potentiometer in 20-second intervals. The maximum value of timer is 2 minute. Use the UART terminal to display the preset time in mm:ss format.\r\n\r\n\u003e **Buttons:**\r\nCooking can be start and stop with S1 button (START/STOP button). The S2 button simulates the state of the door. If the button is pressed the microwave oven door is opened. If the button is released the microwave oven door is closed.\r\n\r\n\u003e **Status LEDs:**\r\nThe LED1 symbolizes state of magnetron. If the LED is turned on the baking is in progress. If the LED is turned off then the magnetron is not active. The LED2 represents the internal lighting. If the LED is turned on the oven interior light is active.\r\n\r\n\u003e **Baking process:**\r\nThe cooking process can be start with pressing the START button. The cooking process starts if the door is closed and the START button is pressed. During the cooking process the time indicator LED3 is blinking with 100 ms period and the magnetron is turned on. Indicate the remaining time on the serial port.\r\nThe cooking process can be paused with opening of the door. If the door is opened the cooking process have to be stopped immediately, but the LED3 is blinking continuously indicatTimeing that the cooking program is in progress. To continue the cooking process the user have to close the door and have to press the START button.\r\nPressing the STOP button stops the cooking process. In the case when the cooking time has elapsed the cooking process is halted also.\r\n\r\n\u003e **Lighting:**\r\nThe oven interior light is turned on during cooking process or the door is open.\r\n\r\n---\r\n\r\n## Requirements\r\n#### Board\r\nX2C Development board was used for the realization of the task. The board already contains all the elements, but the needed parts include:\r\n* Timer\r\n* Potmeter\r\n* 2 Buttons\r\n* Interrupts \r\n* USART Interface\r\n\r\n#### Softwares and libraries\r\n* [MPLAB X v5.45](https://www.microchip.com/en-us/development-tools-tools-and-software/mplab-x-ide/)\r\n* [MCC - MPLAB Code Configurator](https://www.microchip.com/en-us/development-tools-tools-and-software/embedded-software-center/mplab-code-configurator)\r\n\r\n## Operation\r\n*  Base frequency at 4 MHz\r\n*  Baud rate at 9600\r\n*  **Interrupt  (10ms TM2)**  - handles states management \u0026 system configuration\r\n*  **Main logic (50ms)**      - UART transmission of formatted and color-coded internal states\r\n \r\n*The response of the controller on UART port will be the representation of internal states of the controller. The line will be held if the output is wide enough.*\r\n\r\n| State | Representation | Steps |\r\n| --- | --- | --- |\r\n| **Waiting** | `Status  00:00  [100%] \\| Door [Opened] \\| Selected [00:40] \\| Operation           Off` | After booting or completing the cycle |\r\n| **In progress** | `Status  00:24  [40 %] \\| Door [Closed] \\| Selected [00:40] \\| Operation   In Progress` | Holding Door button (S2) and starting the process by clicking Start/Stop button (S1) |\r\n| **Paused** | `Status  00:17  [57 %] \\| Door [Opened] \\| Selected [00:40] \\| Operation        Paused` | Releasing Door button (S2) while In Progress state |\r\n| **Successful** | `Status  00:00  [100%] \\| Door [Closed] \\| Selected [00:40] \\| Operation     Succeeded` | Waiting for In Progress to finish by holding Door button (S2) |\r\n| **Canceled** | `Status  00:00  [100%] \\| Door [Closed] \\| Selected [00:40] \\| Operation      Canceled` | Pressing Start/Stop button (S1) while in In Progress or Paused state |\r\n\r\nTo enter `In Progress` from `Paused`, you need to simulate closed doors by holding Door button (S2) and resuming the operation by pressing the Start/Stop button (S1).\r\n\r\n---\r\n\r\n## Configuration\r\nMake sure to update `mcc_generated_files` based on your board specifications and availability using MPLAB MCC.\r\n\r\n## Build\r\n#### On Windows\r\n* Clone repository\r\n* Open MPLAB X\r\n* Load project\r\n* Open and configure **UART**\r\n* Start\r\n\r\n#### On Linux\r\n```bash\r\n# install required packages\r\n$ sudo apt-get install gcc gcc-multilib g++-multilib\r\n\r\n# build and flash\r\n$ git clone https://github.com/fhivemind/microwave-controller.git\r\n$ make\r\n$ make flash\r\n```\r\nNote that this is not fully tested on Linux. \r\n\r\n---\r\n\r\nAuthor: [Ramiz Polic](https://github.com/fhivemind)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framizpolic%2Fcontrol-emulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framizpolic%2Fcontrol-emulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framizpolic%2Fcontrol-emulator/lists"}