
Sharp ce140f emul v1
ffxx68/Sharp_ce140f_emul
At the time (I'm talking about mid '80s early '90s), what I thought my Sharp-PC was missing the most was a convenient way to store and load programs.

At the time (I'm talking about mid '80s early '90s), what I thought my Sharp-PC was missing the most was a convenient way to store and load programs.
Sharp ce140f emul v2 is an open-source printed circuit board by ffxx68, from the ffxx68/Sharp_ce140f_emul repository on GitHub. It is a 2-layer board of 64.4 × 42.2 mm with 54 parts on 67 nets, routed with 650 tracks and 72 vias.
It is built around the MCP73831, TXS0108EPW and XC6206P332MR, with the PCM12SMTR among its other parts. Its parts include 15 resistors, 14 capacitors, 4 ICs, 4 diodes and 2 connectors. It belongs with the STM32 boards of this library.
A hardware module emulating the Sharp CE-140F disk drive, using an SD-Card and an STM32 Nucleo microcontroller
At the time (I'm talking about mid '80s early '90s), what I thought my Sharp-PC was missing the most was a convenient way to store and load programs. Entering a BASIC listing by hand has always been one of the most frustrating tasks, in the early days of home computing. Magnetic cassettes using a standard record player used to be the most common (and affordable!) storage medium, back then. Indeed, today a software-emulated cassette interface has been developed too - PocketTools, but using disks is something definitely different!
The Sharp CE-140F Disk Driver was a rare and expensive extension for the Sharp Pocket PCs, compatible with several models:
PC-1280, PC-1280(Jap), PC-1285, PC-1403, PC-1403H, PC-1425, PC-1425(Jap), PC-1460, PC-1460(Jap), PC-1470U, PC-1475, PC-1475(Jap), EL-5500III, PC-E500, PC-E500(Jap), PC-E500S, PC-E550, PC-E650, PC-U6000. As well as the PC-1360, PC-1360K, PC-1365 and PC-1365K after 1986 (see also: pocket.free.fr).
The interface presented here is an emulated hardware alternative to the real CE-140F, to get a fully functional disk file management on Sharp PCs, using an SD-card as a storage medium, so that one can manage files from a Sharp PC using a modern PC.
After optimizing the project with this early prototype, based upon a Nucleo L053R8 controller board (that was one I had at hand, at the time):
an Indiegogo campaign (Sharp_ce140f_emul on Indiegogo) has succesfully crowd-funded the manufacturing of the PCB board version. This PCB holds the Nucleo (here a more powerful L432KC), the SD card, and the interface circuitry:

Here's a demonstration video, using the LOAD and SAVE commands for example, performed with the PCB version of the emulator:
The complete KiCAD project is public (KiCad v1 project), while at the following link there's the PCB manufacturer's project, ready for production, in case you wish to order some directly:
Sharp_ce140f_emul by AISLER Sharp_ce140f_emul by PCBWay
Interface schematics (find the complete KiCad project in the repo):

Since the Sharp PC uses a CMOS 5v logic, while the Nucleo board is a 3.3v device, some level-shifting is required in between the two. Nucleo inputs are is 5v-tolerant, so the board inputs could easily accept the Sharp outputs without the need any converter, but the board 3.3v output isn't enough to drive the 5v input on the Sharp. The level converter I choose is one of this type: https://www.sparkfun.com/products/12009 (actually, one of its many clones).
Actually, if I had an Arduino ONE at hand when I first started developing this project, being a 5v board, the voltage level conversion wouldn't have been an issue at all. Migrating to Arduino involves a major reworking of the interface software, now, so it is left to any good-willing developer...
Finding how to interface the Sharp with the Nucleo has been an interesting journey for me, anyway. I initially struggled a lot, before I got the Nucleo board properly receive the Device Code from the PC, which is the very first step of the communication handshake. At first, using the level converter on each data line and sharing the Nucleo pins for both input and output, the board always received a 0xFF, instead of the exepcted 0x41 (which is, an hardcoded "awake" value issued by the Sharp-PC to the CE140-F). After a number of trials and errors, I found out that the converter kept a constant high value on the Nucleo inputs, regardless of the Sharp setting a low. That was because of the normally high impedance of Sharp-PC outputs, I think.
Whatever, I decided to use different pins of the Nucleo board for the return lines (Nucleo-to-Sharp), removing the level converters for the opposite direction (Sharp-to-Nucleo). See schematics. I also soft-configured Nucleo internal pull-down on each input line (45K resistor, as per datasheet) and added a 10K in series, as in the schematics above, to achieve the 5-to-3.3v divide. Output and input stages are time-separated in the communication protocol, so during output, input pins on Nucleo are set to a PullNone (i.e. high impedance) mode. After these changes, I finally reached a stage where the 0x41 device code, as well as the follow-up command sequence, was correctly received by the board and was ready to be processed in software. That became mainly a software issue then, to understand how to decode and send data back. In this respect, I must mention the excellent job the author of the Pockemul all-software emulator, who first reverse-engineered the communication protocol, starting from a real CE140-F device, an who was so kind to share with me the result of his investigations.
About power, the Sharp and the Nucleo do not share the 5v power line, just gnd. This is to prevent the relatively low capacity internal coin cells to be drained by the Nucleo board. At present, the board is powered through its USB plug. I plan (in very long tem), to make the board battery powered, maybe rechargeable.
Important Note - With the Nucleo L432KC, by default the PA_5 (A4) and PA_6 (A5) pins can only be used as Input floating (ADC function). SB16 and SB18 solder bridges (0-ohm resistors, actually) must be removed, in order to use these pins as Digital output and have access to other functions (DigitalOut, SPI, PWM, etc...). Refer to the Nucleo user manual, for more details.
An important issue has arised, while testing the finished board on different Sharp PC models (which I didn't hit, while using it on my own PC), having to do with the level converter used in my design. The description and a complete story of its analysis can be found at: Issue #4.
A relatively easy workaround was later found, using stronger Pull-up resistors, which seems to fix the problem in most of cases. Still, someone has designed and built alternative version of the board. Like, for example the one suggested by Yuuichi Akagawa:
Here, he used integrated level converters (SN74LV1T34), in place of the discrete mosfet-based original solution.
Yet an alternative design was also proposed by Pokoyama Danna:
Pokoyama Danna's board (e-mail: PoyokomaDanna)
where a programmable device (Renesas SLG46826) was used instead.
Yet, another interesting interface is that by Wayne Venables Sharp Manager, where not only the CE-140F, but also the CE-126P cassette and printer interface is emulated, on Arduino plus a Windows counterpart program.
The commands implemented are those from the CE140F Operation Manual,
| Command | Description |
|---|---|
LOAD | ✅ Load a BASIC program to PC memory |
SAVE | ✅ Save a BASIC program in tokenized, binary format |
SAVE ,A | ✅ Save a BASIC program in plain ASCII format |
FILES | ✅ List files, including wildcards (e.g. FILES"X:C*.BAS"), and navigation using ↑ ↓ SHIFT+↓ |
KILL | ✅ Delete a file |
OPEN / CLOSE / PRINT# / INPUT# | ✅ BASIC statements to handle data files |
DSKF | ✅ DSKF 1 returns free Mbytes; DSKF 2 returns a test dummy value of 65535 |
CHAIN / MERGE | ✅ Load and execute a program, with / without deleting the program in PC memory |
EOF | ✅ BASIC statement to check for end-of-file |
NAME | ✅ Rename a file |
SET | ✅ Set a password to a file |
COPY | ✅ Copy a file to a different name (drive letters X:, Y: ignored) |
LFILES | ✅ List files and attributes to serial printer |
LOC / LOF | ✅ BASIC statements to get the current position and length of a file |
INIT | ❌ Intentionally not implemented (disk formatting) |
The emulator tries to reply as closely as possible (given the knowledge we have at present of the protocol) to the commands issues by the Sharp-PC, like an actual CE-140F would. Unfortunately, the official CE-140F Service Manual doesn't go beyond the low-level hardware description, so some commands may still show some unexpected behaviour. Several tests, by different users too, have validated the most common use cases, though.
With respect to the communication protocol, I've tried to summarize here what we know so far:
Pre-built binaries can be found in
at various stages in the software evolution, with version numbering suggesting the more recent one.
To install a binary, download the .bin file on your PC and drag the file to the device shown as a virtual disk drive, when plugged in to a PC USB port. This applies to Windows OS.
Under Linux, the ST-Link mounts the board as a USB mass storage, e.g. /Volumes/NODE_L432KC, /Volumes/NOD_L432KC, /Volumes/NUCLEO*.
The STM32CubeIDE framework
can be used to build and flash the code found in the main branch here, using the included IDE tools.
Alternatively, a [Makefile](Makefile) is provided too, to build and flash from a command line,
assuming make and the Arm GNU Toolchain are available (arm-none-eabi, included with the STM32CubeIDE installation).
NOTE - The original version of the project (now found in the legacyMbed branch) was developed using the Keil Studio Cloud online tools,
which has now reached its end of life, since July 2026.
As noted, version v1 of the board needs to be powered through the board USB plug. Making the emulator entirely portable, battery powered, is the most sensible next step that gets to my mind. To this aim, I have started a second revision of the board design, aimed mainly at:
A DRAFT version of this v2 PCB is here:
https://github.com/ffxx68/Sharp_ce140f_emul/tree/main/KiCad_v2
but it's very far from the making, yet. Firmware would need to be revised too.
Many have contributed to make this project what it is. Among them:
Thank you all.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | 100n | ce140f_library:C_0603_1608Metric | C3, C4, C5, C7, C9, C13 |
| 4 | 1k5 | ce140f_library:R_0603_1608Metric | R2, R3, R4, R12 |
| 4 | 47k | ce140f_library:R_0603_1608Metric | R8, R9, R10, R11 |
| 4 | MountingHole_2mm | MountingHole:MountingHole_2mm | h1, h2, h3, h4 |
| 3 | 1u | ce140f_library:C_0603_1608Metric | C8, C12, C14 |
| 3 | 22 | ce140f_library:R_0603_1608Metric | R13, R15, R16 |
| 3 | 4u7 | ce140f_library:C_0603_1608Metric | C1, C10, C11 |
| 2 | 10k | ce140f_library:R_0603_1608Metric | R1, R5 |
| 2 | 10p | ce140f_library:C_0603_1608Metric | C2, C6 |
| 2 | 2K2 | ce140f_library:R_0603_1608Metric | R6, R7 |
| 2 | Blue | LED_SMD:LED_0603_1608Metric | D2, D3 |
| 1 | 100R | Inductor_SMD:L_0805_2012Metric | FB1 |
| 1 | 27n | Inductor_SMD:L_0603_1608Metric | L1 |
| 1 | 32.768KHz | Crystal:Crystal_SMD_5032-2Pin_5.0x3.2mm | Y1 |
| 1 | 5V_VGG | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP3 |
| 1 | 5V_VPP | Jumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mm | JP2 |
| 1 | BOOT0 | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | BOOT0 |
| 1 | Battery | Connector_Wire:SolderWire-0.5sqmm_1x02_P4.6mm_D0.9mm_OD2.1mm | BATT |
| 1 | MCP73831 | Package_TO_SOT_SMD:SOT-23-5 | U4 |
| 1 | Micro_SD_Card_Det | Connector_Card:microSD_HC_Molex_104031-0811 | J4 |
| 1 | PCM12SMTR | ce140f_library:PCM12SMTR | ON |
| 1 | STM32L432KCUx | Package_DFN_QFN:QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm | U2 |
| 1 | SWD | Connector_PinHeader_1.27mm:PinHeader_2x05_P1.27mm_Vertical_SMD | SWD |
| 1 | Sharp PC 11-pin | Connector_PinHeader_2.54mm:PinHeader_1x11_P2.54mm_Horizontal | Sharp 11-PIN |
| 1 | TXS0108EPW | Package_SO:TSSOP-20_4.4x6.5mm_P0.65mm | U1 |
| 1 | USB_B_Micro | Connector_USB:USB_Micro-B_Molex_47346-0001 | USB |
| 1 | XC6206P332MR | Package_TO_SOT_SMD:SOT-23 | U5 |
| 1 | ext pins | Connector_Wire:SolderWire-0.5sqmm_1x02_P4.6mm_D0.9mm_OD2.1mm | J1 |
| 1 | green | LED_SMD:LED_0603_1608Metric | D1 |
| 1 | red | LED_SMD:LED_0603_1608Metric | D4 |

ffxx68/Sharp_ce140f_emul
At the time (I'm talking about mid '80s early '90s), what I thought my Sharp-PC was missing the most was a convenient way to store and load programs.

jayis1/hacker-devices
Full-cycle hardware designs for security research devices — each device is a subfolder with its own README, schematics, PCB layout, and software stack

Danzibob/Titania3
The project goal is to create a datalogger small and light enough for an 18mm A8-3 rocket, but capable enough to use as a backup logger for mid and high power flights.

klouderone/CorneV4ProMicroEdition
The Corne V4 with Pro Micro Micocontrollers, made specifically for beginners and support for wireless microcontrollers

Goga64/ULK
Low profile split keyboard with Corne 42 Layout and Cerry ULP switches. (6mm height)

klouderone/SeagullMacropad
The Seagull Macropad is based off the Rhino Pad, that supports both MX and Choc switches. The Macropad features an aesthetic but functional diode layout, an encoder, and pads for a battery and battery switch for…

tedraykov/spliteo
Ergonomic split keyboard with a 3x6 matrix layout and a 4 key thumb cluster.

klouderone/Kiwi36-Split
A 36 Key Split Keyboard for beginners packed full of features, such as USB-C interconnect, an extensive case library, and wireless support

klouderone/therhinopad
The Rhino Pad is a compact Macro Pad tailored for Computer-Aided Drawing, with 13 keys and an encoder that can be programmed for any macro in your program.
It measures 64.4 × 42.2 mm and has 2 copper layers, 1.6 mm thick.
54 parts, built around the MCP73831, TXS0108EPW, XC6206P332MR and PCM12SMTR. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the ffxx68/Sharp_ce140f_emul repository on GitHub, at the commit this page was made from: the board is KiCad_v2/sharp-ce140f-emul_v2.kicad_pcb and its schematic KiCad_v1/level_converter.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask ffxx68 before reusing the design.