16f628a code bug

Guest
Hello, I am using an older PIC 16f628 microcontroller to generate sine
waves using a lookup table to calculate the sine function, and I want
to use the 16f628a instead, but the lookup table function is
mysteriously being called with excessively large w register values that
overrun the end of the table causing glitches in the waveform. Is it
possible that since my table is located at address 0x02 (I think) that
something like an interrupt could be occurring unexpectedly that enters
the table? I do not have problems with any other programs on these new
chips, only when I try to use a lookup table. And I have positioned the
table between program memory boundaries.

Thanks,
jan
 
Thanks guys,
I added a couple lines of code to process any interrupt that could
occur (org 0x04 ; retfie), and made sure that the compiler was set to
the "a" version chip and it worked great. I don't know why the simple
code was causing an interrupt on the new chip though.

Jan
 

Welcome to EDABoard.com

Sponsor

Back
Top