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.