Reverse engineering the writer firmware might be a good idea, but to be sure maybe would be good to record a programming sequence as well.
I did some tests. I have only some free PMC884 samples at the moment which Padauk sent me. I also bought some PMS150C chips from lcsc.com, as recommended by Padauk, but needs some time until I get them.
First I programmed a blinky program, with all 8 FFPAs and different output frequencies. This is the main file (full project is attached) :
// define pin names
Out0 BIT PB.0;
Out1 BIT PB.1;
Out2 BIT PB.2;
Out3 BIT PB.3;
Out4 BIT PB.4;
Out5 BIT PB.5;
Out6 BIT PB.6;
Out7 BIT PB.7;
// FPPA0 is started first
void FPPA0 (void)
{
.ADJUST_IC SYSCLK=IHRC/2, IHRC=16MHz, VDD=5V, Bandgap=On;
// set pins to output
$ Out0 High, Out;
$ Out1 High, Out;
$ Out2 High, Out;
$ Out3 High, Out;
$ Out4 High, Out;
$ Out5 High, Out;
$ Out6 High, Out;
$ Out7 High, Out;
// see datasheet "pmode": FPPA duty cycle, 1/8 for all 8 FPPAs
pmode 31;
// enable all FPPAs
fppen = 0xFF;
// generate test output
while (1) {
Out0 = 0;
.delay 1;
Out0 = 1;
.delay 1;
}
}
void FPPA1 (void)
{
// generate test output
while (1) {
Out1 = 0;
.delay 10;
Out1 = 1;
.delay 10;
}
}
void FPPA2 (void)
{
// generate test output
while (1) {
Out2 = 0;
.delay 100;
Out2 = 1;
.delay 100;
}
}
void FPPA3 (void)
{
// generate test output
while (1) {
Out3 = 0;
.delay 1000;
Out3 = 1;
.delay 1000;
}
}
void FPPA4 (void)
{
// generate test output
while (1) {
Out4 = 0;
.delay 10000;
Out4 = 1;
.delay 10000;
}
}
void FPPA5 (void)
{
// generate test output
while (1) {
Out5 = 0;
.delay 100000;
Out5 = 1;
.delay 100000;
}
}
void FPPA6 (void)
{
// generate test output
while (1) {
Out6 = 0;
.delay 1000000;
Out6 = 1;
.delay 1000000;
}
}
void FPPA7 (void)
{
// generate test output
while (1) {
Out7 = 0;
.delay 10000000;
Out7 = 1;
.delay 10000000;
}
}
/*
void Interrupt (void)
{
pushaf;
if (Intrq.T16)
{ // T16 Trig
// User can add code
Intrq.T16 = 0;
//...
}
popaf;
}
*/
I measured the following frequencies (AVDD needs to be connected as well, otherwise looks like the internal oscillator doesn't run) :
PB0: 203 kHz
PB1: 44 kHz
PB2: 5 kHz
PB3: 508 Hz
PB4: 50.8 Hz
PB5: 5.08 Hz
PB6: 0.5 Hz
PB7: 0.05 Hz
Nice about the PMC884 is that you can select the duty cycle scheme, e.g. if you want to run FFPA0 more than the other FFPAs. So this was just a first test to see if everything works.
Then I tried to measure the programming signals (as David already noted in his video, you can program the OTP chip as often as you want, if it is the same bitstream). But connecting GND of the scope to the GND pin of the microcontroller was not a good idea, because the programmer tests all pins for shorts and then doesn't start the programming sequence. But here is a nice GND point near the jumpers at the back:
Then I measured some pins. In David's video it was difficult or impossible to see the timescale. Here is an example for pin 3, this time with proper time scale, for the whole programming cycle:
This is a data pin. Pin 19 is a clock pin. When I zoom in, it looks like this:
Looks like about 1 us is the shortest signal length. Might be good to sample it with 10 MHz for higher resolution.
I don't know how many signals I need to scan in parallel, 2 might be enough with multiple passes, but maybe 4 would be better and easier to analyze later. If I use an 8 bit ADC, this would mean a data rate of 320 Mbits/s. Might be possible with high speed USB to transfer it in realtime on a PC. As you can see in the first scope image, the whole programming cycle needs about 800 ms (the spikes before and after are the detection of the programmer if there is a chip, which does it all the time). So a full sample with 4 channels would need only 32 MB. This could be even done with a BeagleBone and its PRUs, a simple external board with 4 ADCs and input stages for dividing the input voltage, and then recording it to memory.
But I don't have much time at the moment to build the board and program the Beagle Bone. Is there already such a thing I can buy, which records 4 channels with 8 bit at 10 MHz for 1 second?
PS: Anyone who wants to swap some PMS150C (or other Padauk) chips for PMC884? I have 100 x PMC884.
Here is the datasheet.