{"id":21906585,"url":"https://github.com/osresearch/modelf","last_synced_at":"2025-10-31T18:02:33.782Z","repository":{"id":151576610,"uuid":"94652218","full_name":"osresearch/modelf","owner":"osresearch","description":"USB interface for the IBM Model F AT keyboard","archived":false,"fork":false,"pushed_at":"2017-06-18T01:18:25.000Z","size":20,"stargazers_count":12,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-16T00:45:02.471Z","etag":null,"topics":["arduino","keyboard","model-f","retrocomputing","teensy","usb-hid"],"latest_commit_sha":null,"homepage":null,"language":"Arduino","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osresearch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-06-17T22:22:20.000Z","updated_at":"2025-04-08T13:33:17.000Z","dependencies_parsed_at":"2023-07-15T05:17:17.869Z","dependency_job_id":null,"html_url":"https://github.com/osresearch/modelf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/osresearch/modelf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osresearch%2Fmodelf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osresearch%2Fmodelf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osresearch%2Fmodelf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osresearch%2Fmodelf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osresearch","download_url":"https://codeload.github.com/osresearch/modelf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osresearch%2Fmodelf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282033060,"owners_count":26602642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-31T02:00:07.401Z","response_time":57,"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":["arduino","keyboard","model-f","retrocomputing","teensy","usb-hid"],"created_at":"2024-11-28T16:53:12.463Z","updated_at":"2025-10-31T18:02:33.747Z","avatar_url":"https://github.com/osresearch.png","language":"Arduino","funding_links":[],"categories":[],"sub_categories":[],"readme":"IBM Model F Keyboard Interface\n===\n![IBM Model F USB keyboard](https://farm5.staticflickr.com/4221/35330162436_b938f6c4fd_z_d.jpg)\n\nThis is a Arduino/Teensy based adapter for the classic IBM Model F AT\nkeyboard to a modern USB HID device.  It doesn't require any permanent\nmodifications to the keyboard and fits entirely inside the spacious\nhousing.\n\nThere are some minor annoyances with this keyboard compared to the\nmore common Model M:\n\n* There are no arrow keys!\n* The escape key is on the numeric keypad, rather than by the tilde.\n* The function keys are on the left side, making the keyboard quite wide.\n* The backspace is quite small.\n* The `\\\\` and `|` key is oddly positioned next to the backspace.\n* The `F` and `J` keys do not have any locator dots.\n\nWiring\n---\n![Teensy and Model F PCB](https://farm5.staticflickr.com/4252/35239419941_2bf131733b_z_d.jpg)\nThere are only four wires necessary to connect the keyboard to the Teensy.\nClock, Data, Power and Ground.  The Model F PCB has long two-row right\nangle pin header connector and its cable connected via a 3x2 connector\n(with a missing pin) to the far side.  The four pins that we need are:\n\n   Reset (NC)    NC        +5V\n   Clock/D0      Ground    Data/D1\n\nThe Clock connects to Teensy D0, data to Teensy D1.  Power and Ground\nuse the USB +5V line.\n\n\nProtocol\n---\n\nThe clock and data are open collector, so the AVR is configured with\ninput pullups and watches for the falling edge on the clock to indicate\nthat data is arriving.\n\nAccording to [Craig Peacock's site](http://retired.beyondlogic.org/keyboard/keybrd.htm)\n\n\u003cblockquote\u003e\nThe transmission of data in the forward direction, ie Keyboard to Host is\ndone with a frame of 11 bits. The first bit is a Start Bit (Logic 0)\nfollowed by 8 data bits (LSB First), one Parity Bit (Odd Parity) and a Stop\nBit (Logic 1). Each bit should be read on the falling edge of the clock.\n\u003c/blockquote\u003e\n\nThe Teensy busywaits for the falling edge of the clock to indicate\nthe stop bit, then reads the remaining ten bits in the frame.  It checks\nthe parity and has a lookup table of IBM scancodes to USB keycodes that\nit uses to generate the HID messages.\n\nWe can also generate commands to the keyboard to query its version,\nenable the LEDs, etc.  There appears to be some sort of problem with\nthe way that we're dealing with the bus, but it mostly works.\nSometimes toggling caps-lock/num-lock at a high rate causes problems.\nteensy won't program, so once the case is closed up it is hard to iterate\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosresearch%2Fmodelf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosresearch%2Fmodelf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosresearch%2Fmodelf/lists"}