| Electronics > Beginners |
| Assembly code Help! PIC16F57 |
| << < (30/32) > >> |
| Electrofinn:
already tried it and its the same. |
| KL27x:
Ok probably a human error. Lemme see Yeah, changed only part of my #define's for shuffling new_byte around. Amended .asm attached. |
| Electrofinn:
Nah, Still the same. |
| KL27x:
Ok, no problem. Just checked and I was clearing this bit in front of what I thought was a incf credit_counter, but it turned out to be credit_timer. That would do it. This is par for the course, and why this is a stupid undertaking from the start. :) FWIW, Source of some these errors (on top of manipulating the same registers in multiple subroutines that run simultaneously) lies in how the coder uses mode_byte,7 as a distinguisher for if a routine is being called for the first time or not. The problem is he uses the same bit for every routine. And many of the routines get activated at the same time. This would have been much clearer and more flexible/options if there were a unique bit for each subroutine as a busy flag. But now that it's all said and done, there are likely places where this mess produces the intended result. So leave sleeping dogs lie. So if this produces unintended results right after the timeout is done, try putting bcf mode_byte,7 right after timeout.end |
| Electrofinn:
--- Quote ---So if this produces unintended results right after the timeout is done, try putting bcf mode_byte,7 right after timeout.end --- End quote --- Will do, however everything seems fine so far. Fingers crossed! |
| Navigation |
| Message Index |
| Next page |
| Previous page |