Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Discussion Groups

Discussion Groups | Piclist | Re: goto k , k>2048 and PCLATH

A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.

goto k , k>2048 and PCLATH - ntricoup - Jul 10 14:13:00 2004


Hi to everyone,
I just wrote a quite big code (7000 lines) where there are many goto
exit lines with the exit label near the end. Runnint the program i
realised that not all of the goto were going to the real exit but to
some lines differing 2048 address lines. Reading the instruction set
i realised that goto k command is only used for k<=2047. Is there
any way to correct the problem. is it possibleto keep "goto exit"
commands or must i use goto +(a number) and adjusting the PCLATH? IT
is some kind of a problem. Thank you all for your time.
Nikolaos Trikoupis





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

RE: goto k , k>2048 and PCLATH - Mauricio D. Jancic - Jul 10 14:55:00 2004

Read the section 2.3 of the PIC16F877 datasheet or the equivalen on any other datasheet. The title is “PCL and PCLATH” it explains you that issue

 

Mauricio D. Jancic

Janso Desarrollos - Microchip Consultant

(54) 011 - 4542 - 3519

Lugones 3238 "B" - C1430ECN

www.janso.com.ar

i...@janso.com.ar

MSN: j...@hotmail.com


From: ntricoup [mailto:n...@yahoo.gr]
Sent: Saturday, July 10, 2004 4:13 PM
To: p...@yahoogroups.com
Subject: [piclist] goto k , k>2048 and PCLATH

 

Hi to everyone,
I just wrote a quite big code (7000 lines) where there are many goto
exit lines with the exit label near the end. Runnint the program i
realised that not all of the goto were going to the real exit but to
some lines differing 2048 address lines. Reading the instruction set
i realised that goto k command is only used for k<=2047. Is there
any way to correct the problem. is it possibleto keep "goto exit"
commands or must i use goto +(a number) and adjusting the PCLATH? IT
is some kind of a problem. Thank you all for your time.
Nikolaos Trikoupis



to unsubscribe, go to http://www.yahoogroups.com and follow the instructions





(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )

Re: goto k , k>2048 and PCLATH - rtstofer - Jul 10 15:01:00 2004


Check out the documentation on LGOTO and LCALL - these are built-in
macros that handle paging.

--- In , "ntricoup" <ntricoup@y...> wrote:
> Hi to everyone,
> I just wrote a quite big code (7000 lines) where there are many
goto
> exit lines with the exit label near the end. Runnint the program i
> realised that not all of the goto were going to the real exit but
to
> some lines differing 2048 address lines. Reading the instruction
set
> i realised that goto k command is only used for k<=2047. Is there
> any way to correct the problem. is it possibleto keep "goto exit"
> commands or must i use goto +(a number) and adjusting the PCLATH?
IT
> is some kind of a problem. Thank you all for your time.
> Nikolaos Trikoupis




(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )