![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I am working with a disassembly listing that uses the 16F877 and it is full of instructions modifing PCLATH. I am converting it to run on a 16F628 and would like to know when an operation to PCLATH is required?? I have read the datasheets and it just has to be simple way to determine when to use one. Would appreciate any explanation!!!! Thanks I use MPLAB and WINPINPRO. | |
| |
| | (permalink) | |
| Quote:
So generally you don't need all the paging instructions with a 628. The original program was most probably written using a high level language, these usually insert paging instructions even when they are not needed. | ||
| |
| | (permalink) |
| Thanks Nigel! It makes sense now. I will set up the code like I usually do for a 628 and it will be a lot simpler to debug and a lot smaller. Yes, the hex file was generated from some sort of basic compiler. I stick with ASM for the PICs though. Happy Holdays! | |
| |