--Apple-Mail-7-723241918 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi Guys, Ok, I think I got it. Have resolved my poor understanding of what I was observing. Setup the hardware with LEDs on two separate GPIO pins. And with Ruben's code (thanks Ruben) to check the IxIE bits before checking the IxIF bits, I was able to see what each timer did when enabled or not. There was a few dumb assumptions that lead me into the weeds. One I'll admit to is that for some reason, I didn't consider that Timer 1 was actually causing interrupts at about 15 times per second to make the 1 sec LED flash. Not the 1 interrupt per flash I had in my mind. So when the LED started flashing at the Timer 0 rate I thought some how it got turned on. I was thinking that once through the isr per sec would only capture 1 TMR0 rollover. This would be seen as an additional quick flash of the LED during its 1 sec flashing. But at 15 per second the TMR0 rollovers could be tracked. Also for the record, a 1MHz instruction rate and TMR0 with a divide by 256 prescaler will cause an interrupt rate of about 8Hz, a visually discernible flash rate. I've attached working code, which incorporates, comment fixes, and Olin's relocatable code comments, for anyone who's interested. Many thanks for all your patience. Heinz --Apple-Mail-7-723241918 Content-Transfer-Encoding: quoted-printable Content-Type: application/octet-stream; x-unix-mode=0644; name=Program_2 fixed.ASM Content-Disposition: attachment; filename="Program_2 fixed.ASM" ;**********************************************************************=0D= =0A;=20=20=20This=20Program=20uses=20both=20Timer0,=20and=20Timer1=20to=20= Flash=20a=20pair=20of=20LEDs=20*=0D=0A;=20=20=20at=20two=20different=20= rates.=20Timer0=20controls=20one=20rapidly=20flash=20LED=20and=20*=0D=0A= ;=20=20=20Timer1=20controls=20one=20flashing=20at=20a=20slower=20nominal=20= .5=20sec=20rate.=20=20=20=20=20*=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20*=0D=0A;=20=20=20LED1=20is=20connected=20to=20GPIO1=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D=0A;=20=20=20LED2=20is=20= connected=20to=20GPIO2=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D= =0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D=0A;=20= =20=20Demonstrates=20the=20use=20of=20multiple=20interrupt=20sources=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D=0A;=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20*=0D=0A= ;**********************************************************************=20= =20=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D= =0A= ;**********************************************************************=0D= =0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D=0A;=20= =20=20=20Filename:=09=20=20=20=20675-2LEDT0T1.asm=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20*=0D=0A;=20=20=20=20Date:=20=20=20=20=20=20=20=20=20=20July=2012,=20= 2009=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D=0A;=20=20=20=20File=20= Version:=20=20Dev=201.0=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20*=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D= =0A;=20=20=20=20Author:=20=20=20=20=20=20=20=20Heinz=20Czychun=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20*=0D=0A;=20=20=20=20Company:=20=20=20=20=20=20=20= N/A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D= =0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20*=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20*=0D=0A= ;**********************************************************************=0D= =0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D=0A;=20= =20=20=20Files=20required:=20p12f675.inc=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20*=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= 12F675.lkr=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D=0A;=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D=0A;=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20*=0D=0A= ;**********************************************************************=0D= =0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D=0A;=20= =20=20=20Notes:=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20*=0D=0A;=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20*=0D=0A= ;**********************************************************************=0D= =0A=0D=0A=09list=20=20=20=20=20=20p=3D12f675=20=20=20=20=20=20=20=20=20=20= =20=20;=20list=20directive=20to=20define=20processor=0D=0A=09#include=20= =20=20=20=20=20=20=20=20;=20processor=20specific=20variable=20= definitions=0D=0A=0D=0A=09errorlevel=20=20-302=20=20=20=20=20=20=20=20=20= =20=20=20=20=20;=20suppress=20message=20302=20from=20list=20file=0D=0A=0D= =0A=09__CONFIG=20=20=20_CP_OFF=20&=20_CPD_OFF=20&=20_BODEN_OFF=20&=20= _MCLRE_ON=20&=20_WDT_OFF=20&=20_PWRTE_ON=20&=20_INTRC_OSC_NOCLKOUT=20=20=0D= =0A=0D=0A;=20'__CONFIG'=20directive=20is=20used=20to=20embed=20= configuration=20word=20within=20.asm=20file.=0D=0A;=20The=20lables=20= following=20the=20directive=20are=20located=20in=20the=20respective=20= .inc=20file.=0D=0A;=20See=20data=20sheet=20for=20additional=20= information=20on=20configuration=20word=20settings.=0D=0A;=0D=0A;=0D=0A;=20= Config=20Register=0D=0A;=0D=0A;Bits=2013-12=20-=20BandGap=20calibration=20= -=2000=20Lowest=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20-=2011=20Highest=0D=0A= ;Bits=2011-=209=20-=20Don't=20Care=0D=0A;=0D=0A;Bit=20=20=20=20=20=208=20= -=20~CPD:=20Data=20Code=20Protection=20=20=20=20=20-=201=20no=20code=20= protect=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= -=200=20code=20protect=0D=0A;Bit=20=20=20=20=20=207=20-=20~CP:=20=20= Program=20=20Code=20Protection=20-=201=20no=20code=20protect=0D=0A;=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20-=200=20code=20= protect=0D=0A;Bit=20=20=20=20=20=206=20-=20BODEN:=20Brown-out=20Detect=20= =20=20=20=20=20=20=20-=201=20BOD=20on=0D=0A;=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20-=200=20BOD=20off=0D=0A;Bit=20=20=20=20=20=20= 5=20-=20MCLRE:=20GP3/MCLR=20pin=20function=20=20=20-=201=20~MCLRE=20=0D=0A= ;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20-=200=20no=20= ~MCLRE=0D=0A;Bit=20=20=20=20=20=204=20-=20PWRTE:=20Power-up=20Timer=20=20= =20=20=20=20=20=20=20=20-=201=20no=20Timer=0D=0A;=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20-=200=20yes=20Timer=0D=0A;Bit=20=20=20=20= =20=203=20-=20WDTE:=20Watchdog=20Timer=20=20=20=20=20=20=20=20=20=20=20-=20= 1=20yes=20Timer=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20-=200=20no=20Timer=0D=0A;Bits=202=20-=200=20-=20FOSC2:FOSC0:=20= Oscillator=20=20=20=20=20=20=20=0D=0A;=20=20=20=20=20=20=20=20=20=20=20-=20= 111=20RC=20oscillator:=20CLKOUT=20-=20GP4,=20RC=20-=20GP5=0D=0A;=20=20=20= =20=20=20=20=20=20=20=20-=20110=20RC=20oscillator:=20I/O=20function=20-=20= GP4,=20Rc=20-=20GP5=20=0D=0A;=20=20=20=20=20=20=20=20=20=20=20-=20101=20= INTOSC=20oscillator:=20=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20CLKOUT=20function=20-=20GP4,=20I/O=20function=20-=20GP5=20=0D=0A;=20= =20=20=20=20=20=20=20=20=20=20-=20100=20INTOSC=20oscillator:=20=0D=0A;=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20I/O=20function=20-=20= GP4,=20I/O=20function=20-=20GP5=20=0D=0A;=20=20=20=20=20=20=20=20=20=20=20= -=20011=20EC:=20I/O=20function=20-=20GP4,=20CLKIN=20-=20GP5=20=0D=0A;=20=20= =20=20=20=20=20=20=20=20=20-=20010=20HS=20oscillator:=20=0D=0A;=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20High=20speed=20crystal/resonator-=20= GP4=20&=20GP5=0D=0A;=20=20=20=20=20=20=20=20=20=20=20-=20001=20XT=20= oscillator:=20=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= Crystal/resonator=20-=20GP4=20&=20GP5=0D=0A;=20=20=20=20=20=20=20=20=20=20= =20-=20000=20LP=20oscillator:=20=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20Low=20power=20crystal=20on=20GP4=20&=20GP5=0D=0A;=0D=0A;=20= CONFIG=20=97=20CONFIGURATION=20WORD=20(ADDRESS:=202007h)=20=0D=0A;=20= CONFIG=20Setting=20-=200x01FF=0D=0A;=0D=0A;=20Configured=20for=20Code=20= Protect=20=20=20=20=20=20=20=20off=0D=0A;=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20Data=20EEPROM=20Protect=20off=0D=0A;=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20Brownout=20Detect=20=20=20=20=20off=0D=0A;=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20Master=20Clear=20=20=20=20=20=20=20= =20on=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20Watchdog=20= Timer=20=20=20=20=20=20off=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20Power-up=20Timer=20=20=20=20=20=20on=0D=0A;=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20Internal=20Oscillator=20on=20with=20I/O=20on=20= GP4=20&=20GP5=0D=0A;=0D=0A;=20This=20will=20setup=20the=20F675=20to=20= loose=20only=20three=20pins=0D=0A;=20Vdd=20=20-=20Pin=201=0D=0A;=20Vss=20= =20-=20Pin=208=0D=0A;=20MClr=20-=20Pin=204=20(J1-2)=0D=0A;=20=20=20=20=20= =20=20=20=20=20=20=20=20=20___________=0D=0A;=20=20=20=20=20=20=20=20=20= Vdd=20-|=201=20=20=20=20=208=20|-=20=20Vss=0D=0A;=20=20=20GP5=20T1CKI=20= -|=20=20=20=20=20=20=20=20=20|-=20=20GP0=20AN0=20CIN+=0D=0A;=20GP4=20AN3=20= T1G=20-|=20=20=20=20=20=20=20=20=20|-=20=20GP1=20AN1=20CIN=20VREF=0D=0A;=20= =20=20=20=20=20=20=20MClr=20-|=204=20=20=20=20=205=20|-=20=20GP2=20AN2=20= T0CKI=20INT=0D=0A;=20=20=20=20=20=20=20=20=20=20=20=20=20=20-----------=0D= =0A;=0D=0A;=20Available=20Pins=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20LPC=20J1=20Connector=20=20=20=20=0D=0A;=0D=0A;=20GP0=20(RA0)=20= -=20Pin=207=20-=20AN0/CIN+=20=20=20=20=20=20=20=20=20J1=20-=20=207=0D=0A= ;=20GP1=20(RA1)=20-=20Pin=206=20-=20AN1/CIN-/VREF=20=20=20=20J1=20-=20=20= 8=0D=0A;=20GP2=20(RA2)=20-=20Pin=205=20-=20AN2/T0CKI/INT=20=20=20=20J1=20= -=20=209=0D=0A;=20GP4=20(RA4)=20-=20Pin=203=20-=20AN3/T1G=20=20=20=20=20=20= =20=20=20=20J1=20-=20=202=0D=0A;=20GP5=20(RA5)=20-=20Pin=202=20-=20T1CKI=20= =20=20=20=20=20=20=20=20=20=20=20J1=20-=20=201=0D=0A;=0D=0A;=20LPC=20= Board=20Resources=20=20=20=20=20=20=20=20=20=20=20=20=20=20LPC=20J1=20= Connector=0D=0A;=20Button=20-=20SW1=20(RA3)=20-=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20J1=20-=20=202=0D=0A;=0D=0A;=20LED=20=20=20=20-=20= DS1=20(RC0)=20-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20J1=20-=20= 10=0D=0A;=20LED=20=20=20=20-=20DS2=20(RC1)=20-=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20J1=20-=2011=0D=0A;=20LED=20=20=20=20-=20DS3=20= (RC2)=20-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20J1=20-=2012=0D= =0A;=20LED=20=20=20=20-=20DS4=20(RC3)=20-=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20J1=20-=20=206=0D=0A;=0D=0A;=20Pot=20=20=20=20-=20RP1=20= (RA0)=20-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20J1=20-=20=20= 7=0D=0A;=0D=0A;=20Hardware=20considerations:=0D=0A;=20On=20the=20LPC=20= Board=20the=20LEDs=20are=20not=20connected=20to=20the=20pins=20= associated=0D=0A;=20with=20the=208-pin=20PICs=20so=20the=20DS1=20LED=20= must=20be=20jumpered=20to=20GP1=20(pin=206)=0D=0A;=20on=20the=2012F675.=20= This=20is=20done=20at=20connector=20J1=20by=20connecting=20a=20jumper=20=0D= =0A;=20wire=20between=20J1-8=20(GP1)=20and=20J1-10=20(RC0=20-=20DS1).=20= Alternatively=20an=20LED=0D=0A;=20with=20a=20series=20resistor=20can=20= be=20connected=20to=20J1-8.=20Connect=20this=20just=20=0D=0A;=20like=20= the=20on-board=20LEDs.=0D=0A;=20The=20second=20LED=20(RC1=20-=20DS2)=20= can=20be=20connected=20to=20GP2=20(J1-9)=20by=20adding=0D=0A;=20a=20= jumper=20from=20J1-9=20t0=20J1-11.=0D=0A;=0D=0A;********=20Constants=0D=0A= ;=0D=0ALED_DS1=20equ=20b'00000010'=20=20;=20bit=20mask=20for=20LED1=20on=20= GP1=0D=0ALED_DS2=20equ=20b'00000100'=20=20;=20bit=20mask=20for=20LED2=20= on=20GP2=0D=0A;=0D=0A;*******=20Macro=20definitions=20= **********************************=0D=0A;=0D=0AMOVLF=20=20=20macro=20=20=20= literal,=20dest=0D=0A=20=20=20=20=20=20=20=20movlw=20=20=20literal=0D=0A=20= =20=20=20=20=20=20=20movwf=20=20=20dest=0D=0A=20=20=20=20=20=20=20=20= endm=0D=0A;=0D=0A= ;**********************************************************************=0D= =0A;*****=20VARIABLE=20DEFINITION=0D=0A;example=20of=20using=20Shared=20= Uninitialized=20Data=20Section=0D=0A;=0D=0AINT_VAR=09=09UDATA_SHR=09=20=20= =0D=0Aw_temp=09=09RES=20=20=20=20=201=09;=20variable=20used=20for=20= context=20saving=20=0D=0Astatus_temp=09RES=20=20=20=20=201=09;=20= variable=20used=20for=20context=20saving=0D=0A;=0D=0AsGPIO=20=20=20=20=20= =20=20RES=20=20=20=20=201=20=20=20;=20Shadow=20Register=20for=20output=20= to=20prevent=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20;=20RMW=20errors=0D=0A;=0D=0Arlovrflag=20=20=20RES=20=20=20= =20=201=20=20=20;=20flag=20to=20signal=20main=20loop=20to=201=20sec=20= has=20passed=0D=0A;=0D=0Abres_hi=09=09RES=20=20=20=20=201=09;=20hi=20= byte=20of=20the=20Bresenham=2024bit=20accumulator=0D=0Abres_mid=09RES=20=20= =20=20=201=09;=20mid=20byte=0D=0Abres_lo=09=09RES=20=20=20=20=201=09;=20= lo=20byte=0D=0ATemp_mid=20=20=20=20RES=20=20=20=20=201=20=20=20;=20= Temporary=20reg=20used=20in=20Bresenham=20accumulator=20addition=0D=0A;=0D= =0A= ;**********************************************************************=0D= =0A;=0D=0ARESET_VECTOR=09CODE=090x000=09;=20processor=20reset=20vector=0D= =0A=20pagesel=20=20main=0D=0A=20=20=20=20goto=20=20main=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20;=20go=20to=20beginning=20of=20program=0D=0A= .=0D=0AINT_VECTOR=09=20=20=20=20CODE=20=20=20=200x004=20=20=20;=20= interrupt=20vector=20location=0D=0A= ;_________________________________________________________________________= _________=0D=0A;=0D=0A;=20Control=20is=20here=20because=20either=20Timer=20= 0=20or=20Timer=201=20has=20rolled=20over=0D=0A;=0D=0AiServ=0D=0A=20=20=20= movwf=20=20w_temp=20=20=20=20=20=20=20=20=20=20;=20save=20off=20current=20= W=20register=20contents=0D=0A=20=20=20=20movf=20=20STATUS,w=20=20=20=20=20= =20=20=20;=20move=20status=20register=20into=20W=20register=0D=0A=20=20=20= movwf=20=20status_temp=20=20=20=20=20;=20save=20off=20contents=20of=20= STATUS=20register=0D=0A;=20=0D=0A=20=20=20btfsc=20=20INTCON,T0IE=20=20=20= =20=20;=20in=20both=20banks=0D=0A=20=20=20btfss=20=20INTCON,T0IF=0D=0A=20= =20=20=20goto=20=20ServiceTimer0_end=0D=0A;=0D=0AServiceTimer0=0D=0A;=0D=0A= =20=20=20=20=20bcf=20=20INTCON,T0IF=0D=0A;=0D=0A=20=20=20=20movf=20=20= sGPIO,w=20=20=20=20=20=20=20=20=20;=20get=20shadow=20copy=20of=20GPIO=0D=0A= =20=20=20xorlw=20=20LED_DS2=20=20=20=20=20=20=20=20=20;=20flip=20bit=20= corresponding=20to=20GP2=20(bit=204)=0D=0A=20=20=20movwf=20=20GPIO=20=20=20= =20=20=20=20=20=20=20=20=20;=20write=20to=20GPIO=0D=0A=20=20=20movwf=20=20= sGPIO=20=20=20=20=20=20=20=20=20=20=20;=20and=20update=20shadow=20copy=0D= =0A;=0D=0AServiceTimer0_end=0D=0A;=0D=0A;=20continue=20checking=20for=20= other=20interrupt=20sources=0D=0A;=0D=0A;=20Check=20for=20Time=201=20= interrupt=0D=0A;=0D=0A=20banksel=20=20PIE1=20=20=20=20=20=20=20=20=20=20=20= =20;=20Bank=201=0D=0A=20=20=20btfsc=20=20PIE1,T1IE=0D=0A=20banksel=20=20= PIR1=20=20=20=20=20=20=20=20=20=20=20=20;=20Bank=200=0D=0A=20=20=20btfss=20= =20PIR1,T1IF=20=20=20=20=20=0D=0A=20=20=20=20goto=20=20ServiceTimer1_end=0D= =0A;=0D=0AServiceTimer1=0D=0A=20banksel=20=20PIR1=20=20=20=20=20=20=20=20= =20=20=20=20;=0D=0A=09=20bcf=20=20PIR1,T1IF=09=09=20=20;=20clear=20TMR1=20= interrupt=20flag=0D=0A;=0D=0A=09= ;-------------------------------------------------=0D=0A=09;=20Note!=20= we=20get=20here=20every=2065,536=20instructions,=20we=0D=0A=09;=20can=20= now=20do=20our=20special=20one=20second=20timing=20system.=09=09=09=09=0D= =0A=0D=0A=09;=20This=20consists=20of=20three=20main=20steps;=0D=0A=09;=20= *=20subtract=2065,536=20counts=20from=20our=2024bit=20variable=0D=0A=09;=20= *=20test=20if=20we=20reached=20the=20setpoint=20(high=20byte=20=3D=200)=0D= =0A=09;=20*=20if=20so,=20add=201,000,000=20counts=20to=2024bit=20= variable=20and=20generate=20event.=0D=0A=20=20=20=20;=20*=20assuming=20= an=204MHz=20clock,=20and=20TMR1=20no=20prescaler,=20ticks=20every=204=20= Osc=20clocks=0D=0A=20=20=20=20;=20*=201MHz=20operation=0D=0A=09= ;-------------------------------------------------=0D=0A;=0D=0A=20= banksel=20=20bres_hi=0D=0A=20=20decfsz=20=20bres_hi,f=20=20=20=20=20=20=20= ;=20decrement=20bresenham=20counter=20high=20byte=0D=0A=20=20=20=20goto=20= =20iServ_Exit=20=20=20=20=20=20;=20lf=20non-zero=20exit=20isr=0D=0A;=0D=0A= ;=20since=20bres_hi=20is=200=0D=0A;=20so=20a=20sec=20elapsed,=20more=20= or=20less=0D=0A;=20add=201M=20(0F=2042=2040=20in=20hex)to=20bresenham=20= accumulator=0D=0A;=0D=0A=20=20=20=20MOVLF=20=200F,=20bres_hi=20=20=20=20= ;=20move=20hign=20value=20into=20bres-accu=0D=0A=20=20=20=20MOVLF=20=20= 42,=20Temp_mid=20=20=20;=20need=20to=20hold=20mid=20count=20in=20a=20= temp=20register=0D=0A;=0D=0A;=20do=20the=20addition=0D=0A=20=20=20=20=20=20= bcf=20=20STATUS,=20C=20=20=20=20=20=20;=20clear=20carry=20flag=0D=0A=20=20= =20=20movlw=20=200x40=20=20=20=20=20=20=20=20=20=20=20;=20get=20low=20= value=0D=0A=20=20=20=20addwf=20=20bres_lo,=20f=20=20=20=20=20;=20add=20= low=20count=20to=20bres-accu=20low=0D=0A=20=20=20=20skpnc=0D=0A=20=20=20=20= =20incf=20=20Temp_mid,=20f=20=20=20=20;=20if=20overflow=20add=201=20to=20= counter=20mid=0D=0A=20=20=20=20=20movf=20=20Temp_mid,=20w=20=20=20=20;=20= else=20just=20get=20counter=20mid=0D=0A=20=20=20=20addwf=20=20bres_mid,f=20= =20=20=20=20;=20add=20to=20bres-accu=20mid=0D=0A=20=20=20=20skpnc=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=0D=0A=20=20=20=20=20incf=20=20= bres_hi,f=20=20=20=20=20=20;=20if=20overflow=20add=201=20to=20bres-accu=20= hi=0D=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20;=20do=201=20sec=20stuff=20here=0D=0A=09= ;-------------------------=0D=0A=09=09=09=09=20=20=20=20=20=20=20=20=20=20= ;=20now=20we=20do=20the=20"event"=20that=20we=20do=20every=20one=20= second.=0D=0A=09=09=09=09=20=20=20=20=20=20=20=20=20=20;=20Add=20your=20= own=20code=20here=20for=20your=20one=20second=20event.=0D=0A=20;=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=0D=0A=20=20=20=20= =20movf=20=20sGPIO,w=20=20=20=20=20=20=20=20;=20get=20shadow=20copy=20of=20= GPIO=0D=0A=20=20=20=20xorlw=20=20LED_DS1=20=20=20=20=20=20=20=20;=20flip=20= bit=20corresponding=20to=20GP1=20(bit=201)=0D=0A=20=20=20=20movwf=20=20= GPIO=20=20=20=20=20=20=20=20=20=20=20;=20write=20to=20GPIO=0D=0A=20=20=20= =20movwf=20=20sGPIO=20=20=20=20=20=20=20=20=20=20;=20and=20update=20= shadow=20copy=0D=0A;=0D=0A=20=20=20=20movlw=20=200x01=09=09=20=20=20=20=20= =20;=20set=20rollover=20flag=0D=0A=20=20=20=20movwf=20=20rlovrflag=0D=0A=09= ;=0D=0A=09;-------------------------------------------------=0D=0A=09;=20= now=20our=20one=20second=20event=20is=20all=20done,=20we=20can=20exit=20= the=0D=0A=09;=20interrupt=20handler.=0D=0A=09= ;-------------------------------------------------=0D=0A= ServiceTimer1_end=0D=0A;=20=20=09=09=09=20=20=20=20=20=20=20=20=0D=0A;=20= no=20further=20interrupts=20to=20check=20for=0D=0A;=0D=0AiServ_Exit=0D=0A= ;=0D=0A;=20context=20saving=20is=20not=20necessary=20with=20this=20= program=0D=0A;=0D=0A=20banksel=20=20status_temp=0D=0A=20=20=20=20movf=20=20= status_temp,w=20=20=20;=20retrieve=20copy=20of=20STATUS=20register=0D=0A=20= =20=20movwf=20=20STATUS=20=20=20=20=20=20=20=20=20=20;=20restore=20= pre-isr=20STATUS=20register=20contents=0D=0A=20=20=20swapf=20=20w_temp,f=0D= =0A=20=20=20swapf=20=20w_temp,w=20=20=20=20=20=20=20=20;=20restore=20= pre-isr=20W=20register=20contents=0D=0A;=0D=0A=20=20=20retfie=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20;=20return=20from=20interrupt=0D=0A= ;=0D=0A;=20End=20of=20Interrupt=20Service=20Routine=0D=0A= ;_________________________________________________________________________= __=0D=0A;=0D=0AMAIN=20=20=20CODE=0D=0Amain=0D=0A;=20Start=20PIC_Setup=0D=0A= ;=0D=0A;=20these=20first=204=20instructions=20are=20not=20required=20if=20= =0D=0A;=20the=20internal=20oscillator=20is=20not=20used=0D=0A;=0D=0A=20=20= =20=20call=20=200x3FF=20=20=20=20=20=20=20=20=20=20=20;=20retrieve=20= factory=20calibration=20value=0D=0A=20banksel=20=20OSCCAL=20=20=20=20=20=20= =20=20=20=20;=20select=20register=20bank=20that=20contains=20=0D=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ;=20OSCCAL=20(Bank=201)=20=0D=0A=20=20=20movwf=20=20OSCCAL=20=20=20=20=20= =20=20=20=20=20;=20update=20register=20with=20factory=20cal=20value=20=0D= =0A;=0D=0A;=20***=20Special=20Register=20Initialization=20***********=0D=0A= ;=0D=0A;=20set=20up=20direction=20of=20I/O=20pins=0D=0A=20banksel=20=20= TRISIO=20=20=20=20=20=20=20=20=20=20;=20Bank=201=0D=0A=20=20=20movlw=20=20= b'00000000'=20=0D=0A=20=20;=20=20=20=20=20=20=20=20=20xx------=20=20not=20= implemented=0D=0A=20=20;=20=20=20=20=20=20=20=20=20--0-----=20=20= 0=3Doutput,=20GP5=20=0D=0A=20=20;=20=20=20=20=20=20=20=20=20---0----=20=20= 0=3Doutput,=20GP4=20=0D=0A=20=20;=20=20=20=20=20=20=20=20=20----x---=20=20= not=20used,=20GP3,=20In=20this=20case=20used=20by=20MCLR=0D=0A=20=20;=20=20= =20=20=20=20=20=20=20-----0--=20=200=3Doutput,=20GP2=20=0D=0A=20=20;=20=20= =20=20=20=20=20=20=20------0-=20=200=3Doutput,=20GP1=20=0D=0A=20=20;=20=20= =20=20=20=20=20=20=20-------0=20=200=3Doutput,=20GP0=0D=0A=20=20;=0D=0A=20= =20=20movwf=20=20TRISIO=0D=0A;=0D=0A;=20set=20up=20Option=20Register=0D=0A= =20=20clrwdt=09=09=20=20=20=20=20=20=20=20=20=20;clear=20WDT=20prep=20= prescale=20assign=0D=0A=20banksel=20=20OPTION_REG=20=20=20=20=20=20;=20= Bank=201=0D=0A=20=20=20movlw=20=20b'10000111'=20=20=20=0D=0A=20=20=20=20=20= =20=20=20;=20=20=201-------=20=201=3Ddisabled,=20no=20GPIO=20Pull-ups=20=20= =20=20=20GPPU:=20GPIO=20Pull-ups=20=20=20=20=20=20=0D=0A=20=20=20=20=20=20= =20=20;=20=20=20-0------=20=200=3Dfalling=20edge=20interrupt,=20=20=20=20= =20=20INTEDG:=20Interrupt=20Edge=20of=20GP2=0D=0A=20=20=20=20=20=20=20=20= ;=20=20=20--0-----=20=200=3DInternal=20inst=20clock=20(CLKOUT),=20=20= T0CS:=20TMR0=20Clock=20Source=0D=0A=20=20=20=20=20=20=20=20;=20=20=20= ---0----=20=200=3DInc=20on=20lo^hi=20transition=20on=20GP2,T0SE:=20TMR0=20= Source=20Edge=0D=0A=20=20=20=20=20=20=20=20;=20=20=20----0---=20=20= 0=3DPrescaler=20assigned=20to=20TMR0,=20=20=20=20=20PSA:=20Prescaler=20= Assignment=0D=0A=20=20=20=20=20=20=20=20;=20=20=20-----111=20=20111=20= Prescaler=201:256,=20=20=20=20=20=20=20=20=20=20=20=20PS2-PS0:=20= Prescaler=20Rate=0D=0A=20=20=20=20=20=20=20=20;=20=20=20=20=20=20=20=20=20= =20=20=20=20Bits=20=20TMR0=20=20=20=20WDT=20=20=0D=0A=20=20=20=20=20=20=20= =20;=20=20=20=20=20=20=20=20=20=20=20=20=20000=20=20=20=201:2=20=20=20=20= 1:1=0D=0A=20=20=20=20=20=20=20=20;=20=20=20=20=20=20=20=20=20=20=20=20=20= 001=20=20=20=201:4=20=20=20=201:2=0D=0A=20=20=20=20=20=20=20=20;=20=20=20= =20=20=20=20=20=20=20=20=20=20010=20=20=20=201:8=20=20=20=201:4=0D=0A=20=20= =20=20=20=20=20=20;=20=20=20=20=20=20=20=20=20=20=20=20=20011=20=20=20=20= 1:16=20=20=201:8=0D=0A=20=20=20=20=20=20=20=20;=20=20=20=20=20=20=20=20=20= =20=20=20=20100=20=20=20=201:32=20=20=201:16=0D=0A=20=20=20=20=20=20=20=20= ;=20=20=20=20=20=20=20=20=20=20=20=20=20101=20=20=20=201:64=20=20=201:32=0D= =0A=20=20=20=20=20=20=20=20;=20=20=20=20=20=20=20=20=20=20=20=20=20110=20= =20=20=201:128=20=201:64=0D=0A=20=20=20=20=20=20=20=20;=20=20=20=20=20=20= =20=20=20=20=20=20=20111=20=20=20=201:256=20=201:128=0D=0A=20=20=20movwf=20= =20OPTION_REG=20=20=20=20=20=20=20=20=20=20=20=20=20=20=0D=0A;=0D=0A;=20= set=20up=20comparator=0D=0A=20banksel=20=20CMCON=20=20=20=20=20=20=20=20=20= =20=20;=20Bank=200=0D=0A=20=20=20movlw=20=20b'00000111'=0D=0A=20=20=20=20= =20=20=20=20;=20=20=20x-------=20=20not=20implemented=0D=0A=20=20=20=20=20= =20=20=20;=20=20=20-0------=20=20output=20bit=0D=0A=20=20=20=20=20=20=20=20= ;=20=20=20--x-----=20=20not=20implemented=0D=0A=20=20=20=20=20=20=20=20;=20= =20=20---0----=20=200=3Dnon-inverted=20output=0D=0A=20=20=20=20=20=20=20=20= ;=20=20=20----0---=20=200=3DVin-=20to=20Cin-=0D=0A=20=20=20=20=20=20=20=20= ;=20=20=20-----111=20=20111=3Dcomparator=20off=0D=0A=20=20=20movwf=20=20=20= CMCON=0D=0A;=0D=0A;=20set=20up=20A/D=20converter=0D=0A=20banksel=20=20= ANSEL=20=20=20=20=20=20=20=20=20=20=20;=20Bank=201=0D=0A=20=20=20movlw=20= =20b'00010000'=0D=0A=20=20=20=20=20=20=20=20;=20=20=20x-------=20=20not=20= implemented=0D=0A=20=20=20=20=20=20=20=20;=20=20=20-001----=20=20= 001=3DFocs/8=20Conversion=20Clock=0D=0A=20=20=20=20=20=20=20=20;=20=20=20= ----0---=20=200=3Ddigital=20I/O,=20GP4,=20not=20used=20by=20ADC=0D=0A=20=20= =20=20=20=20=20=20;=20=20=20-----0--=20=200=3Ddigital=20I/O,=20GP2,=20= not=20used=20by=20ADC=0D=0A=20=20=20=20=20=20=20=20;=20=20=20------0-=20=20= 0=3Ddigital=20I/O,=20GP1,=20not=20used=20by=20ADC=0D=0A=20=20=20=20=20=20= =20=20;=20=20=20-------0=20=201=3Danalog=20=20I/O,=20GP0,=20analog=20= input=0D=0A=20=20=20movwf=20=20ANSEL=0D=0A;=20=20=20=20=20=20=20=20=0D=0A= =20banksel=20=20ADCON0=20=20=20=20=20=20=20=20=20=20=20;=20Bank=200=0D=0A= =20=20=20movlw=20=20b'00000000'=0D=0A=20=20=20=20=20=20=20=20;=20=20=20= 0-------=20=200=3Dleft=20justified=20result=0D=0A=20=20=20=20=20=20=20=20= ;=20=20=20-0------=20=200=3DVdd=20is=20voltage=20reference=0D=0A=20=20=20= =20=20=20=20=20;=20=20=20--xx----=20=20not=20implemented=0D=0A=20=20=20=20= =20=20=20=20;=20=20=20----00--=20=2000=3Dselect=20channel=200=20(GP0)=0D=0A= =20=20=20=20=20=20=20=20;=20=20=20------0-=20=200=3DA/D=20conversion=20= not=20started=0D=0A=20=20=20=20=20=20=20=20;=20=20=20-------0=20=200=3DA/D= =20converter=20module=20is=20in=20operation=0D=0A=20=20=20movwf=20=20= ADCON0=0D=0A;=0D=0A;=20initialize=20output=20pins=0D=0A=20banksel=20=20= GPIO=20=20=20=20=20=20=20=20=20=20=20=20;=20Bank=200=0D=0A=20=20=20movlw=20= =20b'00000000'=0D=0A=20=20=20=20=20=20=20=20;=20=20=20xx------=20=20not=20= implemented=0D=0A=20=20=20=20=20=20=20=20;=20=20=20--0-----=20=20= 0=3Doutput=20low,=20GP5,=20=20=20=20=0D=0A=20=20=20=20=20=20=20=20;=20=20= =20---0----=20=200=3Doutput=20low,=20GP4,=20=0D=0A=20=20=20=20=20=20=20=20= ;=20=20=20----x---=20=200=3Doutput,=20GP3,=20In=20this=20case=20used=20= by=20MCLR=0D=0A=20=20=20=20=20=20=20=20;=20=20=20-----0--=20=200=3Doutput=20= low,=20GP2,=20=0D=0A=20=20=20=20=20=20=20=20;=20=20=20------0-=20=20= 0=3Doutput=20low,=20GP1,=20=0D=0A=20=20=20=20=20=20=20=20;=20=20=20= -------0=20=200=3Doutput=20low,=20GP0=0D=0A=20=20=20movwf=20=20GPIO=0D=0A= ;=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=0D=0A;=20initialize=20= interrupts=0D=0A=20=20=20movlw=20=20b'11100000'=0D=0A=20=20=20=20;=20=20=20= =20=20=20=201-------=20=201=3Dinterrupts=20enabled=0D=0A=20=20=20=20;=20=20= =20=20=20=20=20-1------=20=201=3Denable=20peripheral=20interrupts=0D=0A=20= =20=20=20;=20=20=20=20=20=20=20--1-----=20=200=3Ddisable=20TMR0=20= overflow=20interrupt=0D=0A=20=20=20=20;=20=20=20=20=20=20=20---0----=20=20= 0=3Ddisable=20GP2/INT=20external=20interrupt=0D=0A=20=20=20=20;=20=20=20=20= =20=20=20----0---=20=200=3Ddisable=20GPIO=20port=20change=20interrupt=0D=0A= =20=20=20=20;=20=20=20=20=20=20=20=20=20-----0--=20=200=3Dno=20on=20TMR0=20= overflow=20(TM0IF)=0D=0A=20=20=20=20;=20=20=20=20=20=20=20=20=20------0-=20= =200=3Dno=20GP2/INT=20external=20interrupt=0D=0A=20=20=20=20;=20=20=20=20= =20=20=20=20=20-------0=20=200=3Dno=20GPIO=20port=20change=0D=0A=20=20=20= movwf=20=20INTCON=20=20=20=20=20=20=20=20=20=20;=20Both=20Banks=0D=0A;=20= =20=20=20=0D=0A=20banksel=20=20PIE1=20=20=20=20=20=20=20=20=20=20=20=20;=20= Bank=201=0D=0A=20=20=20movlw=20=20b'00000001'=0D=0A=20=20;=20=20=20=20=20= =20=20=20=200-------=20=200=3Ddisable=20EE=20write=20complete=20= interrupt=0D=0A=20=20;=20=20=20=20=20=20=20=20=20-0------=20=200=3Ddisable= =20A/D=20converter=20interrupt=0D=0A=20=20;=20=20=20=20=20=20=20=20=20= --xx----=20=20not=20implemented=0D=0A=20=20;=20=20=20=20=20=20=20=20=20= ----0---=20=200=3Dcomparator=20interrupt=20disabled=0D=0A=20=20;=20=20=20= =20=20=20=20=20=20-----xx-=20=20not=20implemented=0D=0A=20=20;=20=20=20=20= =20=20=20=20=20-------1=20=200=3Denable=20TMR1=20overflow=20interrupt=0D=0A= =20=20=20movwf=20=20PIE1=0D=0A;=20=20=20=20=20=20=20=20=0D=0A=20banksel=20= =20PIR1=20=20=20=20=20=20=20=20=20=20=20=20;=20Bank=200=0D=0A=20=20=20= movlw=20=20b'01000000'=0D=0A=20=20;=20=20=20=20=20=20=20=20=200-------=20= 0=3Dno=20EE=20write=20complete=0D=0A=20=20;=20=20=20=20=20=20=20=20=20= -1------=201=3Dyes=20A/D=20conversion=20complete=0D=0A=20=20;=20=20=20=20= =20=20=20=20=20--xx----=20not=20implemented=0D=0A=20=20;=20=20=20=20=20=20= =20=20=20----0---=200=3Dno=20comparator=20interrupt=0D=0A=20=20;=20=20=20= =20=20=20=20=20=20-----xx-=20not=20implemented=0D=0A=20=20;=20=20=20=20=20= =20=20=20=20-------0=200=3Dno=20TMR1=20overflow=20()TMR1F=0D=0A=20=20=20= movwf=20=20PIR1=0D=0A;=0D=0A;=20initialize=20TMR1=0D=0A=20banksel=20=20= T1CON=20=20=20=20=20=20=20=20=20=20=20;=20Bank=200=0D=0A=20=20=20movlw=20= =20b'00000001'=20=20=20=20=0D=0A=20=20;=20=20=20=20=20=20=20=20=20= x-------=20=20not=20implemented=0D=0A=20=20;=20=20=20=20=20=20=20=20=20= -0------=20=200=3Dgate=20disabled=0D=0A=20=20;=20=20=20=20=20=20=20=20=20= --00----=20=2011=3D1:8=20prescaler,=20=0D=0A=20=20;=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=2010=20=3D=201:4,01=20=3D=201:2,00=20=3D=20= 1:1=20=0D=0A=20=20;=20=20=20=20=20=20=20=20=20----0---=20=200=3DLP=20= oscillator=20is=20off=0D=0A=20=20;=20=20=20=20=20=20=20=20=20-----0--=20=20= 1=3Dexternal=20clock=20input=20not=20synchronized=0D=0A=20=20;=20=20=20=20= =20=20=20=20=20------0-=20=200=3Dinternal=20clock=0D=0A=20=20;=20=20=20=20= =20=20=20=20=20-------1=20=201=3Dtimer=20enabled=0D=0A=20=20=20movwf=20=20= T1CON=0D=0A;=0D=0A;=20PIC=20Register=20Setup=20complete=0D=0A= ;_________________________________________________________________________= _________=0D=0A;=0D=0A;=20initiakize=20Bresenham=20accumulator=0D=0A;=0D=0A= =20=20=20MOVLF=20=200x0F,=20bres_hi=09=09=0D=0A=20=20=20MOVLF=20=200x42,=20= bres_mid=09=0D=0A=20=20=20MOVLF=20=200x40,=20bres_lo=09=09=0D=0A;=20=0D=0A= ;=20jnjtialize=20the=20Port=20shadow=20register=0D=0A=20=20=20=20clrf=20=20= sGPIO=0D=0A;=0D=0AMainLoop:=0D=0A=0D=0A=20=20=20=20goto=20=20MainLoop=20=20= =20=20;=20just=20loop=20here=20foever=0D=0A;=0D=0A;=20End=20of=20Main=0D=0A= ;_________________________________________________________________________= _____=0D=0A;=0D=0A=20=20=20=20=20END=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20;=20directive=20'end=20of=20program'=0D=0A=0D=0A=0D=0A=0D=0A= --Apple-Mail-7-723241918 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed --Apple-Mail-7-723241918 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --Apple-Mail-7-723241918--