PDA

View Full Version : PIC16F648A big differences assembler



KB3BYT
- 19th December 2004, 05:24
I have a friend who does only assembler projects...just for fun..
stuff like morse code memory keyer toys for radio operators.
We give the stuff away, its not for profit.
His web site is www.qrpis.org
He ran into a space problem on PIC16F628 chips so I shared
some PIC16F648A chips with him. We figured they had 4K of
program space so this should be fun.
He sent me the following email talking about crossing memory
page boundaries. I strictly use PBP and was wondering if I
have to worry about any boundaries and also was wondering if
anyone had any great advice for my friend using assembler and
the 648 chips:::::::::::::::
-------------------------------------------------------------------
I'm programming the chips with my parallel port programmer and different software. I have found free software yet that does in circuit programming for this chip.

I can compile all the code but I've hit a new problem with 648A. I'm crossing memory page boundaries so Im going to have to do 'pagesel' before nearly every goto for the compiled code to actually work. I'm disappointed that the Microchip compiler doesn't handle this automatically. The datasheet doesn't come right out and talk about memory paging. You have to put two and two together and read between the lines in the datasheet to figure out WTF is going on.

If pagesel works, I should have all the code on the 648A by tonight or the end of the weekend.
----------------------------------------------------------------------

Luciano
- 19th December 2004, 12:37
Microchip Technology Inc.
Application note AN586
Macros for Page and Bank Switching
http://ww1.microchip.com/downloads/en/AppNotes/00586b.pdf

Microchip Technology Inc.
Application note AN581
Implementing Long Calls
http://ww1.microchip.com/downloads/en/AppNotes/00581b.pdf

Bruce
- 19th December 2004, 17:14
If you're using PBP, then you don't need to worry about page or bank selection. PBP handles this for you automatically.

Your friend that's using assembler will.