PDA

View Full Version : 16F877A to 16F887 Migration Issues



tmorgan4
- 25th November 2012, 16:22
I'm attempting to modify a program written for a 16F877A to be used with a 16F887. I am new to programming PICs and I'm running into many issues! Any suggestions are greatly appreciated.

The program I'm trying to modify was provided in this thread (http://www.picbasic.co.uk/forum/showthread.php?t=12674). I'm attempting to build the same gaming console with the 16F887.

I did find this page (http://melabs.com/support/887migration.htm) and changed the ADCON1 command to ANSEL and ANSELH to set all pins to digital. The header provided with the program caused errors so I removed it from the program and configured the PIC after it was compiled using the programmer software.

The program will compile fine but ICD compile shows "argument out of range" errors. If I run the ICD compile for a 16F877A along with the unmodified code it shows the same errors. A search on google shows others with the same issue and modifications to the program header solved their issues. I tried using many of the headers I found but none of them fixed the errors. What other changes need to be made?

Any advice is greatly appreciated. I'm lost and troubleshooting this circuit but unable to determine whether the problem is the program on the PIC or the circuit itself! :o

Attached is the original 16F877 code I'm trying to make work.

Normnet
- 25th November 2012, 16:51
Darrel has posted this to be placed at the top of the program as PBP takes care of this internally:
@ ERRORLEVEL -306 ; turn off crossing page boundary message

I didn't find the answer to the following however:
Message[305] E:\SOURCE.ASM 588 : Using default destination of 1 (file).

The upcoming version of FineLineIDE includes an unused button which shows variables "D2", "D3" and the label "error:" as unused.

Norm

tmorgan4
- 26th November 2012, 14:20
Appreciate the hint. I'll give that a try and see where it gets me. If anyone else has suggestions for how to cure the other errors or if I can simply ignore then please post up!