---- START NEW MESSAGE --- Received: from cherry.ease.lsoft.com [209.119.0.109] by dpmail10.doteasy.com with ESMTP (SMTPD32-8.05) id AF6511E001CA; Wed, 28 Jan 2004 19:35:01 -0800 Received: from PEAR.EASE.LSOFT.COM (209.119.0.19) by cherry.ease.lsoft.com (LSMTP for Digital Unix v1.1b) with SMTP id <16.00CC1E6B@cherry.ease.lsoft.com>; Wed, 28 Jan 2004 22:34:50 -0500 Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (LISTSERV-TCP/IP release 1.8e) with spool id 4421 for PICLIST@MITVMA.MIT.EDU; Wed, 28 Jan 2004 22:34:40 -0500 Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail V1.2d/1.8d) with BSMTP id 5570; Wed, 28 Jan 2004 22:34:22 -0500 Received: from mta10.adelphia.net [68.168.78.202] by mitvma.mit.edu (IBM VM SMTP Level 430) via TCP with SMTP ; Wed, 28 Jan 2004 22:34:21 EST X-Comment: mitvma.mit.edu: Mail was sent by mta10.adelphia.net Received: from cowshed.8m.com ([69.161.133.142]) by mta10.adelphia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040129033433.UBVA9070.mta10.adelphia.net@cowshed.8m.com> for ; Wed, 28 Jan 2004 22:34:33 -0500 Received: from ayrshire (ayrshire [192.168.1.10]) by cowshed.8m.com (8.9.3/8.9.3) with ESMTP id XAA21945 for ; Wed, 28 Jan 2004 23:02:26 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: <000001c3e618$82ed4fe0$0a01a8c0@ayrshire> Date: Wed, 28 Jan 2004 22:32:23 -0500 Reply-To: pic microcontroller discussion list Sender: pic microcontroller discussion list From: Anthony Toft Subject: Re: [PIC]: Re: Trouble assembling code for 16F84A To: PICLIST@MITVMA.MIT.EDU In-Reply-To: <40183F76.6050208@optonline.net> Precedence: list X-RCPT-TO: Status: U X-UIDL: 371856197 If you get a copy to me on or off list, I can take a look at it if you'd like. > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Tom Dickinson > Sent: Wednesday, January 28, 2004 6:02 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: [PIC]: Re: Trouble assembling code for 16F84A > > > Dwayne, > Thanks for your advice, and thanks to Westfield, > Hopsfield and others who immediately identified my problem. > After changing the register labels to upper case the code > assembled OK, and after a few tweaks it runs in MPSIM. I > realized I needed a trap for zero divisor and that's > installed and working. I'm assembling parts and soon will > burn a PIC (and maybe crash). > As to context saving, the way the program evolved, global > interrupts are disabled for everything except the three > instructions where the input is polled: > > poll_input btfsc PORTA, 0 > goto count_in > goto poll_input > > count_in bcf INTCON, 7 ;disable global interrupts > > ...etc. > > I don't think there is any sensitive context here to be saved. > After I get this running, I plan to post the code and ask > for a critique of style, bad practice etc. It's about 200 > lines of code, is that too long to post? This is my first > real PIC program, I did a short test program: increment a 16 > bit register using TMR0 interrupt, display either lo byte or > hi byte on LEDs on PORTB, selected by pushbutton input. I > burned this and it worked, so I know I'm on the right track. > > thanks for your help, > Tom > > -- > http://www.piclist.com hint: The list server can filter out > subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics .