Hi, Bart Stofferis wrote: > > Hi there !! > > Name here is Bart, and i have got some problems with my LUTs (lookup > tables) & PIC16C73A or 16C76. > > I have to implement 10 tables of 127 bytes and the problem is that when > an interrupt occurs the > program counter jumps somewhere in space ... lost in space ... > > I don't understand the program counter mechanism very well ... > > Can someone reserve some time to have a look at my experiments > > I have included 2 files, the main program file and the LUT-file > > Thanks a lot ... and enjoy ! > While I didn4t look through the whole programm, I would suggest4, to copy the interrupt service routine to each page. I think that when processing the irq, just the actual PC is pushed onto the stack. And because of the WIDTH of the PC only addresses within a page are pushed, popped or jumped to. Trying to explain it in a different way: You may think of the Pic-rom as like to have e.g. some ROM chips with a chipselect done by a external register. the external register doesn4t know about irq4s so either a bankswitch to the ISR in bank 0 has to be executed ( routine to do that has to be e.g. in bank 1 at the same location as where the original routine is located in bank 0 ) or just copy the ISR to each used bank. The later suggestion prevents you from keeping track where your jump to ISR came from. Kind regards, Stefan