I'm working with asm for the first time and need about 16 registers to hold data. Seem after a few minutes my chip wont burn, I get mismatching data.
WARNING: FLASH byte address 0x0006 is 0x8A (should be 0xBA).. FAILED!
Here is the code I'm testing for the first 8 registers. Please not the forum would not let me put this code in correctly.
//put the status of PORTC in a register Every other NOP. in r0, PORTC \n "nop \n //r1 cause issues.. in r2, PORTC\n "nop \n in r3, PORTC\n "nop \n in r4, PORTC\n "nop \n in r5, PORTC\n "nop \n in r6, PORTC\n "nop \n in r7, PORTC\n "nop \n in r8, PORTC\n //now takes the first bit of each and put it in to register 0 BST r2, 0 \n BLD r0, 1 \n BST r3, 0 \n BLD r0, 2 \n BST r4, 0 \n BLD r0, 3 \n BST r5, 0 \n BLD r0, 4 \n BST r6, 0 \n BLD r0, 5 \n BST r7, 0 \n BLD r0, 6 \n BST r8, 0 \n BLD r0, 7 \n
For those that are wondering why I'm doing this, its to get the first bit of PORTC with in a single clock with in very tight timing. However this is only a test, the issue here is that my chip is not usable after a few minutes. So I'm guessing I'm using registers that I should not be. And I just dont know enough about what register I can use. I need 16 of them if possible.
That or pop off the first bit of PORTC into a bit of a register with in two nops..
Something less then
"in r0, PORTC \n"
"BST r0, 0 \n"
"BLD r1, 1 \n"