;This is a quick and dirty TeraTerm macro for resetting a Zeno tip to 240 counts.
;with Ian Lesnet's Bus Pirate. www.DangerousPrototypes.com 
;
;Load macro once TeraTerm is up and connected to your Bus Pirate. 
;
;Requires TeraTerm version 4.27 or later
;
;Bus Pirate Firmware v5.10. 
;
;BACKUP YOUR TIP EEPROM BEFORE ATTEMPTING TO RESET IT!




;Ensure HiZ mode
send 13
send 13
send 13
send "m" 13
send 13
wait 'HiZ>'

;Bus Mode
send "m" 13
wait '(1)>'

;I2C
send "4" 13
wait '(1)>'

;Set Speed 5KHz
send "1" 13
wait 'I2C>'

;Power Supplies On
send "W" 13
wait 'Power supplies ON'
wait 'I2C>'

;Pullups On
send "P" 13
wait 'Pull-up resistors ON'
wait 'I2C>'

;Let I2C EEPROM Initialize
pause 1

;Write Data to EEPROM
send "[0xA0, 0,    0x08,0x00,0xF5,0x04,0x97,0x04,0xC4,0x04]" 13
wait 'I2C>'
send "[0xA0, 8,    0x97,0x09,0x1B,0x00,0x42,0x03,0x00,0x64]" 13
wait 'I2C>'
send "[0xA0, 16,   0x0A,0xF0,0x96,0x1E,0x0A,0xA5,0x1E,0xB4]" 13
wait 'I2C>'
send "[0xA0, 24,   0x00,0x78,0x00,0x00,0x00,0x0A,0x00,0x0D]" 13
wait 'I2C>' 
send "[0xA0, 32,   0xC8,0xFE,0x3E,0x01,0xC2,0x64,0x32,0x0A]" 13
wait 'I2C>' 
send "[0xA0, 40,   0x04,0x4C,0x02,0xBC,0x00,0xE1,0xFF,0xF6]" 13
wait 'I2C>' 
send "[0xA0, 48,   0x3C,0xF2,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]" 13
wait 'I2C>'
send "[0xA0, 56,   0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]" 13
wait 'I2C>'
send "[0xA0, 64,   0x00,0xF4,0x0B,0xFF,0xFF,0xFF,0xFF,0xFF]" 13
wait 'I2C>'
send "[0xA0, 72,   0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]" 13
wait 'I2C>'
send "[0xA0, 80,   0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]" 13
wait 'I2C>'
send "[0xA0, 88,   0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]" 13
wait 'I2C>'
send "[0xA0, 96,   0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]" 13
wait 'I2C>'
send "[0xA0, 104,  0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]" 13
wait 'I2C>'
send "[0xA0, 112,  0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]" 13
wait 'I2C>'
send "[0xA0, 120,  0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF]" 13
wait 'I2C>'

;Bus Mode Menu
send "m" 13
wait '(1)>'

;Set HiZ
send 13
unlink