See my edit to the previous post. When I'm done celebrating I'll show my work in detail.
Edit: So I basically just copied the example from page 60 of the datasheet. I found it on some some electronics reseller's site here: 68hc11e datasheet but I'm sure there are other / better / different copies floating around.
Bear in mind that I was changing a #$39 byte to #$30. If any 0 bits needed to change to 1s I would have had to first erase the byte before writing.
Code:
0660008630c602f7103bb7b7ffc603f7103b
mode 6 payload breakdown:
8630 ldaa #$30 load $30 into register a
c602 ldab #$02 load $02 into register b
f7103b stab $103b store register b contents to address $103b - set EELAT bit - enables write mode to eeprom
b7b7ff staa $b7ff store register a contents to address $b7ff (last byte of eeprom)
c603 ldab #$03 load $03 into register b
f7103b stab $103b store register b contents to address $103b - set EPGM bit - enables programming voltage
# note - example jumps to a delay 10 ms routine, I simply sent the next command as quickly as possible after the previous 06 payload
0660007f103b
mode 6 payload breakdown:
7f103b clr $103b clear EELAT and EPGM bits and return to read mode
Obviously working on multiple bytes more logic will need to be involved - i.e. waiting 10ms after enabling programming voltage, etc.
Bookmarks