Doing a 256 byte table (assuming you're using retlw tables) is a bit tricky. The paging we're dealing with here is only 256 bytes because that's only how far an addwf pcl,1 works. So, I do something like this... org ($ && 0xf00) + oxfc ; Force table onto next page TableRoutine movlw high(startTable) ; Get high byte of table start movwf pclath ; Set up to for pc add movfw offset ; Get offset into table addwf pcl,1 ; Add to PC low, jumping into table startTable retlw someNumber ; This is at address 0x??00 retlw someNumber ; ox??01 I don't have my PIC documentation here at home, but it should be something like this. WHENEVER I have strange PIC behavior, I look at the absolute listing and make sure that the table doesn't go over a 256 byte boundary. If so, the pclath will have the wrong value in it. Harold On Tue, 23 Nov 1999 15:46:45 -0500 "Thomas C. Sefranek" writes: >Harold M Hallikainen wrote: > >> I have several products running the A/D on the 16c74 over >the >> full 0 to 5V range. I wonder about your lookup table. any >possibility >> you're going over a page boundary causing it to blow up? What >happens if >> you simulate dropping in higher values where you sample the A/D >result >> register? > >Sigh! > >Unfortunately, the page boundry on a 16C73 is at 07FFh. >My code only goes to 012Dh. >The lookup table is only 256 values. >I was so hopefull! > >> >> As you suspect, IT OTTA WORK! >> >> Harold >> >> Harold Hallikainen >> harold@hallikainen.com >> Hallikainen & Friends, Inc. >> See the FCC Rules at http://hallikainen.com/FccRules and comments >filed >> in LPFM proceeding at http://hallikainen.com/lpfm >> >> On Tue, 23 Nov 1999 14:53:13 -0500 "Thomas C. Sefranek" > >> writes: >> >Well here's the story so far... >> > >> >NO JOY! >> > >> >I've employed all suggestions so far, silly or otherwise. >> > >> >Rebuilt another board to ONLY have the PIC, a bicolor LED, and a >> >clock. >> >STRONG Grounds PINS 19 and 8. >> >1 ufd caps on the A-D inputs. Low impedance, low noise power supply >to >> >the A-D. >> >2 ea .1 ufd caps between PINS 20 and 19 (VDD& VSS) pins. >> >1 Mhz clock, machine cycles are 250 khz. >> >External V.Ref tied to VDD and bypassed with 1 ufd. >> >(Tried internal Vref to VDD also.) >> > >> >Symptoms: >> >System code works FINE up to 4.14 volts at the A-D input, when VDD >is >> >5.000 Volts. >> >(All values output from the lookup table in that voltage range are >> >correct!) >> > >> >Increasing VDD to 5.25 volts get it work with A-D levels up to >4.38 >> >volts. >> >(Seems to follow VRef. so it's not magically related to a sweet >spot >> >voltage.) >> >But I still can't get the A-D to work on values (? within a diode >> >drop) >> >of VDD! ~.86Volts. >> >The software freezes! (Latch up?) >> >(Lower the voltage on the A-D slightly, and the system resumes >> >processing...) >> > >> >I know it's dangerous to accuse but... I'm SO FRUSTRATED! >> >I doubt that ANYONE has this PIC working the FULL range of A-D! >> >(Including Microchip! as they suggested I buy the B version to fix >the >> >problem!) >> > >> >PLEASE PROVE me WRONG by supplying a working system >> >for me to test my chip, or some other method of proving the chips >> >actually can work. >> > >> >I'm not a hacker, I've been doing assembly on Motorola processors >> >since >> >there has been >> >Motorola processors! (6800) I'm not bad in Electronics either, >30 >> >years in R&D >> >RF, Radar, Laser, Video, Audio, Power supplies, Micros, computer >> >peripherals, >> >you name it, I've successfully designed and built it! >> > (And I CAN get a MC68HC11 to do full range A-D without breaking a >> >sweat!) >> > >> >Fess up! >> >-- >> >Thomas C. Sefranek WA1RHP >> >ARRL Instructor, Technical Specialist, VE Contact. >> >http://www.harvardrepeater.org >> >http://hamradio.cmcorp.com/inventory/Inventory.html >> >> ___________________________________________________________________ >> Get the Internet just the way you want it. >> Free software, free e-mail, and free Internet access for a month! >> Try Juno Web: http://dl.www.juno.com/dynoget/tagj. > >-- >Thomas C. Sefranek WA1RHP >ARRL Instructor, Technical Specialist, VE Contact. >http://www.harvardrepeater.org >http://hamradio.cmcorp.com/inventory/Inventory.html ___________________________________________________________________ Get the Internet just the way you want it. Free software, free e-mail, and free Internet access for a month! Try Juno Web: http://dl.www.juno.com/dynoget/tagj.