From PICLIST@MITVMA.MIT.EDU Fri Nov 15 15:49:56 2002 Received: from cherry.ease.lsoft.com [209.119.0.109] by dpmail10.doteasy.com with ESMTP (SMTPD32-7.13) id A82439F013E; Fri, 15 Nov 2002 15:49:56 -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 <8.007DE013@cherry.ease.lsoft.com>; Fri, 15 Nov 2002 18:35:46 -0500 Received: from MITVMA.MIT.EDU by MITVMA.MIT.EDU (LISTSERV-TCP/IP release 1.8d) with spool id 1014 for PICLIST@MITVMA.MIT.EDU; Fri, 15 Nov 2002 18:35:37 -0500 Received: from MITVMA (NJE origin SMTP@MITVMA) by MITVMA.MIT.EDU (LMail V1.2d/1.8d) with BSMTP id 4227; Fri, 15 Nov 2002 18:34:41 -0500 Received: from *unknown [205.152.58.26] by mitvma.mit.edu (IBM VM SMTP Level 320) via TCP with SMTP ; Fri, 15 Nov 2002 18:34:40 EST X-Warning: mitvma.mit.edu: Host *unknown claimed to be imf06bis.bellsouth.net Received: from bigstud ([66.156.161.14]) by imf06bis.bellsouth.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20021115231934.KKHN13544.imf06bis.bellsouth.net@bigstud> for ; Fri, 15 Nov 2002 18:19:34 -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 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Message-ID: <002301c28cfc$e4ea4200$0305a8c0@bigstud.compsecurity.com> Date: Fri, 15 Nov 2002 17:15:18 -0600 Reply-To: pic microcontroller discussion list Sender: pic microcontroller discussion list From: Joseph Thorman Subject: Re: [PIC] First Program Blues. Please Help. To: PICLIST@MITVMA.MIT.EDU In-Reply-To: <3DD4801E.6852F62E@eng.monash.edu.au> X-RCPT-TO: Status: R X-UIDL: 277600747 X-Evolution-Source: pop://mailinglist%40farcite.net@mail.farcite.net/ X-Evolution: 000007af-0000 Thanks, But could you please provide the source in "C" style. Thanks again, Joseph Thorman -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Tony Nixon Sent: Thursday, November 14, 2002 11:03 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC] First Program Blues. Please Help. Heres a simple program you can test with. It assumes you have a 4MHz crystal as a clock source. LED is connected to PORTA pin RA0 All other IO pins are disconnected. ; list P = 16F84A ; include "P16f84A.inc" ; ------------------ ; CONFIGURATION FUSE ; ------------------ ; __CONFIG _CP_OFF & _HS_OSC & _WDT_OFF & _PWRTE_OFF ; ; CRYSTAL SPEED = 4000000Hz ; CBLOCK 0x0C NaHi NaLo NbHi NbLo ENDC ; ; ------------- ; PROGRAM START ; ------------- ; clrf PORTA ; port pins are ALL OUTPUTS LOW clrf PORTB bsf STATUS,RP0 clrf TRISA clrf TRISB bcf STATUS,RP0 MainLoop bsf PORTA,0 ; turn the LED on call Delay ; wait a bit bcf PORTA,0 ; turn the LED off call Delay ; wait a bit goto MainLoop ; keep doing this loop ; ; DELAY SUBROUTINE ; Delay movlw 01h movwf NbHi movlw 03h movwf NbLo movlw 8Ah movwf NaHi movlw 5Bh movwf NaLo DeLoop0 decfsz NaLo,F goto DeLoop0 decfsz NaHi,F goto DeLoop0 decfsz NbLo,F goto DeLoop0 decfsz NbHi,F goto DeLoop0 ; return end -- Best regards Tony mICros http://www.bubblesoftonline.com mailto:sales@bubblesoftonline.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.