Free PDK Documentation
Free PDK is an open sourced and independently created tool-chain for the Padauk 8-Bit Microcontrollers, created as an alternative to the proprietary and closed tools provided by the Taiwanese company itself.
This includes the EasyPDKProg µC programmer hardware, adding support for the Padauk µCs to the SDCC C-Compiler, as well as comprehensive documentation of the instruction set architecture, and code examples.
The main focus is on supporting µCs of two Padauk series:
- M series OTP (OTP = one time programmable)
- F series MTP (MTP = multiple time programmable)
Padauk µCs are extremely inexpensive, priced as low as $0.03/pc in volumes of 100, which is why they generated a lot of interest after being featured by Dave from the EEVblog (first video and a bunch of follow-up videos). Despite the low price, it was found that the Padauk µCs sport an interesting architecture that can be a seen as a significant and meaningful extension of the Microchip PIC architecture. There is an extensive and active discussion on the EEVblog forum for this project and further discussion here on µC.net (German).
This page provides an overview of the different sub-projects created in the free-pdk GitHub organization. It also provides custom pinout diagrams for some of the Padauk µCs.
Easy PDK Programmer
Padauk µCs are programmed via a proprietary high-voltage protocol. The protocol was reverse engineered and a fully open source programmer that already supports almost two dozen Padauk µCs has been created. All sources for the programmer are available at:
SDCC-based Open Source Tool-Chain
Padauk’s own tool-chain is based on a custom programming language called “Mini-C” with a syntax based on the C-language. This language is only supported by their own tool-chain, including IDE (“Padauk Developer Studio”) and programmer (“Writer”). The tool-chain also uses a custom binary format with encryption/obfuscation. Should you be interested in code samples in that custom language, take a look at free-pdk/fppa-code-examples.
The open source tool-chain is based on the Small Device C-Compiler (SDCC) and therefore does support Standard C and common binary output formats (intel hex and bin), including those used by the Easy PDK Programmer.
Please note that right now there is no interchangeability between both tool-chains. Binaries generated by SDCC cannot be written by the official Padauk programmer, but only by the Easy PDK Programmer.
Padauk µCs use different kinds of instruction sets: 13, 14, 15, or 16 bit (more information on these instruction sets can be found below). Support for the 14 and 15 bit Padauk instruction sets has been added to SDCC, a C compiler for small devices. Support for the 13 bit Padauk instruction set is being worked on.
Helpful SDCC resources:
- SDCC Documentation
- Open bugs in the Padauk integration
- Feature Requests related to the Padauk integration
Installing SDCC
The latest binaries and sources of SDCC can be obtained on the SDCC website. If SDCC is available via your operating system’s package manager, please ensure that it is at least SDCC 4.0.0; older versions may not have support or only limited support for the Padauk µC.
µC-specific Information and Pinouts
Note: Other µCs than the µCs listed here may be supported. If you want to learn more about the naming scheme, read more here.
MTP (Flash) Variants
MCU | OSS Status | Arch. | max IO | ROM | RAM | Timers | PWM | CMP | ADC | Special | Padauk Links |
---|---|---|---|---|---|---|---|---|---|---|---|
PFS122 | Supported (beta) |
PDK14 | 14 |
2 KW |
128 | T16 T2 T3 |
2x 8‑Bit | 1 | 12‑Bit |
Product Page
Datasheet |
|
PFS154 | Supported | PDK14 | 14 |
2 KW |
128 | T16 T2 T3 |
2x 8‑Bit 3x 11‑Bit |
1 | ‑ | LCD |
Product Page
Datasheet |
PFS172 | Supported Legacy device |
PDK14 | 14 |
2 KW |
128 | T16 T2 T3 |
2x 8‑Bit | 1 | 8‑Bit |
Product Page
Datasheet |
|
PFS173 | Supported Legacy device |
PDK15 | 18 |
3 KW |
256 | T16 T2 T3 |
2x 8‑Bit 3x 11‑Bit |
1 | 8‑Bit | LCD |
Product Page
Datasheet |
OTP Variants
MCU | OSS Status | Arch. | max IO | ROM | RAM | Timers | PWM | CMP | ADC | Special | Padauk Links |
---|---|---|---|---|---|---|---|---|---|---|---|
PMS150C | Supported | PDK13 | 6 |
1 KW |
64 | T16 T2 |
1x 8‑Bit | 1 | ‑ | - |
Product Page
Datasheet |
PMS15A | Supported | PDK13 | 6 |
0.5 KW |
64 | T16 T2 |
1x 8‑Bit | 1 | ‑ | - |
Product Page
Datasheet |
PMS152 | Supported | PDK14 | 14 |
1.25 KW |
80 | T16 T2 |
1x 8‑Bit 3x 11‑Bit |
1 | ‑ | - |
Product Page
Datasheet |
PMS154C | Supported | PDK14 | 14 |
2 KW |
128 | T16 T2 T3 |
2x 8‑Bit 3x 11‑Bit |
1 | ‑ | LCD |
Product Page
Datasheet |
PMS171B | Supported | PDK14 | 14 |
1.5 KW |
96 | T16 T2 T3 |
2x 8‑Bit | 1 | 8‑Bit | - |
Product Page
Datasheet |
Evaluation Boards
These are evaluation boards for the online-programmable MTP (as opposed to the OTP parts, which can only be programmed offline and once) Padauk µC. free-pdk/f-eval-boards.
Instruction Sets, Opcodes, and Programming Sequence
The different Padauk µCs use either 13, 14, 15, or 16 bit instruction sets. The following files provide an overview over the different instruction sets.
More information, including information on the programming sequence, can be found at free-pdk/fppa-pdk-documentation
Other Tools
-
Schematic Symbols: A collection of schematic symbols for many of the Padauk µCs.
- gEDA gschem: free-pdk/pdk-gschem-symbols
- KiCad: free-pdk/pdk-kicad-symbols
- Padauk µC Emulator written in VHDL: This project aims to provide a fully functional, timing accurate VHDL model for simulating PADAUK FPPA microcontrollers. free-pdk/fppa-pdk-emulator-vhdl
- A bunch more tools are located at
free-pdk/fppa-pdk-tools.
- Disassembler: dispdk supports 13 bit, 14 bit, 15 bit and 16 bit opcodes
- Emulator: emupdk supports 14 bit opcodes, no peripheral support yet requires mapping of processor ID in emucpu.c
- PDK converter: depdk convert/deobfuscate any PDK file to binary
Projects from the Community
These projects are auto-populated once per day by
searching GitHub for repositories with the padauk
topic.
Projects that additionally have the free-pdk
topic are highlighted as
Uses Free PDK toolchain.
Projects that contain .PRE
files are marked as
Uses proprietary toolchain.
Latest Activity
The latest activity in the free-pdk
GitHub organization is fetched at least once per day and displayed below.
@cpldcpu commented on issue
free-pdk/easy-pdk-programmer-hardware#25
DAC buffering
@freepdk Was it a conscious design decision to not enable the DAC buffer?
@mzhboy commented on issue
free-pdk/easy-pdk-programmer-hardware#25
DAC buffering
https://github.com/free-pdk/easy-pdk-programmer-software/blob/cdc40ae65f85c1ed93f304f5008c6b9b6c5c0043/Firmware/source/Src/stm32f0xx_hal_msp.c?plain=1#L162
@spth commented on issue
free-pdk/free-pdk-examples#16
Bug in ReadButton_WriteLED and ReadButton_WriteSerial
If you prefer the old ways: you can also attach a patch to a message here.
@jjflash65 commented on issue
free-pdk/free-pdk-examples#16
Bug in ReadButton_WriteLED and ReadButton_WriteSerial
> Hi JJ, can you submit a pull request, if you already found the solution?
Hi cpldcpu, as you know, I'm not the "hero" in english language and I'm surely not the "hero" by doing things in github (and shame on me: I don't know how to do a pull request in github). The solution to the bug is given in the posting (writing the value tu a global variable, do a read-modify-writeback operation to the variable and write the variable value to PADIER / PBDIER).
@kibix commented on issue
free-pdk/easy-pdk-programmer-software#72
pfs122 write error
Cool, if you need any help please let me know
@cpldcpu commented on issue
free-pdk/free-pdk-examples#16
Bug in ReadButton_WriteLED and ReadButton_WriteSerial
Hi JJ, can you submit a pull request, if you already found the solution?
@cpldcpu commented on issue
free-pdk/easy-pdk-programmer-software#62
PMS171B RSP 0xe360 not 0xd360
Have you verified the new ID? Would be great if you could commit a pull request.
@spth commented on issue
free-pdk/easy-pdk-programmer-software#86
PMS152G and PMS152E support
Well, from their titles they're clearly feature requests. I don't think anyone will mistake them for bug reports. They don't have bug tags either.
- 502e2e8 Add PFS122 documentation and update legacy status formatting for PFS172 and PFS173
- cdf8433 Update PFS172 and PFS173 documentation to indicate legacy status and potential replacements
@cpldcpu commented on issue
free-pdk/easy-pdk-programmer-software#72
pfs122 write error
I have some devices now, will hope get around checking this.
@cpldcpu commented on issue
free-pdk/easy-pdk-programmer-software#86
PMS152G and PMS152E support
I am a bit worried that all these issues are detracting from the actual issues. Because these are in fact feature requests. Is it ok if I move them to the discussions? People will think this project is abandoned is so many unresolved issues are stacked.
We could leave some issues open for devices that are requested more often, e.g. PFS132. Although that is one device I cannot find at LCSC.
@dw5304 commented on issue
free-pdk/easy-pdk-programmer-software#81
PFS154-s08 serial helloworld
No output at all as far as I can. Tell?
@spth commented on issue
free-pdk/easy-pdk-programmer-software#86
PMS152G and PMS152E support
I hope to find some time to look into the Padauk devices a bit again from the second half of August. Beside working on a basic pdk16 SDCC port, that could include looking into adding support for a few devices to easypdkprog.
@spth commented on issue
free-pdk/easy-pdk-programmer-software#86
PMS152G and PMS152E support
IMO, it is better to have individual issues for the devices. They can be closed individually. I think having all devices in one issue that issue would get overwhelmed, and soon, one couldn't make much sense anymore of which devices have been requested for what reason or haven't.
@cpldcpu commented on pull request
free-pdk/easy-pdk-programmer-software#74
Fixed command for installing linux udev rule
looks good. Thanks!
@cpldcpu commented on issue
free-pdk/easy-pdk-programmer-software#81
PFS154-s08 serial helloworld
Its a bit unclear: Is the timing incorrect or is there no output at all?
@cpldcpu commented on issue
free-pdk/easy-pdk-programmer-software#86
PMS152G and PMS152E support
Just an idea: We could add a poll here:
https://github.com/free-pdk/easy-pdk-programmer-software/discussions/new?category=polls
@cpldcpu commented on issue
free-pdk/easy-pdk-programmer-software#86
PMS152G and PMS152E support
Does it really make sense to add all of these devices as individual issues? Maybe one issue with a priorization table?
I would assume that most people who are interested in this toolchain buy their devices at LCSC. So, supporting devices that are not obtainable there is probably lower priority.
Then, the question is who is going to add the support? JS seems to be inactive.
I would also like to point out that there are still issue with compatibility breaking in SDCC and incompatibilites to some examples here in the repo.
Checkout /doc-style for more information on some of the special Markdown formatting features we use.