Skip to content

Instantly share code, notes, and snippets.

@radiomanV
Last active May 31, 2021 02:59
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radiomanV/69ef14c704325bfa58339f2ae73a900f to your computer and use it in GitHub Desktop.
Save radiomanV/69ef14c704325bfa58339f2ae73a900f to your computer and use it in GitHub Desktop.
TL866 Bit Banging
Start logic protocol
03 00 07 00 00 00 00 00 00 00 00 00 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
set pin direction 24pins(0-out 1-in)
50 00 07 00 00 00 00 zif1 zif2 zif3 zif4 zif5 zif6 zif7 zif8 zif9 zif10 zif11 zif12 zif29 zif30 zif31 zif32 zif33 zif34 zif35 zif36 zif37 zif38 zif39 zif40
toggle 24pins (0/1) first 7 bytes=header
52 00 07 00 00 00 00 zif1 zif2 zif3 zif4 zif5 zif6 zif7 zif8 zif9 zif10 zif11 zif12 zif29 zif30 zif31 zif32 zif33 zif34 zif35 zif36 zif37 zif38 zif39 zif40
apply power supply
51 00 07 00
*Note the 4th parameter above (00). This is the logic chip type we want to test (from the device data base).
read 24 pins
53 00 07 00 00 00 00 01 00 01
output from programmer first 7 bytes=header
53 01 07 00 50 02 01 zif1 zif2 zif3 zif4 zif5 zif6 zif7 zif8 zif9 zif10 zif11 zif12 zif29 zif30 zif31 zif32 zif33 zif34 zif35 zif36 zif37 zif38 zif39 zif40
end session
04 00 07 00
Set pin drivers
=================================================================================================================================================================
Reset Pin drivers;
D0 00 00 00 00 00 00 00 00 00
Load Latch 7 bytes header + data (Latch outputs manipulate the VPP/VCC/GND pin drivers)
D1 00 00 00 00 00 00 xx yy zz1 ww1 zz2 ww2.... ; xx=No. of latches to write(1-8; 0=don't write to latches but write /OE's 9=write GND20), yy=OE_VPP+OE_VCC(0= NONE, 1=OE_VPP, 2=OE_VCC, 3=BOTH; bit 0=OE_VPP bit 1=OE_VCC/GND), zz=latch number(0-7) ww=latch value
=========================================================================================================================================================================
toggle 40pins (0/1) first 7 bytes=header + 40 bytes zif state (0/1)
D5 00 00 00 00 00 00 zif1 zif2 zif3 zif4 zif5 zif6 zif7 zif8 zif9 zif10 zif11 zif12 zif29 zif30 zif31 zif32 zif33 zif34 zif35 zif36 zif37 zif38 zif39 zif40 zif13 zif14 zif15 zif16 zif17 zif18 zif19 zif20 zif21 zif22 zif23 zif24 zif25 zif26 zif27 zif28
Read Zif pins
D2 00 00 00 00 00 00 00 00 00
Return 7 bytes header + 40 bytes zif state (0/1)
D4 00 00 00 00 00 00 zif1 zif2 zif3 zif4 zif5 zif6 zif7 zif8 zif9 zif10 zif11 zif12 zif13 zif14 zif15 zif16 zif17 zif18 zif19 zif20 zif21 zif22 zif23 zif24 zif25 zif26 zif27 zif28 zif29 zif30 zif31 zif32 zif33 zif34 zif35 zif36 zif37 zif38 zif39 zif40
set Zif direction 7bytes header + 40 bytes zif direction; 0=out 1=in
D4 00 00 00 00 00 00 zif1 zif2 zif3 zif4 zif5 zif6 zif7 zif8 zif9 zif10 zif11 zif12 zif29 zif30 zif31 zif32 zif33 zif34 zif35 zif36 zif37 zif38 zif39 zif40 zif13 zif14 zif15 zif16 zif17 zif18 zif19 zif20 zif21 zif22 zif23 zif24 zif25 zif26 zif27 zif28
=============================================================================================================================================================================
Set VPP/VCC/VIO 7bytes header + 2 bytes (TODO: check again, this is very unclear. Also there's a isuue here: setting VPP voltage wiil reset the VCC to default one and viceversa)
D6 00 00 00 00 00 00 xx yy; xx destination(0-2: 0=VPP yy = 0-7; 1=VCC yy=0-7; 2=VIO xx don't care VIO is 3.8V 3=VIO xx don't care VIO is 3.3V)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment