Searching \ for '[PIC] First Program Blues. Please Help.' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'First Program Blues. Please Help.'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] First Program Blues. Please Help.'
2002\11\14@232915 by Joseph Thorman

flavicon
face
Hello all,

I just got my PICPRO16 programmer in the mail today.  I have been trying
to write a program to turn on/off LED on a pin.

I am using PIC C Lite from Hi-Tech Software.

Could someone provide a simple source code for me to try to compile an
send to a PIC16F84A chip.?

Every time I compile the code that I wrote,  I get a config error when
opening the hex file in PICALLW software.

I go and manual configure the setting in the PICALLW software and tell
it to program,  I get an error saying

Program Error:
Program: address=0000 buffer=183 device=3fff

Thanks, Joseph Thorman

--
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




2002\11\14@235619 by Peter Bennett

flavicon
face
Could be a power supply problem. ie not enough juice.
----- Original Message -----
From: "Joseph Thorman" <spam_OUTthor5601TakeThisOuTspamBELLSOUTH.NET>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Friday, November 15, 2002 3:26 PM
Subject: [PIC] First Program Blues. Please Help.


{Quote hidden}

--
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




2002\11\15@005703 by Tony Nixon

flavicon
picon face
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
salesspamKILLspambubblesoftonline.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.




2002\11\15@183537 by Joseph Thorman

flavicon
face
Thanks,

But could you please provide the source in "C" style.

Thanks again,
Joseph Thorman

{Original Message removed}

2002\11\15@183537 by Joseph Thorman

flavicon
face
Thanks,

But could you please provide the source in "C" style.

Thanks again,
Joseph Thorman

{Original Message removed}

2002\11\17@154720 by Tony Nixon

flavicon
picon face
Joseph Thorman wrote:
>
> Thanks,
>
> But could you please provide the source in "C" style.
>
> Thanks again,
> Joseph Thorman


Sorry, haven't got past ASM.

That was something to use to verify your chip/programmer/circuit.


--
Best regards

Tony

mICros
http://www.bubblesoftonline.com
.....salesKILLspamspam.....bubblesoftonline.com

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...