Author Topic: EEVblog #1144 - Padauk Programmer Reverse Engineering  (Read 396317 times)

0 Members and 3 Guests are viewing this topic.

Offline socram

  • Regular Contributor
  • *
  • Posts: 72
  • Country: es
    • orca.pet
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #250 on: December 25, 2018, 09:52:30 pm »
Then, it does two writes:
Code: [Select]
    737022: FLASH_WRITE_B

            ADDR -W1- -W2- -W3- -W4-
            ------------------------
            07F0 0004 3FFF 3FFF 3FFF

    820818: FLASH_WRITE_B

            ADDR -W1- -W2- -W3- -W4-
            ------------------------
            07F0 3FFF 0004 3FFF 3FFF

This looks pretty normal. To understand this you must know how a OTP / flash write is usually working.

Blank IC / After Erase => all memory cells are holding a '1' bit value
Programing = change some of the '1' bits to '0' bits. You only can change '1' to '0' not the other way around. If you want to write something new you must erase the chip first (is possible) which makes *ALL* memory cells to a '1'.

So
- writing '11111111' somewhere does in reality: NOTHING (all stays same, you can do this as many times as you want)
- writing '0' somewhere changes this bit to '0'. If you later write a '1' it will do NOTHING (the 0 will stay).


==> Since the IC seems to require to write 4 WORDS at once a simple solution just to write 1 WORD or even only some bits from it is to write the unused WORDS with all '1'.
- writing "ABCD 3FFF 3FFF 3FFF" only will change the first word
- writing "3FFF EFGH 3FFF 3FFF" only will change the second word

==> It looks like WRITER just wants to write 2 WORDS in 2 single operations.

JS
My point was that before the mysterious commands, 07F0 held 0003 and 07F1 held 0003. After them, they seem to held FFFF, which are subsequently changed into 0004 by those two writes.

However, you can see on 949230: FLASH_READ_B, that 07ED holds 0281. This means that "66" followed by four 0 bits, or "31" doesn't actually wipe all the flash, but if it actually actually wipes anything, it only clears a few bytes.
 

Offline socram

  • Regular Contributor
  • *
  • Posts: 72
  • Country: es
    • orca.pet
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #251 on: December 25, 2018, 10:37:24 pm »
EDIT2: I don't know how to use the ZEROPLUS tool, so I don't really know how to see the VPP voltages.

I grouped the 2 channels into a bus each (VDD_AN and PA5_ICVPP_AN, bottom of Zero Plus) which decodes to decimal values (right click on the hex values and select "Numeric Base->Decimal").

In case you want to do it manually:
C0...C7 = 8 bit of analog value VDD_AN (in 100mV, ==> 30 decimal = 3.0V, 45 decimal = 4.5V, ...)
D0...D7 = 8 bit of analog value PA5_ICVPP_AN


example line from text export:


         PA0_UNUSED   | Bus1           *VDD*SCLK*DATA PA4  PA5 PA7  GND   | VDD_AN              *C0...*C7  | PA5_ICVPP_AN  *D0...*D7   

91330            0    | Data=0X1F             1   0   0   0   1   0   0   | 0X2B                  11010100 | 0X38           00011100


VDD_AN = 11010100 = 0x2B = 43 ==> 4.3V
PA5_ICVPP_AN = 00011100 = 0x38 = 56 ==> 5.6V

 :)

JS

Thanks. It seems that all commands are sent to the microcontroller with VDD 2.6V and VPP 5.6V.

After sending the command with those voltages:
  • For command 30 (possibly thus flash erase, though I still don't understand why parts aren't being erased), VDD is lowered further to 1.6V and VPP is raised to 8.3V. The four zeros seem to be very, very slow clocked, so I'm not even sure if it's data or just garbage in the lines.
  • For flash writes, VDD is kept at 2.6V and VPP is raised to 8.3V
  • For flash reads, VDD is raised to 5.6V and VPP is kept at 5.6V
 

Offline js_12345678_55AA

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #252 on: December 25, 2018, 10:45:15 pm »
My point was that before the mysterious commands, 07F0 held 0003 and 07F1 held 0003. After them, they seem to held FFFF, which are subsequently changed into 0004 by those two writes.

However, you can see on 949230: FLASH_READ_B, that 07ED holds 0281. This means that "66" followed by four 0 bits, or "31" doesn't actually wipe all the flash, but if it actually actually wipes anything, it only clears a few bytes.

Ok, got it now.

I think I know what it is... In WRITER I found a string telling the user that the flash chip is "overused" (when erased >1000 times).

So best guess is that they write the use count there. To be sure the value is always written correctly (not failed when power is lost during writing) they do it in 2 writes updating the 2 value.

 :)

Using "PADAUK-P-003-PFS154_SimpleBlink_NoPinCheck.txt" as example:

   55103: FLASH_READ_A

            ADDR DATA ?
            -----------
            07EF 1FFE 0
            07F0 0003 0
            07F1 0003 1

==> use count = 3

92201: ??? (1010010110100101101001011010001100011010101000010)
158597: ??? (1010010110100101101001011010011001111010101000010)
one of those is ERASE

    737022: FLASH_WRITE_B

            ADDR -W1- -W2- -W3- -W4-
            ------------------------
            07F0 0004 3FFF 3FFF 3FFF

    820818: FLASH_WRITE_B

            ADDR -W1- -W2- -W3- -W4-
            ------------------------
            07F0 3FFF 0004 3FFF 3FFF

949230: FLASH_READ_B

            ADDR DATA ?
            -----------
            07E0 3FFF 0
            07E1 1FFF 0
            07E2 1FFF 1
            07E3 1FFF 1
            07E4 3FFF 1
            07E5 1FFF 1
            07E6 1FFF 1
            07E7 1FFF 1
            07E8 3FFF 1
            07E9 1FFF 1
            07EA 1FFF 1
            07EB 3FFF 1
            07EC 3FFF 1
            07ED 0281 1
            07EE 027A 1
            07EF 1FFE 0
            07F0 0004 0
            07F1 0004 1
            07F2 3FFF 0
            07F3 3FFF 0
            07F4 3FFF 1
            07F5 3FFF 1
            07F6 3FFF 1
            07F7 3FFF 1
            07F8 1FFF 1
            07F9 3FFF 1
            07FA 1FFF 1
            07FB 3FFF 1
            07FC 1FFF 1
            07FD 3FFF 1
            07FE 1FFF 1
            07FF 3FFF 1

==> now use count is 4

BTW: This 0x1FFF read backs are for sure not correct. I know for sure that 0x3FFF is at most places there (in a previous posting I used LDSPTL/LDSPTH and soft SPI to read back the content of a real IC).

JS
« Last Edit: December 25, 2018, 10:50:55 pm by js_12345678_55AA »
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline js_12345678_55AA

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #253 on: December 25, 2018, 10:56:36 pm »
Hi,

  92201: ? ? ? (1010010110100101101001011010 00110001 1010101000010) => 0x31
158597: ? ? ? (1010010110100101101001011010 01100111 1010101000010) => 0x67

I still think command 31 is ERASE. Then WRITER waits internally some time doing nothing (assuming erase takes time) and then WRITER sends 0x67 (GET_STATUS or WAIT_FOR_ERASE_FINISH or ...) to find out if the erase finished for sure.


JS
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline js_12345678_55AA

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #254 on: December 25, 2018, 11:14:06 pm »
My point was that before the mysterious commands, 07F0 held 0003 and 07F1 held 0003. After them, they seem to held FFFF, which are subsequently changed into 0004 by those two writes.
However, you can see on 949230: FLASH_READ_B, that 07ED holds 0281. This means that "66" followed by four 0 bits, or "31" doesn't actually wipe all the flash, but if it actually actually wipes anything, it only clears a few bytes.

I think those values (0x7ED, 0x7EE) might be FIXED for IC identification??. So they just can not get erased.

JS
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline socram

  • Regular Contributor
  • *
  • Posts: 72
  • Country: es
    • orca.pet
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #255 on: December 25, 2018, 11:59:15 pm »
BTW: This 0x1FFF read backs are for sure not correct. I know for sure that 0x3FFF is at most places there (in a previous posting I used LDSPTL/LDSPTH and soft SPI to read back the content of a real IC).
I am not sure, but it could be possible that data from writer to IC is sampled on the rising edge, but on the falling edge for the IC? maybe that's why I'm getting those weird, useless trailing bits and why they are sometimes read as 1FFF instead of 3FFF.
I think those values (0x7ED, 0x7EE) might be FIXED for IC identification??. So they just can not get erased.
That actually makes sense.
 

Offline socram

  • Regular Contributor
  • *
  • Posts: 72
  • Country: es
    • orca.pet
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #256 on: December 26, 2018, 01:40:49 am »
So apparently yes, the data from writer to IC gets sampled on rising edge, but from IC to writer gets sampled on the falling edge.

If we parse "Verify" on the falling edge we get:
Code: [Select]
    804582: FLASH_READ_A_N2

            ADDR DATA ?
            -----------
            0000 0060 0
            0001 1F00 0
            0002 0300 0
            0003 3FFA 0
            0004 0306 0
            0005 3FFC 1
            0006 0330 0
            0007 1F80 1
            0008 03B2 0
            0009 0E38 0
            000A 0302 0
            000B 3FFC 0
            000C 07FF 0
            000D 20E0 1
            000E 3FD8 0
            000F 1783 1
            0010 1F23 1
            0011 1E0B 0
            0012 1781 1
            0013 3C80 0
            0014 2023 0
            0015 1F01 1
            0016 00C3 1
            0017 300C 1
            0018 0180 0
            0019 2037 1
            001A 1F90 1
            001B 11D0 1
            001C 301B 1
            001D 2E03 1
            001E 19C0 1
            001F 2FFE 0
            0020 0C03 1
            0021 038F 0
            0022 0381 0
            0023 13F0 0
            0024 3022 0
            0025 3FC0 1
            0026 300F 1
            0027 2F0D 1
            0028 0118 1
            0029 3890 0
            002A 303B 0
            002B 2E00 1
            002C 0386 1
            002D 360C 0
            002E 230C 0
            002F 1EDF 1
            0030 1785 1
            0031 1F00 0
            0032 1F06 0
            0033 000C 0
            0034 1708 0
            0035 000E 0
            0036 100A 0
            0037 2B08 0
            0038 2D0A 0
            0039 2000 1
            003A 2405 1
            003B 2103 1
            003C 3481 1
            003D 2027 1
            003E 3F21 1
            003F 3DA1 1
            0040 207F 1
            0041 3B0D 1
            0042 250B 1
            0043 0B21 1
            0044 38A1 1
            0045 2008 0
            0046 3231 1
            0047 203F 1
            0048 3921 1
            0049 3C81 1
            004A 2001 1
            004B 31E1 1
            004C 2007 1
            004D 3F81 1
            004E 2047 1
            004F 3881 1
            0050 201F 1
            0051 3F81 1
            0052 2023 1
            0053 20B7 1
            0054 0197 1
            0055 1FE3 1
            0056 1EC0 0
            0057 3E03 1
            0058 0F83 1
            0059 2F82 0
            005A 03C0 0
            005B 2E16 0
            005C 0063 0
            005D 301C 0
            005E 03C0 0
            005F 30D8 1
            0060 11C3 1
            0061 30D8 1
            0062 3C90 1
            0063 2F03 1
            0064 1BC3 1
            0065 2F8E 0
            0066 0FC0 0
            0067 2E76 0
            0068 0062 0
            0069 3078 0
            006A 2380 0
            006B 30F8 1
            006C 2381 1
            006D 30F9 1
            006E 303F 1
            006F 3FFF 1
            0070 3FFF 1
            0071 3FFF 1
            0072 3FFF 1
            0073 3FFF 1
            0074 3FFF 1
            0075 3FFF 1
            0076 3FFF 1
            0077 3FFF 1
            0078 3FFF 1
            0079 3FFF 1
            007A 3FFF 1
            007B 3FFF 1
            007C 3FFF 1
            007D 3FFF 1
            007E 3FFF 1
            007F 3FFF 1
            0080 3FFF 1
            0081 3FFF 1
            0082 3FFF 1
            0083 3FFF 1
            0084 3FFF 1
            0085 3FFF 1
            0086 3FFF 1
            0087 3FFF 1
            0088 3FFF 1
            0089 3FFF 1
            008A 3FFF 1
            008B 3FFF 1
            008C 3FFF 1
            008D 3FFF 1
            008E 3FFF 1
            008F 3FFF 1
            0090 3FFF 1
            0091 3FFF 1
            0092 3FFF 1
            0093 3FFF 1
            0094 3FFF 1
            0095 3FFF 1
            0096 3FFF 1
            0097 3FFF 1
            0098 3FFF 1
            0099 3FFF 1
            009A 3FFF 1
            009B 3FFF 1
            009C 3FFF 1
            009D 3FFF 1
            009E 3FFF 1
            009F 3FFF 1
            00A0 3FFF 1
            00A1 3FFF 1
            00A2 3FFF 1
            00A3 3FFF 1
            00A4 3FFF 1
            00A5 3FFF 1
            00A6 3FFF 1
            00A7 3FFF 1
            00A8 3FFF 1
            00A9 3FFF 1
            00AA 3FFF 1
            00AB 3FFF 1
            00AC 3FFF 1
            00AD 3FFF 1
            00AE 3FFF 1
            00AF 3FFF 1
            00B0 3FFF 1
            00B1 3FFF 1
            00B2 3FFF 1
            00B3 3FFF 1
            00B4 3FFF 1
            00B5 3FFF 1
            00B6 3FFF 1
            00B7 3FFF 1
            00B8 3FFF 1
            00B9 3FFF 1
            00BA 3FFF 1
            00BB 3FFF 1
            00BC 3FFF 1
            00BD 3FFF 1
            00BE 3FFF 1
            00BF 3FFF 1
            00C0 3FFF 1
            00C1 3FFF 1
            00C2 3FFF 1
            00C3 3FFF 1
            00C4 3FFF 1
            00C5 3FFF 1
            00C6 3FFF 1
            00C7 3FFF 1
            00C8 3FFF 1
            00C9 3FFF 1
            00CA 3FFF 1
            00CB 3FFF 1
            00CC 3FFF 1
            00CD 3FFF 1
            00CE 3FFF 1
            00CF 3FFF 1
            00D0 3FFF 1
            00D1 3FFF 1
            00D2 3FFF 1
            00D3 3FFF 1
            00D4 3FFF 1
            00D5 3FFF 1
            00D6 3FFF 1
            00D7 3FFF 1
            00D8 3FFF 1
            00D9 3FFF 1
            00DA 3FFF 1
            00DB 3FFF 1
            00DC 3FFF 1
            00DD 3FFF 1
            00DE 3FFF 1
            00DF 3FFF 1
            00E0 3FFF 1
            00E1 3FFF 1
            00E2 3FFF 1
            00E3 3FFF 1
            00E4 3FFF 1
            00E5 3FFF 1
            00E6 3FFF 1
            00E7 3FFF 1
            00E8 3FFF 1
            00E9 3FFF 1
            00EA 3FFF 1
            00EB 3FFF 1
            00EC 3FFF 1
            00ED 3FFF 1
            00EE 3FFF 1
            00EF 3FFF 1
            00F0 3FFF 1
            00F1 3FFF 1
            00F2 3FFF 1
            00F3 3FFF 1
            00F4 3FFF 1
            00F5 3FFF 1
            00F6 3FFF 1
            00F7 3FFF 1
            00F8 3FFF 1
            00F9 3FFF 1
            00FA 3FFF 1
            00FB 3FFF 1
            00FC 3FFF 1
            00FD 3FFF 1
            00FE 3FFF 1
            00FF 3FFF 1
            0100 3FFF 1
            0101 3FFF 1
            0102 3FFF 1
            0103 3FFF 1
            0104 3FFF 1
            0105 3FFF 1
            0106 3FFF 1
            0107 3FFF 1
            0108 3FFF 1
            0109 3FFF 1
            010A 3FFF 1
            010B 3FFF 1
            010C 3FFF 1
            010D 3FFF 1
            010E 3FFF 1
            010F 3FFF 1
            0110 3FFF 1
            0111 3FFF 1
            0112 3FFF 1
            0113 3FFF 1
            0114 3FFF 1
            0115 3FFF 1
            0116 3FFF 1
            0117 3FFF 1
            0118 3FFF 1
            0119 3FFF 1
            011A 3FFF 1
            011B 3FFF 1
            011C 3FFF 1
            011D 3FFF 1
            011E 3FFF 1
            011F 3FFF 1
            0120 3FFF 1
            0121 3FFF 1
            0122 3FFF 1
            0123 3FFF 1
            0124 3FFF 1
            0125 3FFF 1
            0126 3FFF 1
            0127 3FFF 1
            0128 3FFF 1
            0129 3FFF 1
            012A 3FFF 1
            012B 3FFF 1
            012C 3FFF 1
            012D 3FFF 1
            012E 3FFF 1
            012F 3FFF 1
            0130 3FFF 1
            0131 3FFF 1
            0132 3FFF 1
            0133 3FFF 1
            0134 3FFF 1
            0135 3FFF 1
            0136 3FFF 1
            0137 3FFF 1
            0138 3FFF 1
            0139 3FFF 1
            013A 3FFF 1
            013B 3FFF 1
            013C 3FFF 1
            013D 3FFF 1
            013E 3FFF 1
            013F 3FFF 1
            0140 3FFF 1
            0141 3FFF 1
            0142 3FFF 1
            0143 3FFF 1
            0144 3FFF 1
            0145 3FFF 1
            0146 3FFF 1
            0147 3FFF 1
            0148 3FFF 1
            0149 3FFF 1
            014A 3FFF 1
            014B 3FFF 1
            014C 3FFF 1
            014D 3FFF 1
            014E 3FFF 1
            014F 3FFF 1
            0150 3FFF 1
            0151 3FFF 1
            0152 3FFF 1
            0153 3FFF 1
            0154 3FFF 1
            0155 3FFF 1
            0156 3FFF 1
            0157 3FFF 1
            0158 3FFF 1
            0159 3FFF 1
            015A 3FFF 1
            015B 3FFF 1
            015C 3FFF 1
            015D 3FFF 1
            015E 3FFF 1
            015F 3FFF 1
            0160 3FFF 1
            0161 3FFF 1
            0162 3FFF 1
            0163 3FFF 1
            0164 3FFF 1
            0165 3FFF 1
            0166 3FFF 1
            0167 3FFF 1
            0168 3FFF 1
            0169 3FFF 1
            016A 3FFF 1
            016B 3FFF 1
            016C 3FFF 1
            016D 3FFF 1
            016E 3FFF 1
            016F 3FFF 1
            0170 3FFF 1
            0171 3FFF 1
            0172 3FFF 1
            0173 3FFF 1
            0174 3FFF 1
            0175 3FFF 1
            0176 3FFF 1
            0177 3FFF 1
            0178 3FFF 1
            0179 3FFF 1
            017A 3FFF 1
            017B 3FFF 1
            017C 3FFF 1
            017D 3FFF 1
            017E 3FFF 1
            017F 3FFF 1
            0180 3FFF 1
            0181 3FFF 1
            0182 3FFF 1
            0183 3FFF 1
            0184 3FFF 1
            0185 3FFF 1
            0186 3FFF 1
            0187 3FFF 1
            0188 3FFF 1
            0189 3FFF 1
            018A 3FFF 1
            018B 3FFF 1
            018C 3FFF 1
            018D 3FFF 1
            018E 3FFF 1
            018F 3FFF 1
            0190 3FFF 1
            0191 3FFF 1
            0192 3FFF 1
            0193 3FFF 1
            0194 3FFF 1
            0195 3FFF 1
            0196 3FFF 1
            0197 3FFF 1
            0198 3FFF 1
            0199 3FFF 1
            019A 3FFF 1
            019B 3FFF 1
            019C 3FFF 1
            019D 3FFF 1
            019E 3FFF 1
            019F 3FFF 1
            01A0 3FFF 1
            01A1 3FFF 1
            01A2 3FFF 1
            01A3 3FFF 1
            01A4 3FFF 1
            01A5 3FFF 1
            01A6 3FFF 1
            01A7 3FFF 1
            01A8 3FFF 1
            01A9 3FFF 1
            01AA 3FFF 1
            01AB 3FFF 1
            01AC 3FFF 1
            01AD 3FFF 1
            01AE 3FFF 1
            01AF 3FFF 1
            01B0 3FFF 1
            01B1 3FFF 1
            01B2 3FFF 1
            01B3 3FFF 1
            01B4 3FFF 1
            01B5 3FFF 1
            01B6 3FFF 1
            01B7 3FFF 1
            01B8 3FFF 1
            01B9 3FFF 1
            01BA 3FFF 1
            01BB 3FFF 1
            01BC 3FFF 1
            01BD 3FFF 1
            01BE 3FFF 1
            01BF 3FFF 1
            01C0 3FFF 1
            01C1 3FFF 1
            01C2 3FFF 1
            01C3 3FFF 1
            01C4 3FFF 1
            01C5 3FFF 1
            01C6 3FFF 1
            01C7 3FFF 1
            01C8 3FFF 1
            01C9 3FFF 1
            01CA 3FFF 1
            01CB 3FFF 1
            01CC 3FFF 1
            01CD 3FFF 1
            01CE 3FFF 1
            01CF 3FFF 1
            01D0 3FFF 1
            01D1 3FFF 1
            01D2 3FFF 1
            01D3 3FFF 1
            01D4 3FFF 1
            01D5 3FFF 1
            01D6 3FFF 1
            01D7 3FFF 1
            01D8 3FFF 1
            01D9 3FFF 1
            01DA 3FFF 1
            01DB 3FFF 1
            01DC 3FFF 1
            01DD 3FFF 1
            01DE 3FFF 1
            01DF 3FFF 1
            01E0 3FFF 1
            01E1 3FFF 1
            01E2 3FFF 1
            01E3 3FFF 1
            01E4 3FFF 1
            01E5 3FFF 1
            01E6 3FFF 1
            01E7 3FFF 1
            01E8 3FFF 1
            01E9 3FFF 1
            01EA 3FFF 1
            01EB 3FFF 1
            01EC 3FFF 1
            01ED 3FFF 1
            01EE 3FFF 1
            01EF 3FFF 1
            01F0 3FFF 1
            01F1 3FFF 1
            01F2 3FFF 1
            01F3 3FFF 1
            01F4 3FFF 1
            01F5 3FFF 1
            01F6 3FFF 1
            01F7 3FFF 1
            01F8 3FFF 1
            01F9 3FFF 1
            01FA 3FFF 1
            01FB 3FFF 1
            01FC 3FFF 1
            01FD 3FFF 1
            01FE 3FFF 1
            01FF 3FFF 1
            0200 3FFF 1
            0201 3FFF 1
            0202 3FFF 1
            0203 3FFF 1
            0204 3FFF 1
            0205 3FFF 1
            0206 3FFF 1
            0207 3FFF 1
            0208 3FFF 1
            0209 3FFF 1
            020A 3FFF 1
            020B 3FFF 1
            020C 3FFF 1
            020D 3FFF 1
            020E 3FFF 1
            020F 3FFF 1
            0210 3FFF 1
            0211 3FFF 1
            0212 3FFF 1
            0213 3FFF 1
            0214 3FFF 1
            0215 3FFF 1
            0216 3FFF 1
            0217 3FFF 1
            0218 3FFF 1
            0219 3FFF 1
            021A 3FFF 1
            021B 3FFF 1
            021C 3FFF 1
            021D 3FFF 1
            021E 3FFF 1
            021F 3FFF 1
            0220 3FFF 1
            0221 3FFF 1
            0222 3FFF 1
            0223 3FFF 1
            0224 3FFF 1
            0225 3FFF 1
            0226 3FFF 1
            0227 3FFF 1
            0228 3FFF 1
            0229 3FFF 1
            022A 3FFF 1
            022B 3FFF 1
            022C 3FFF 1
            022D 3FFF 1
            022E 3FFF 1
            022F 3FFF 1
            0230 3FFF 1
            0231 3FFF 1
            0232 3FFF 1
            0233 3FFF 1
            0234 3FFF 1
            0235 3FFF 1
            0236 3FFF 1
            0237 3FFF 1
            0238 3FFF 1
            0239 3FFF 1
            023A 3FFF 1
            023B 3FFF 1
            023C 3FFF 1
            023D 3FFF 1
            023E 3FFF 1
            023F 3FFF 1
            0240 3FFF 1
            0241 3FFF 1
            0242 3FFF 1
            0243 3FFF 1
            0244 3FFF 1
            0245 3FFF 1
            0246 3FFF 1
            0247 3FFF 1
            0248 3FFF 1
            0249 3FFF 1
            024A 3FFF 1
            024B 3FFF 1
            024C 3FFF 1
            024D 3FFF 1
            024E 3FFF 1
            024F 3FFF 1
            0250 3FFF 1
            0251 3FFF 1
            0252 3FFF 1
            0253 3FFF 1
            0254 3FFF 1
            0255 3FFF 1
            0256 3FFF 1
            0257 3FFF 1
            0258 3FFF 1
            0259 3FFF 1
            025A 3FFF 1
            025B 3FFF 1
            025C 3FFF 1
            025D 3FFF 1
            025E 3FFF 1
            025F 3FFF 1
            0260 3FFF 1
            0261 3FFF 1
            0262 3FFF 1
            0263 3FFF 1
            0264 3FFF 1
            0265 3FFF 1
            0266 3FFF 1
            0267 3FFF 1
            0268 3FFF 1
            0269 3FFF 1
            026A 3FFF 1
            026B 3FFF 1
            026C 3FFF 1
            026D 3FFF 1
            026E 3FFF 1
            026F 3FFF 1
            0270 3FFF 1
            0271 3FFF 1
            0272 3FFF 1
            0273 3FFF 1
            0274 3FFF 1
            0275 3FFF 1
            0276 3FFF 1
            0277 3FFF 1
            0278 3FFF 1
            0279 3FFF 1
            027A 3FFF 1
            027B 3FFF 1
            027C 3FFF 1
            027D 3FFF 1
            027E 3FFF 1
            027F 3FFF 1
            0280 3FFF 1
            0281 3FFF 1
            0282 3FFF 1
            0283 3FFF 1
            0284 3FFF 1
            0285 3FFF 1
            0286 3FFF 1
            0287 3FFF 1
            0288 3FFF 1
            0289 3FFF 1
            028A 3FFF 1
            028B 3FFF 1
            028C 3FFF 1
            028D 3FFF 1
            028E 3FFF 1
            028F 3FFF 1
            0290 3FFF 1
            0291 3FFF 1
            0292 3FFF 1
            0293 3FFF 1
            0294 3FFF 1
            0295 3FFF 1
            0296 3FFF 1
            0297 3FFF 1
            0298 3FFF 1
            0299 3FFF 1
            029A 3FFF 1
            029B 3FFF 1
            029C 3FFF 1
            029D 3FFF 1
            029E 3FFF 1
            029F 3FFF 1
            02A0 3FFF 1
            02A1 3FFF 1
            02A2 3FFF 1
            02A3 3FFF 1
            02A4 3FFF 1
            02A5 3FFF 1
            02A6 3FFF 1
            02A7 3FFF 1
            02A8 3FFF 1
            02A9 3FFF 1
            02AA 3FFF 1
            02AB 3FFF 1
            02AC 3FFF 1
            02AD 3FFF 1
            02AE 3FFF 1
            02AF 3FFF 1
            02B0 3FFF 1
            02B1 3FFF 1
            02B2 3FFF 1
            02B3 3FFF 1
            02B4 3FFF 1
            02B5 3FFF 1
            02B6 3FFF 1
            02B7 3FFF 1
            02B8 3FFF 1
            02B9 3FFF 1
            02BA 3FFF 1
            02BB 3FFF 1
            02BC 3FFF 1
            02BD 3FFF 1
            02BE 3FFF 1
            02BF 3FFF 1
            02C0 3FFF 1
            02C1 3FFF 1
            02C2 3FFF 1
            02C3 3FFF 1
            02C4 3FFF 1
            02C5 3FFF 1
            02C6 3FFF 1
            02C7 3FFF 1
            02C8 3FFF 1
            02C9 3FFF 1
            02CA 3FFF 1
            02CB 3FFF 1
            02CC 3FFF 1
            02CD 3FFF 1
            02CE 3FFF 1
            02CF 3FFF 1
            02D0 3FFF 1
            02D1 3FFF 1
            02D2 3FFF 1
            02D3 3FFF 1
            02D4 3FFF 1
            02D5 3FFF 1
            02D6 3FFF 1
            02D7 3FFF 1
            02D8 3FFF 1
            02D9 3FFF 1
            02DA 3FFF 1
            02DB 3FFF 1
            02DC 3FFF 1
            02DD 3FFF 1
            02DE 3FFF 1
            02DF 3FFF 1
            02E0 3FFF 1
            02E1 3FFF 1
            02E2 3FFF 1
            02E3 3FFF 1
            02E4 3FFF 1
            02E5 3FFF 1
            02E6 3FFF 1
            02E7 3FFF 1
            02E8 3FFF 1
            02E9 3FFF 1
            02EA 3FFF 1
            02EB 3FFF 1
            02EC 3FFF 1
            02ED 3FFF 1
            02EE 3FFF 1
            02EF 3FFF 1
            02F0 3FFF 1
            02F1 3FFF 1
            02F2 3FFF 1
            02F3 3FFF 1
            02F4 3FFF 1
            02F5 3FFF 1
            02F6 3FFF 1
            02F7 3FFF 1
            02F8 3FFF 1
            02F9 3FFF 1
            02FA 3FFF 1
            02FB 3FFF 1
            02FC 3FFF 1
            02FD 3FFF 1
            02FE 3FFF 1
            02FF 3FFF 1
            0300 3FFF 1
            0301 3FFF 1
            0302 3FFF 1
            0303 3FFF 1
            0304 3FFF 1
            0305 3FFF 1
            0306 3FFF 1
            0307 3FFF 1
            0308 3FFF 1
            0309 3FFF 1
            030A 3FFF 1
            030B 3FFF 1
            030C 3FFF 1
            030D 3FFF 1
            030E 3FFF 1
            030F 3FFF 1
            0310 3FFF 1
            0311 3FFF 1
            0312 3FFF 1
            0313 3FFF 1
            0314 3FFF 1
            0315 3FFF 1
            0316 3FFF 1
            0317 3FFF 1
            0318 3FFF 1
            0319 3FFF 1
            031A 3FFF 1
            031B 3FFF 1
            031C 3FFF 1
            031D 3FFF 1
            031E 3FFF 1
            031F 3FFF 1
            0320 3FFF 1
            0321 3FFF 1
            0322 3FFF 1
            0323 3FFF 1
            0324 3FFF 1
            0325 3FFF 1
            0326 3FFF 1
            0327 3FFF 1
            0328 3FFF 1
            0329 3FFF 1
            032A 3FFF 1
            032B 3FFF 1
            032C 3FFF 1
            032D 3FFF 1
            032E 3FFF 1
            032F 3FFF 1
            0330 3FFF 1
            0331 3FFF 1
            0332 3FFF 1
            0333 3FFF 1
            0334 3FFF 1
            0335 3FFF 1
            0336 3FFF 1


The unknown bit is thus probably just garbage from switching from input to output.
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #257 on: December 26, 2018, 04:32:52 am »
Some more info about the jumpers of the programmer. If you connect JP2, you will have the following pinout at the 40 pin ZIF socket:

pinsignal
5VDD
6PA7
7PA6
8PA5
33PA3
34PA4
35PA0
36GND

As described in my last posting, the bottom 8 pins of the ZIF socket are always connected to the programmer signals, and the jumpers are just connecting it to the other pins. This means you can measure the pinout for the other jumpers with a continuity tester.

For my Padauk SOT-23-6 to DIP14 adapter this means I just have to insert the adapter with a shift of 1, see attached image. Then I can use this writer line in my PRE file and it works:

Code: [Select]
.writer package 14, 4, 32, 8, 9, 7, 6, 32, 11, 0x0000, 0x0000, 1

The last number 1 is for the IC shift. But the connections are defined by the jumpers, so you can't just set it to any value you want. I guess it is only used for the open/short tests and for the GUI.

So no need anymore for a custom connector board or the jumper wire mess on JP7 :) Maybe this helps someone who also have a PMS150C in SOT-23-6, the manual is not very clear about the required writer setup. BTW, when starting the writer software, it still says "Check Jump: S08: JP2 /IC Shift 4". I guess it reads this from an internal database for the PMS150C chip, and ignores the custom writer declaration of the PDK file. It still works, just insert it with a IC shift of 1.

PS: how were the nice chip diagrams at https://free-pdk.github.io drawn? I used KiCad for my diagram and copied it to Gimp and then edited it there, but I guess there is some software out there which makes it easier?
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline js_12345678_55AA

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #258 on: December 26, 2018, 09:48:53 am »
So apparently yes, the data from writer to IC gets sampled on rising edge, but from IC to writer gets sampled on the falling edge.

If we parse "Verify" on the falling edge we get:
Code: [Select]
    804582: FLASH_READ_A_N2

            ADDR DATA ?
            -----------
            0000 0060 0
            0001 1F00 0
            0002 0300 0
...

The unknown bit is thus probably just garbage from switching from input to output.

Unfortunately this does not seem right as well. "Verify" should read back the same content as in SimpleBlink PDK starting with "0070 ...".

I made a new capture of "Verify" using higher sampling frequency (5MHz). Maybe this will solve the "read" instability.
To increase buffer size I removed the analog voltage capture.

JS
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline js_12345678_55AA

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #259 on: December 26, 2018, 10:20:16 am »
PS: how were the nice chip diagrams at https://free-pdk.github.io drawn? I used KiCad for my diagram and copied it to Gimp and then edited it there, but I guess there is some software out there which makes it easier?

Hi,

I repurposed "James' Dodgy Arduino-Oriented Pinout Maker For Microcontrollers" from here: https://github.com/sleemanj/ArduinoOrientedChipPinoutCreator
Just some hacking and fiddeling later it is now possible to create one of those pictures using just a simple syntax like this:

Code: [Select]
        {
          Name   : 'PFS154-S16/D16',
          Package: '2SIDED'  ,
          Pins   :  16     ,
          PRC    :   { Vcc:5, Gnd:12, Reset: 8, XTAL1: 6, XTAL2:7 },
          PWM    :   [1,2,3,4,8,9,10,11,15,16],
          PA :   [11,0,0,9,10,8,7,6],
          PB :   [13,14,15,16,1,2,3,4],
          Analog :   [],
          Peripherals: { }
        }


One big problem is to capture the output image. Right now I print it to PDF or just take a screenshot from browser.
I plan to automate this by adding a canvas capture and save to image function later.

When all is fixed I will release the generator on github.

Have fun,

JS
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline socram

  • Regular Contributor
  • *
  • Posts: 72
  • Country: es
    • orca.pet
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #260 on: December 26, 2018, 11:01:19 am »
So apparently yes, the data from writer to IC gets sampled on rising edge, but from IC to writer gets sampled on the falling edge.

If we parse "Verify" on the falling edge we get:
Code: [Select]
    804582: FLASH_READ_A_N2

            ADDR DATA ?
            -----------
            0000 0060 0
            0001 1F00 0
            0002 0300 0
...


The unknown bit is thus probably just garbage from switching from input to output.

Unfortunately this does not seem right as well. "Verify" should read back the same content as in SimpleBlink PDK starting with "0070 ...".

I made a new capture of "Verify" using higher sampling frequency (5MHz). Maybe this will solve the "read" instability.
To increase buffer size I removed the analog voltage capture.

JS
Code: [Select]
      2527: FLASH_READ_A
            No data (dummy read)

     67967: FLASH_READ_A
            No data (dummy read)

    179611: FLASH_READ_A

            ADDR DATA ?
            -----------
            07E0 3FFF 0
            07E1 3FFF 0
            07E2 3FFF 1
            07E3 3FFF 1
            07E4 3FFF 1
            07E5 3FFF 1
            07E6 3FFF 1
            07E7 3FFF 1
            07E8 3FFF 1
            07E9 3FFF 1
            07EA 3FFF 1
            07EB 3FFF 1
            07EC 3FFF 1
            07ED 0281 1
            07EE 027A 1
            07EF 1FFE 0
            07F0 0027 0
            07F1 0025 1
            07F2 3FFF 0
            07F3 3FFF 0
            07F4 3FFF 1
            07F5 3FFF 1
            07F6 3FFF 1
            07F7 3FFF 1
            07F8 1850 1
            07F9 3F74 1
            07FA 3FFF 1
            07FB 3FFF 1
            07FC 3FFF 1
            07FD 3FFF 1
            07FE 0282 1
            07FF 31FD 1

    316754: FLASH_READ_A
            No data (dummy read)

   1711828: FLASH_READ_A

            ADDR DATA ?
            -----------
            07E0 3FFF 0
            07E1 3FFF 0
            07E2 3FFF 1
            07E3 3FFF 1
            07E4 3FFF 1
            07E5 3FFF 1
            07E6 3FFF 1
            07E7 3FFF 1
            07E8 3FFF 1
            07E9 3FFF 1
            07EA 3FFF 1
            07EB 3FFF 1
            07EC 3FFF 1
            07ED 0681 1
            07EE 027E 1
            07EF 1FFE 0
            07F0 0065 0
            07F1 0025 1
            07F2 3FFF 0
            07F3 3FFF 0
            07F4 3FFF 1
            07F5 3FFF 1
            07F6 3FFF 1
            07F7 3FFF 1
            07F8 1850 1
            07F9 3F74 1
            07FA 3FFF 1
            07FB 3FFF 1
            07FC 3FFF 1
            07FD 3FFF 1
            07FE 0282 1
            07FF 31FD 1

   1848671: FLASH_READ_A

            ADDR DATA ?
            -----------
            07E0 3FFF 0
            07E1 3FFF 0
            07E2 3FFF 1
            07E3 3FFF 1
            07E4 3FFF 1
            07E5 3FFF 1
            07E6 3FFF 1
            07E7 3FFF 1
            07E8 3FFF 1
            07E9 3FFF 1
            07EA 3FFF 1
            07EB 3FFF 1
            07EC 3FFF 1
            07ED 0281 1
            07EE 027E 1
            07EF 3FFE 0
            07F0 006D 0
            07F1 006D 1
            07F2 3FFF 0
            07F3 3FFF 0
            07F4 3FFF 1
            07F5 3FFF 1
            07F6 3FFF 1
            07F7 3FFF 1
            07F8 1850 1
            07F9 3F54 1
            07FA 3FFF 1
            07FB 3FFF 1
            07FC 3FFF 1
            07FD 3FFF 1
            07FE 0282 1
            07FF 31FD 1

   1985807: FLASH_READ_A

            ADDR DATA ?
            -----------
            0000 0070 0
            0001 2F00 0
            0002 0182 0
            0003 3FED 0
            0004 018B 0
            0005 3FEE 1
            0006 019E 0
            0007 2F81 1
            0008 019B 0
            0009 2F1C 0
            000A 0183 0
            000B 3FFE 0
            000C 2BFF 0
            000D 30D4 1
            000E 3FED 0
            000F 0B81 1
            0010 1F91 1
            0011 2F05 0
            0012 0B80 1
            0013 1AD0 0
            0014 3013 0
            0015 1F90 1
            0016 0063 1
            0017 3016 1
            0018 1180 0
            0019 3016 1
            001A 3D90 1
            001B 18D0 1
            001C 301B 1
            001D 2F01 1
            001E 1950 1
            001F 2FFF 0
            0020 1C01 1
            0021 018B 0
            0022 0B83 0
            0023 3AD0 0
            0024 3023 0
            0025 1B50 1
            0026 304F 1
            0027 2F04 1
            0028 0188 1
            0029 18D0 0
            002A 3029 0
            002B 2F02 1
            002C 0182 1
            002D 1304 0
            002E 1305 0
            002F 2F6E 1
            0030 0B82 1
            0031 2F00 0
            0032 0B83 0
            0033 0006 0
            0034 0B04 0
            0035 0007 0
            0036 0805 0
            0037 1584 0
            0038 1685 0
            0039 1004 1
            003A 1282 1
            003B 3083 1
            003C 1A40 1
            003D 3077 1
            003E 1FB0 1
            003F 1ED1 1
            0040 303F 1
            0041 1D84 1
            0042 1685 1
            0043 0591 1
            0044 18D0 1
            0045 3044 0
            0046 1950 1
            0047 303F 1
            0048 1D90 1
            0049 1BF0 1
            004A 3049 1
            004B 18D0 1
            004C 304B 1
            004D 1B50 1
            004E 302B 1
            004F 18D0 1
            0050 304F 1
            0051 1B50 1
            0052 3011 1
            0053 3053 1
            0054 018B 1
            0055 1ED1 1
            0056 1ED0 0
            0057 2F07 1
            0058 0BC1 1
            0059 2F8A 0
            005A 1BC0 0
            005B 2FD6 0
            005C 0063 0
            005D 30DC 0
            005E 11C0 0
            005F 305C 1
            0060 11C1 1
            0061 305C 1
            0062 1CD0 1
            0063 2F03 1
            0064 0BC1 1
            0065 2F8E 0
            0066 0BC0 0
            0067 2F56 0
            0068 0063 0
            0069 3068 0
            006A 11C0 0
            006B 3068 1
            006C 31C1 1
            006D 3068 1
            006E 3056 1
            006F 3FFF 1
            0070 3FFF 1
            0071 3FFF 1
            0072 3FFF 1
            0073 3FFF 1
            0074 3FFF 1
            0075 3FFF 1
            0076 3FFF 1
            0077 3FFF 1
            0078 3FFF 1
            0079 3FFF 1
            007A 3FFF 1
            007B 3FFF 1
            007C 3FFF 1
            007D 3FFF 1
            007E 3FFF 1
            007F 3FFF 1
            0080 3FFF 1
            0081 3FFF 1
            0082 3FFF 1
            0083 3FFF 1
            0084 3FFF 1
            0085 3FFF 1
            0086 3FFF 1
            0087 3FFF 1
            0088 3FFF 1
            0089 3FFF 1
            008A 3FFF 1
            008B 3FFF 1
            008C 3FFF 1
            008D 3FFF 1
            008E 3FFF 1
            008F 3FFF 1
            0090 3FFF 1
            0091 3FFF 1
            0092 3FFF 1
            0093 3FFF 1
            0094 3FFF 1
            0095 3FFF 1
            0096 3FFF 1
            0097 3FFF 1
            0098 3FFF 1
            0099 3FFF 1
            009A 3FFF 1
            009B 3FFF 1
            009C 3FFF 1
            009D 3FFF 1
            009E 3FFF 1
            009F 3FFF 1
            00A0 3FFF 1
            00A1 3FFF 1
            00A2 3FFF 1
            00A3 3FFF 1
            00A4 3FFF 1
            00A5 3FFF 1
            00A6 3FFF 1
            00A7 3FFF 1
            00A8 3FFF 1
            00A9 3FFF 1
            00AA 3FFF 1
            00AB 3FFF 1
            00AC 3FFF 1
            00AD 3FFF 1
            00AE 3FFF 1
            00AF 3FFF 1
            00B0 3FFF 1
            00B1 3FFF 1
            00B2 3FFF 1
            00B3 3FFF 1
            00B4 3FFF 1
            00B5 3FFF 1
            00B6 3FFF 1
            00B7 3FFF 1
            00B8 3FFF 1
            00B9 3FFF 1
            00BA 3FFF 1
            00BB 3FFF 1
            00BC 3FFF 1
            00BD 3FFF 1
            00BE 3FFF 1
            00BF 3FFF 1
            00C0 3FFF 1
            00C1 3FFF 1
            00C2 3FFF 1
            00C3 3FFF 1
            00C4 3FFF 1
            00C5 3FFF 1
            00C6 3FFF 1
            00C7 3FFF 1
            00C8 3FFF 1
            00C9 3FFF 1
            00CA 3FFF 1
            00CB 3FFF 1
            00CC 3FFF 1
            00CD 3FFF 1
            00CE 3FFF 1
            00CF 3FFF 1
            00D0 3FFF 1
            00D1 3FFF 1
            00D2 3FFF 1
            00D3 3FFF 1
            00D4 3FFF 1
            00D5 3FFF 1
            00D6 3FFF 1
            00D7 3FFF 1
            00D8 3FFF 1
            00D9 3FFF 1
            00DA 3FFF 1
            00DB 3FFF 1
            00DC 3FFF 1
            00DD 3FFF 1
            00DE 3FFF 1
            00DF 3FFF 1
            00E0 3FFF 1
            00E1 3FFF 1
            00E2 3FFF 1
            00E3 3FFF 1
            00E4 3FFF 1
            00E5 3FFF 1
            00E6 3FFF 1
            00E7 3FFF 1
            00E8 3FFF 1
            00E9 3FFF 1
            00EA 3FFF 1
            00EB 3FFF 1
            00EC 3FFF 1
            00ED 3FFF 1
            00EE 3FFF 1
            00EF 3FFF 1
            00F0 3FFF 1
            00F1 3FFF 1
            00F2 3FFF 1
            00F3 3FFF 1
            00F4 3FFF 1
            00F5 3FFF 1
            00F6 3FFF 1
            00F7 3FFF 1
            00F8 3FFF 1
            00F9 3FFF 1
            00FA 3FFF 1
            00FB 3FFF 1
            00FC 3FFF 1
            00FD 3FFF 1
            00FE 3FFF 1
            00FF 3FFF 1
            0100 3FFF 1
            0101 3FFF 1
            0102 3FFF 1
            0103 3FFF 1
            0104 3FFF 1
            0105 3FFF 1
            0106 3FFF 1
            0107 3FFF 1
            0108 3FFF 1
            0109 3FFF 1
            010A 3FFF 1
            010B 3FFF 1
            010C 3FFF 1
            010D 3FFF 1
            010E 3FFF 1
            010F 3FFF 1
            0110 3FFF 1
            0111 3FFF 1
            0112 3FFF 1
            0113 3FFF 1
            0114 3FFF 1
            0115 3FFF 1
            0116 3FFF 1
            0117 3FFF 1
            0118 3FFF 1
            0119 3FFF 1
            011A 3FFF 1
            011B 3FFF 1
            011C 3FFF 1
            011D 3FFF 1
            011E 3FFF 1
            011F 3FFF 1
            0120 3FFF 1
            0121 3FFF 1
            0122 3FFF 1
            0123 3FFF 1
            0124 3FFF 1
            0125 3FFF 1
            0126 3FFF 1
            0127 3FFF 1
            0128 3FFF 1
            0129 3FFF 1
            012A 3FFF 1
            012B 3FFF 1
            012C 3FFF 1
            012D 3FFF 1
            012E 3FFF 1
            012F 3FFF 1
            0130 3FFF 1
            0131 3FFF 1
            0132 3FFF 1
            0133 3FFF 1
            0134 3FFF 1
            0135 3FFF 1
            0136 3FFF 1
            0137 3FFF 1
            0138 3FFF 1
            0139 3FFF 1
            013A 3FFF 1
            013B 3FFF 1
            013C 3FFF 1
            013D 3FFF 1
            013E 3FFF 1
            013F 3FFF 1
            0140 3FFF 1
            0141 3FFF 1
            0142 3FFF 1
            0143 3FFF 1
            0144 3FFF 1
            0145 3FFF 1
            0146 3FFF 1
            0147 3FFF 1
            0148 3FFF 1
            0149 3FFF 1
            014A 3FFF 1
            014B 3FFF 1
            014C 3FFF 1
            014D 3FFF 1
            014E 3FFF 1
            014F 3FFF 1
            0150 3FFF 1
            0151 3FFF 1
            0152 3FFF 1
            0153 3FFF 1
            0154 3FFF 1
            0155 3FFF 1
            0156 3FFF 1
            0157 3FFF 1
            0158 3FFF 1
            0159 3FFF 1
            015A 3FFF 1
            015B 3FFF 1
            015C 3FFF 1
            015D 3FFF 1
            015E 3FFF 1
            015F 3FFF 1
            0160 3FFF 1
            0161 3FFF 1
            0162 3FFF 1
            0163 3FFF 1
            0164 3FFF 1
            0165 3FFF 1
            0166 3FFF 1
            0167 3FFF 1
            0168 3FFF 1
            0169 3FFF 1
            016A 3FFF 1
            016B 3FFF 1
            016C 3FFF 1
            016D 3FFF 1
            016E 3FFF 1
            016F 3FFF 1
            0170 3FFF 1
            0171 3FFF 1
            0172 3FFF 1
            0173 3FFF 1
            0174 3FFF 1
            0175 3FFF 1
            0176 3FFF 1
            0177 3FFF 1
            0178 3FFF 1
            0179 3FFF 1
            017A 3FFF 1
            017B 3FFF 1
            017C 3FFF 1
            017D 3FFF 1
            017E 3FFF 1
            017F 3FFF 1
            0180 3FFF 1
            0181 3FFF 1
            0182 3FFF 1
            0183 3FFF 1
            0184 3FFF 1
            0185 3FFF 1
            0186 3FFF 1
            0187 3FFF 1
            0188 3FFF 1
            0189 3FFF 1
            018A 3FFF 1
            018B 3FFF 1
            018C 3FFF 1
            018D 3FFF 1
            018E 3FFF 1
            018F 3FFF 1
            0190 3FFF 1
            0191 3FFF 1
            0192 3FFF 1
            0193 3FFF 1
            0194 3FFF 1
            0195 3FFF 1
            0196 3FFF 1
            0197 3FFF 1
            0198 3FFF 1
            0199 3FFF 1
            019A 3FFF 1
            019B 3FFF 1
            019C 3FFF 1
            019D 3FFF 1
            019E 3FFF 1
            019F 3FFF 1
            01A0 3FFF 1
            01A1 3FFF 1
            01A2 3FFF 1
            01A3 3FFF 1
            01A4 3FFF 1
            01A5 3FFF 1
            01A6 3FFF 1
            01A7 3FFF 1
            01A8 3FFF 1
            01A9 3FFF 1
            01AA 3FFF 1
            01AB 3FFF 1
            01AC 3FFF 1
            01AD 3FFF 1
            01AE 3FFF 1
            01AF 3FFF 1
            01B0 3FFF 1
            01B1 3FFF 1
            01B2 3FFF 1
            01B3 3FFF 1
            01B4 3FFF 1
            01B5 3FFF 1
            01B6 3FFF 1
            01B7 3FFF 1
            01B8 3FFF 1
            01B9 3FFF 1
            01BA 3FFF 1
            01BB 3FFF 1
            01BC 3FFF 1
            01BD 3FFF 1
            01BE 3FFF 1
            01BF 3FFF 1
            01C0 3FFF 1
            01C1 3FFF 1
            01C2 3FFF 1
            01C3 3FFF 1
            01C4 3FFF 1
            01C5 3FFF 1
            01C6 3FFF 1
            01C7 3FFF 1
            01C8 3FFF 1
            01C9 3FFF 1
            01CA 3FFF 1
            01CB 3FFF 1
            01CC 3FFF 1
            01CD 3FFF 1
            01CE 3FFF 1
            01CF 3FFF 1
            01D0 3FFF 1
            01D1 3FFF 1
            01D2 3FFF 1
            01D3 3FFF 1
            01D4 3FFF 1
            01D5 3FFF 1
            01D6 3FFF 1
            01D7 3FFF 1
            01D8 3FFF 1
            01D9 3FFF 1
            01DA 3FFF 1
            01DB 3FFF 1
            01DC 3FFF 1
            01DD 3FFF 1
            01DE 3FFF 1
            01DF 3FFF 1
            01E0 3FFF 1
            01E1 3FFF 1
            01E2 3FFF 1
            01E3 3FFF 1
            01E4 3FFF 1
            01E5 3FFF 1
            01E6 3FFF 1
            01E7 3FFF 1
            01E8 3FFF 1
            01E9 3FFF 1
            01EA 3FFF 1
            01EB 3FFF 1
            01EC 3FFF 1
            01ED 3FFF 1
            01EE 3FFF 1
            01EF 3FFF 1
            01F0 3FFF 1
            01F1 3FFF 1
            01F2 3FFF 1
            01F3 3FFF 1
            01F4 3FFF 1
            01F5 3FFF 1
            01F6 3FFF 1
            01F7 3FFF 1
            01F8 3FFF 1
            01F9 3FFF 1
            01FA 3FFF 1
            01FB 3FFF 1
            01FC 3FFF 1
            01FD 3FFF 1
            01FE 3FFF 1
            01FF 3FFF 1
            0200 3FFF 1
            0201 3FFF 1
            0202 3FFF 1
            0203 3FFF 1
            0204 3FFF 1
            0205 3FFF 1
            0206 3FFF 1
            0207 3FFF 1
            0208 3FFF 1
            0209 3FFF 1
            020A 3FFF 1
            020B 3FFF 1
            020C 3FFF 1
            020D 3FFF 1
            020E 3FFF 1
            020F 3FFF 1
            0210 3FFF 1
            0211 3FFF 1
            0212 3FFF 1
            0213 3FFF 1
            0214 3FFF 1
            0215 3FFF 1
            0216 3FFF 1
            0217 3FFF 1
            0218 3FFF 1
            0219 3FFF 1
            021A 3FFF 1
            021B 3FFF 1
            021C 3FFF 1
            021D 3FFF 1
            021E 3FFF 1
            021F 3FFF 1
            0220 3FFF 1
            0221 3FFF 1
            0222 3FFF 1
            0223 3FFF 1
            0224 3FFF 1
            0225 3FFF 1
            0226 3FFF 1
            0227 3FFF 1
            0228 3FFF 1
            0229 3FFF 1
            022A 3FFF 1
            022B 3FFF 1
            022C 3FFF 1
            022D 3FFF 1
            022E 3FFF 1
            022F 3FFF 1
            0230 3FFF 1
            0231 3FFF 1
            0232 3FFF 1
            0233 3FFF 1
            0234 3FFF 1
            0235 3FFF 1
            0236 3FFF 1
            0237 3FFF 1
            0238 3FFF 1
            0239 3FFF 1
            023A 3FFF 1
            023B 3FFF 1
            023C 3FFF 1
            023D 3FFF 1
            023E 3FFF 1
            023F 3FFF 1
            0240 3FFF 1
            0241 3FFF 1
            0242 3FFF 1
            0243 3FFF 1
            0244 3FFF 1
            0245 3FFF 1
            0246 3FFF 1
            0247 3FFF 1
            0248 3FFF 1
            0249 3FFF 1
            024A 3FFF 1
            024B 3FFF 1
            024C 3FFF 1
            024D 3FFF 1
            024E 3FFF 1
            024F 3FFF 1
            0250 3FFF 1
            0251 3FFF 1
            0252 3FFF 1
            0253 3FFF 1
            0254 3FFF 1
            0255 3FFF 1
            0256 3FFF 1
            0257 3FFF 1
            0258 3FFF 1
            0259 3FFF 1
            025A 3FFF 1
            025B 3FFF 1
            025C 3FFF 1
            025D 3FFF 1
            025E 3FFF 1
            025F 3FFF 1
            0260 3FFF 1
            0261 3FFF 1
            0262 3FFF 1
            0263 3FFF 1
            0264 3FFF 1
            0265 3FFF 1
            0266 3FFF 1
            0267 3FFF 1
            0268 3FFF 1
            0269 3FFF 1
            026A 3FFF 1
            026B 3FFF 1
            026C 3FFF 1
            026D 3FFF 1
            026E 3FFF 1
            026F 3FFF 1
            0270 3FFF 1
            0271 3FFF 1
            0272 3FFF 1
            0273 3FFF 1
            0274 3FFF 1
            0275 3FFF 1
            0276 3FFF 1
            0277 3FFF 1
            0278 3FFF 1
            0279 3FFF 1
            027A 3FFF 1
            027B 3FFF 1
            027C 3FFF 1
            027D 3FFF 1
            027E 3FFF 1
            027F 3FFF 1
            0280 3FFF 1
            0281 3FFF 1
            0282 3FFF 1
            0283 3FFF 1
            0284 3FFF 1
            0285 3FFF 1
            0286 3FFF 1
            0287 3FFF 1
            0288 3FFF 1
            0289 3FFF 1
            028A 3FFF 1
            028B 3FFF 1
            028C 3FFF 1
            028D 3FFF 1
            028E 3FFF 1
            028F 3FFF 1
            0290 3FFF 1
            0291 3FFF 1
            0292 3FFF 1
            0293 3FFF 1
            0294 3FFF 1
            0295 3FFF 1
            0296 3FFF 1
            0297 3FFF 1
            0298 3FFF 1
            0299 3FFF 1
            029A 3FFF 1
            029B 3FFF 1
            029C 3FFF 1
            029D 3FFF 1
            029E 3FFF 1
            029F 3FFF 1
            02A0 3FFF 1
            02A1 3FFF 1
            02A2 3FFF 1
            02A3 3FFF 1
            02A4 3FFF 1
            02A5 3FFF 1
            02A6 3FFF 1
            02A7 3FFF 1
            02A8 3FFF 1
            02A9 3FFF 1
            02AA 3FFF 1
            02AB 3FFF 1
            02AC 3FFF 1
            02AD 3FFF 1
            02AE 3FFF 1
            02AF 3FFF 1
            02B0 3FFF 1
            02B1 3FFF 1
            02B2 3FFF 1
            02B3 3FFF 1
            02B4 3FFF 1
            02B5 3FFF 1
            02B6 3FFF 1
            02B7 3FFF 1
            02B8 3FFF 1
            02B9 3FFF 1
            02BA 3FFF 1
            02BB 3FFF 1
            02BC 3FFF 1
            02BD 3FFF 1
            02BE 3FFF 1
            02BF 3FFF 1
            02C0 3FFF 1
            02C1 3FFF 1
            02C2 3FFF 1
            02C3 3FFF 1
            02C4 3FFF 1
            02C5 3FFF 1
            02C6 3FFF 1
            02C7 3FFF 1
            02C8 3FFF 1
            02C9 3FFF 1
            02CA 3FFF 1
            02CB 3FFF 1
            02CC 3FFF 1
            02CD 3FFF 1
            02CE 3FFF 1
            02CF 3FFF 1
            02D0 3FFF 1
            02D1 3FFF 1
            02D2 3FFF 1
            02D3 3FFF 1
            02D4 3FFF 1
            02D5 3FFF 1
            02D6 3FFF 1
            02D7 3FFF 1
            02D8 3FFF 1
            02D9 3FFF 1
            02DA 3FFF 1
            02DB 3FFF 1
            02DC 3FFF 1
            02DD 3FFF 1
            02DE 3FFF 1
            02DF 3FFF 1
            02E0 3FFF 1
            02E1 3FFF 1
            02E2 3FFF 1
            02E3 3FFF 1
            02E4 3FFF 1
            02E5 3FFF 1
            02E6 3FFF 1
            02E7 3FFF 1
            02E8 3FFF 1
            02E9 3FFF 1
            02EA 3FFF 1
            02EB 3FFF 1
            02EC 3FFF 1
            02ED 3FFF 1
            02EE 3FFF 1
            02EF 3FFF 1
            02F0 3FFF 1
            02F1 3FFF 1
            02F2 3FFF 1
            02F3 3FFF 1
            02F4 3FFF 1
            02F5 3FFF 1
            02F6 3FFF 1
            02F7 3FFF 1
            02F8 3FFF 1
            02F9 3FFF 1
            02FA 3FFF 1
            02FB 3FFF 1
            02FC 3FFF 1
            02FD 3FFF 1
            02FE 3FFF 1
            02FF 3FFF 1
            0300 3FFF 1
            0301 3FFF 1
            0302 3FFF 1
            0303 3FFF 1
            0304 3FFF 1
            0305 3FFF 1
            0306 3FFF 1
            0307 3FFF 1
            0308 3FFF 1
            0309 3FFF 1
            030A 3FFF 1
            030B 3FFF 1
            030C 3FFF 1
            030D 3FFF 1
            030E 3FFF 1
            030F 3FFF 1
            0310 3FFF 1
            0311 3FFF 1
            0312 3FFF 1
            0313 3FFF 1
            0314 3FFF 1
            0315 3FFF 1
            0316 3FFF 1
            0317 3FFF 1
            0318 3FFF 1
            0319 3FFF 1
            031A 3FFF 1
            031B 3FFF 1
            031C 3FFF 1
            031D 3FFF 1
            031E 3FFF 1
            031F 3FFF 1
            0320 3FFF 1
            0321 3FFF 1
            0322 3FFF 1
            0323 3FFF 1
            0324 3FFF 1
            0325 3FFF 1
            0326 3FFF 1
            0327 3FFF 1
            0328 3FFF 1
            0329 3FFF 1
            032A 3FFF 1
            032B 3FFF 1
            032C 3FFF 1
            032D 3FFF 1
            032E 3FFF 1
            032F 3FFF 1
            0330 3FFF 1
            0331 3FFF 1
            0332 3FFF 1
            0333 3FFF 1
            0334 3FFF 1
            0335 3FFF 1
            0336 3FFF 1
            0337 3FFF 1
            0338 3FFF 1
            0339 3FFF 1
            033A 3FFF 1
            033B 3FFF 1
            033C 3FFF 1
            033D 3FFF 1
            033E 3FFF 1
            033F 3FFF 1
            0340 3FFF 1
            0341 3FFF 1
            0342 3FFF 1
            0343 3FFF 1
            0344 3FFF 1
            0345 3FFF 1
            0346 3FFF 1
            0347 3FFF 1
            0348 3FFF 1
            0349 3FFF 1
            034A 3FFF 1
            034B 3FFF 1
            034C 3FFF 1
            034D 3FFF 1
            034E 3FFF 1
            034F 3FFF 1
            0350 3FFF 1
            0351 3FFF 1
            0352 3FFF 1
            0353 3FFF 1
            0354 3FFF 1
            0355 3FFF 1
            0356 3FFF 1
            0357 3FFF 1
            0358 3FFF 1
            0359 3FFF 1
            035A 3FFF 1
            035B 3FFF 1
            035C 3FFF 1
            035D 3FFF 1
            035E 3FFF 1
            035F 3FFF 1
            0360 3FFF 1
            0361 3FFF 1
            0362 3FFF 1
            0363 3FFF 1
            0364 3FFF 1
            0365 3FFF 1
            0366 3FFF 1
            0367 3FFF 1
            0368 3FFF 1
            0369 3FFF 1
            036A 3FFF 1
            036B 3FFF 1
            036C 3FFF 1
            036D 3FFF 1
            036E 3FFF 1
            036F 3FFF 1
            0370 3FFF 1
            0371 3FFF 1
            0372 3FFF 1
            0373 3FFF 1
            0374 3FFF 1
            0375 3FFF 1
            0376 3FFF 1
            0377 3FFF 1
            0378 3FFF 1
            0379 3FFF 1
            037A 3FFF 1
            037B 3FFF 1
            037C 3FFF 1
            037D 3FFF 1
            037E 3FFF 1
            037F 3FFF 1
            0380 3FFF 1
            0381 3FFF 1
            0382 3FFF 1
            0383 3FFF 1
            0384 3FFF 1
            0385 3FFF 1
            0386 3FFF 1
            0387 3FFF 1
            0388 3FFF 1
            0389 3FFF 1
            038A 3FFF 1
            038B 3FFF 1
            038C 3FFF 1
            038D 3FFF 1
            038E 3FFF 1
            038F 3FFF 1
            0390 3FFF 1
            0391 3FFF 1
            0392 3FFF 1
            0393 3FFF 1
            0394 3FFF 1
            0395 3FFF 1
            0396 3FFF 1
            0397 3FFF 1
            0398 3FFF 1
            0399 3FFF 1
            039A 3FFF 1
            039B 3FFF 1
            039C 3FFF 1
            039D 3FFF 1
            039E 3FFF 1
            039F 3FFF 1
            03A0 3FFF 1
            03A1 3FFF 1
            03A2 3FFF 1
            03A3 3FFF 1
            03A4 3FFF 1
            03A5 3FFF 1
            03A6 3FFF 1
            03A7 3FFF 1
            03A8 3FFF 1
            03A9 3FFF 1
            03AA 3FFF 1
            03AB 3FFF 1
            03AC 3FFF 1
            03AD 3FFF 1
            03AE 3FFF 1
            03AF 3FFF 1
            03B0 3FFF 1
            03B1 3FFF 1
            03B2 3FFF 1
            03B3 3FFF 1
            03B4 3FFF 1
            03B5 3FFF 1
            03B6 3FFF 1
            03B7 3FFF 1
            03B8 3FFF 1
            03B9 3FFF 1
            03BA 3FFF 1
            03BB 3FFF 1
            03BC 3FFF 1
            03BD 3FFF 1
            03BE 3FFF 1
            03BF 3FFF 1
            03C0 3FFF 1
            03C1 3FFF 1
            03C2 3FFF 1
            03C3 3FFF 1
            03C4 3FFF 1
            03C5 3FFF 1
            03C6 3FFF 1
            03C7 3FFF 1
            03C8 3FFF 1
--- everything after this are just more 3FFF ---

I still had the same issue when parsing at the rising edge, but it looks fine and matches the decrypted PDK if sampling on the falling edge.

Commands, unlike sampling at the falling edge at 2MHz, also are properly detected.
 

Offline socram

  • Regular Contributor
  • *
  • Posts: 72
  • Country: es
    • orca.pet
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #261 on: December 26, 2018, 11:14:10 am »
Nope, after analyzing properly the .bin being read back I'm still getting one bit offs. I've attached the correct .bin and the two .bins read on falling and rising edges  :palm:

I'm also attaching the latest version of my parsing tools. "parsespivdd.py" is the script that converts the TXTs from Zeroplus to a series of frames, in case somebody manages to make any sense of this mess.

Example:
Code: [Select]
./parsespivdd.py --txt verify_5mhz.txt --data PA6_ICPDA --clock PA3_ICPCK --enable VDD --falling | tee verify_5mhz_frames_falling.txtRemove --falling to sample on the rising edge.

parsecommands.py has no options:
Code: [Select]
cat verify_5mhz_frames_falling.txt | ./parsecommands.py
EDIT: It looks like this could be still too slow for correct sampling:
« Last Edit: December 26, 2018, 11:25:34 am by socram »
 

Offline js_12345678_55AA

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #262 on: December 26, 2018, 06:12:39 pm »
Nope, after analyzing properly the .bin being read back I'm still getting one bit offs. I've attached the correct .bin and the two .bins read on falling and rising edges  :palm:

EDIT: It looks like this could be still too slow for correct sampling:


Hi,

thanks for your hard work.

I don't think that the sampling frequency is the problem. Each clock cycle is clearly >=5 time cycles which implies that the real clock used is indeed 1 MHz only.

One possibility could be that you might need to add a delay before taking the sample:
e.g. CLK goes high, take the value from *next* sample for DAT. But this is very uncommon.

I also thought about the "garbage" bits in reads. From what I remember from the calibration routine:
It could be that this is an ACK from WRITER. So after IC sent out some bits, direction is changed and IC waits for signal from host. Either just a clock or clock+value (so sampling edge might change for this bit again).

I will be away from my WRITER/LogicAnalyzer for the next few days, participating 35C3. Anybody there? PM me if you like to meet.

JS
 
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #263 on: December 26, 2018, 06:22:29 pm »
One big problem is to capture the output image. Right now I print it to PDF or just take a screenshot from browser.
I plan to automate this by adding a canvas capture and save to image function later.

When all is fixed I will release the generator on github.

Sounds good. Please add SVG output as well, or let me know when you are done and I can add it, because then I can just insert it in Open Office documents without bitmap quality loss.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline socram

  • Regular Contributor
  • *
  • Posts: 72
  • Country: es
    • orca.pet
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #264 on: December 27, 2018, 01:28:38 am »
I have been able to extract 1:1 the binary from Verify_5MHz.txt by using a weird trick, instead of sampling at rising or falling edge.

For each clock cycle, I output a one if the data pin is high for at least one sample while the clock pin is high. Otherwise, I output a zero. This seems to work just fine for both data and commands.

However, I am not sure why would this work - I don't see why would anybody use something so convoluted as a "level-sensitive" latch for communication (specially since I doubt that would help them lower costs).

I can only think that there must be some jitter somewhere trashing the experiment (which would also explain why the clock is so iregular - a bitbanged SPI using a "while" loop wouldn't certainly do that!)
 

Offline lucas.hartmann

  • Contributor
  • Posts: 16
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #265 on: December 27, 2018, 02:21:36 am »
My guess would be the programmer's bitbang code changes the data right before setting the clock, and uses a software loop to limit the frequency.

The sample rate of the logic analyzer is fast enough to see all clocks, but maybe not enough to consistently get the short delay between changing of data and rising of clock.

A hardware shift register should have a setup time in the ns range, so the target MCU reads nicely.

Enviado de meu SM-N910C usando o Tapatalk

 

Offline DocBen

  • Regular Contributor
  • *
  • Posts: 111
  • Country: de
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #266 on: December 27, 2018, 06:02:31 pm »
The voltage levels look suspiciously like zener voltages.

Could it be that they are 2.7V, 5.6V and 8.2V upon closer inspection?
 

Offline js_12345678_55AA

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #267 on: December 28, 2018, 11:05:30 am »
The voltage levels look suspiciously like zener voltages.

Could it be that they are 2.7V, 5.6V and 8.2V upon closer inspection?

Nice catch.

This also brought to my attention that the singal voltage might be smaller than standard TTL and this might require setting a lower trigger level in logic analyzer ( http://www.zeroplus.com.tw/logic-analyzer_en/faq_hardware.php ).

With the wrong (to high) trigger level (from TTL) it would explain why the signal is not captured 100% correctly especially with clock rates >=1 MHz.

When I'm back I will try to make a new capture with lower trigger level.

Nevertheless we should have all the information now to start writing down a draft of the flashing protocol and start with some experiments,

Anybody has a an idea how to create a cheap circuit to create different voltages (12V / 8.5V / 6.5 V / 5V / 3V ...) based on MCU output (using some digital outputs).

Have fun,

JS
 
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #268 on: December 28, 2018, 11:21:59 am »
Anybody has a an idea how to create a cheap circuit to create different voltages (12V / 8.5V / 6.5 V / 5V / 3V ...) based on MCU output (using some digital outputs).

This would be easy, just a LM317 and 2 resistors per voltage (and a decoupling capacitor). Then maybe some FETs to switch the output on and off, if it needs more power than a 4051 multiplexer can do.

For the construction I would do it the way PICkit and other programmers work:



Just the required programming signals on a pinheader on a small device. This could be plugged into any adapter etc. someone wants.

Meanwhile I got one channel of my ADC working. I can now sample with 8 bit resolution, -10 V to +10 V, and 25 MHz samplerate:

https://www.eevblog.com/forum/projects/4-channel-adc-10-mhz-8-bit-design/msg2073310/#msg2073310

Will solder the other 3 channels and finish the FPGA programming, then I can record a full programming cycle, with 25 MHz sampling rate for all 4 channels, and optionally 8 channels with a second board and still 25 MHz, if the bandwidth to the DDR3 RAM works out. Even if we don't need it anymore, was still fun to build it :)
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 
The following users thanked this post: js_12345678_55AA

Offline js_12345678_55AA

  • Frequent Contributor
  • **
  • Posts: 337
  • Country: ht
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #269 on: December 28, 2018, 11:41:32 am »

This would be easy, just a LM317 and 2 resistors per voltage (and a decoupling capacitor). Then maybe some FETs to switch the output on and off, if it needs more power than a 4051 multiplexer can do.

Can you draw a small schematic of this so i can assemble it on a bread board? I'm not so good with building circuits...

I have some 74HC4050 and CD4007UBE for signal level shifting (either up or down, just as we need for input/output of digital signals from MCU to/from IC).

Meanwhile I got one channel of my ADC working. I can now sample with 8 bit resolution, -10 V to +10 V, and 25 MHz samplerate:

https://www.eevblog.com/forum/projects/4-channel-adc-10-mhz-8-bit-design/msg2073310/#msg2073310

Will solder the other 3 channels and finish the FPGA programming, then I can record a full programming cycle, with 25 MHz sampling rate for all 4 channels, and optionally 8 channels with a second board and still 25 MHz, if the bandwidth to the DDR3 RAM works out. Even if we don't need it anymore, was still fun to build it :)

I'm very interested in this project and would love to see a 1GByte 8 channel analog logic analyzer :-) If it works good I will get / build one for sure.

JS
Easy PDK programmer and more: https://free-pdk.github.io
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #270 on: December 28, 2018, 03:18:35 pm »
The 74HC4050 looks good when the microcontroller wants to send back data, e.g. for the verify cycle.

I don't know much either about analog circuits, but I think it is called high-side switch what we would need, like this:

http://cq.cx/interface.pl#13

I tried to simulate it in LTSpice, but it switches really slow:



If I reduce R3 to 100 ohm, it gets better, but then the transistor Q1 might get very warm. There are all in one ICs as well for high side switches, but not as fun as DIY :)

For the voltage regulator, just look at the datasheet of the LM317, figure 3, and the formula for R1 and R2 in chapter 6. It works up to 37 V, but it is a linear regulator, so it gets hot when the programmed IC needs much power (e.g. supply voltage is 20 V, you want 8 V output, and with 100 mA, then 12 V * 0.1 A = 1.2 W is dissipated in heat at the regulator). But should be fine with a 12 V power supply to generate all voltages. Could be generated with a step-up converter, so that it would work with a 5 V USB power supply, or even from the USB port, if it doesn't need much power.

I think first we should measure the required currents and the required timings. Then we could design the programmer circuit. I guess it doesn't matter if it needs like 100 us to turn on a higher voltage for VPP with a relatively high current. We could use a few of these high side switches to select different voltages. But then for the logic signals, which might need only uA, we could use 4051 multiplexers to switch the VPP signal to and from the logic inputs very fast.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #271 on: December 28, 2018, 03:20:10 pm »
Attached is the LTspice simulation for the high-side switch.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline DocBen

  • Regular Contributor
  • *
  • Posts: 111
  • Country: de
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #272 on: December 28, 2018, 03:21:49 pm »
I was thinking about putting some zener diodes in parallel and switching them with an uln2003.
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #273 on: December 28, 2018, 03:38:08 pm »
The ULN2003 switches to GND. But if it the IC needs just a few milliampere, the LM317 etc. might be overkill, and you could use a zener diode, and then just pull it low with a ULN2003, and wire-or the different voltages with more diodes. But wouldn't be very accurate and wasting some power. I think my solution would cost like EUR 2 per voltage.

Another idea would be to use a cheap DAC and OpAmp to control the voltage. This would allow any voltage without a voltage regulator (but a reference voltage IC for the DAC), and would be even cheaper.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline DocBen

  • Regular Contributor
  • *
  • Posts: 111
  • Country: de
Re: EEVblog #1144 - Padauk Programmer Reverse Engineering
« Reply #274 on: December 28, 2018, 03:44:06 pm »
The ULN2003 switches to GND.

Exactly. Zener on top, ULN switch on the bottom. ULN on -> current flows through the zener reducing the voltage to the IC to that value. Input voltage cant be to high obviously ;) but there could be a pull-down resistor in parallel with the zeners also switched with the uln2003 to limit the voltage to something safe.
« Last Edit: December 28, 2018, 03:46:05 pm by DocBen »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf