Searching \ for '[PIC]: Programming question' 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/devprogs.htm?key=programming
Search entire site for: 'Programming question'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Programming question'
2001\10\14@105630 by Erik Werner

flavicon
face
I am wondering what I'm doing wrong here. Any help appreciated.

1) I just got the PIC16PRO programmer. I put in a blank 16F84 and am able to
erase, blank, etc.

2) Wrote a simple program that flashes two LEDs, like a train signal. Tested
with MPLAB and see the bits oscilating between high and low. (major
acocmplishment *grin*)

3) I try to burn the chip and get the following error.

Program Error

Program: adress=0000 buffer=3000 device=3fff

Why won't this take?

4) Also, if I turn on the config bits and just try to burn the fuses, I get

Verify error
Fuses: Buffer=3ffd device=3fff

Is the pic bad?

Thanks

Erik

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\14@134838 by Dennis Noordsij

flavicon
face
On Sunday 14 October 2001 17:54, you wrote:
{Quote hidden}

I assume that the programmer is a commercial one, i.e. you bought it? Usually
those errors either mean there is a wiring problem somewhere (or a timing
issue with software originally designed for older computers) or (if the
address > 0) the hex file (or config word inside it) is wrong for the PIC you
are programming.

Erase/blank always appears to work (it doesn't need to verify it).

I struggled with this for a while with the NOPPP (search on google for it :)
until I got all the wiring sorted and delayed the program a bit.

Is there any kind of test mode for your programmer device?

Regards,
Dennis





> Thanks
>
> Erik

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\14@135842 by Erik Werner

flavicon
face
part 1 1131 bytes content-type:text/plain; (decoded 7bit)

The programer I got from amazon electronics. It's model 96. The PC is a
laptop running NT. Software is picallw. There is a hardware check built in
the software for pic16's and kit number 96.

attached is my asm file. I don't understand what you mean by if the address
>0

Thanks.

Erik

-------

I assume that the programmer is a commercial one, i.e. you bought it?
Usually
those errors either mean there is a wiring problem somewhere (or a timing
issue with software originally designed for older computers) or (if the
address > 0) the hex file (or config word inside it) is wrong for the PIC
you
are programming.

Erase/blank always appears to work (it doesn't need to verify it).

I struggled with this for a while with the NOPPP (search on google for it :)
until I got all the wiring sorted and delayed the program a bit.

Is there any kind of test mode for your programmer device?

Regards,
Dennis





> Thanks
>
> Erik

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads



part 2 997 bytes content-type:application/octet-stream; (decode)

part 3 154 bytes
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\14@140934 by Tsvetan Usunov

flavicon
face
>I am wondering what I'm doing wrong here. Any help appreciated.
>
>1) I just got the PIC16PRO programmer. I put in a blank 16F84 and am able
to
>erase, blank, etc.
>
>2) Wrote a simple program that flashes two LEDs, like a train signal.
Tested
{Quote hidden}

get
>
>Verify error
>Fuses: Buffer=3ffd device=3fff
>
>Is the pic bad?

Hi Erik,

check if your P16PRO have 330 pf on RB7 and RB6 lines, if not add them
we have schematic on our web site http://www.olimex.com/dev (PIC-PG3) you
can see what and where to add

Best regards
Tsvetan
---
PCB prototypes for $26 at http://run.to/pcb (http://www.olimex.com/pcb)
Development boards for PIC, AVR and MSP430 (http://www.olimex.com/dev)

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\14@142416 by Erik Werner

flavicon
face
C4 (330pf) is installed. C5 is not, but the holes are there. The
documentation that came with the programmer leaves it up to you I guess if
it's needed. Can I get confirmation if I indeed need to solder this cap into
place?

{Original Message removed}

2001\10\14@143208 by Herbert Graf

flavicon
face
       A wild guess, but does your software say it supports NT? TTYL.

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\14@143621 by Erik Werner

flavicon
face
Yep. From the website....

PICALLW WINDOWS software ver 0.10a May 2001 works under Windows 3.1x, 9x,
NT, 2000

{Original Message removed}

2001\10\14@144042 by Erik Werner

flavicon
face
Added C5 (330pf) and it didn't help.


Hi Erik,

check if your P16PRO have 330 pf on RB7 and RB6 lines, if not add them
we have schematic on our web site http://www.olimex.com/dev (PIC-PG3) you
can see what and where to add

Best regards
Tsvetan
---
PCB prototypes for $26 at http://run.to/pcb (http://www.olimex.com/pcb)
Development boards for PIC, AVR and MSP430 (http://www.olimex.com/dev)

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\14@164151 by Tsvetan Usunov

flavicon
face
>C4 (330pf) is installed. C5 is not, but the holes are there. The
>documentation that came with the programmer leaves it up to you I guess if
>it's needed. Can I get confirmation if I indeed need to solder this cap
into
>place?

yes, you should have both capacitors if you want your programmer to work

Best regards
Tsvetan
---
PCB prototypes for $26 at http://run.to/pcb (http://www.olimex.com/pcb)
Development boards for PIC, AVR and MSP430 (http://www.olimex.com/dev)

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\10\14@193247 by Tony Nixon

flavicon
picon face
Erik Werner wrote:
>
> The programer I got from amazon electronics. It's model 96. The PC is a
> laptop running NT. Software is picallw. There is a hardware check built in
> the software for pic16's and kit number 96.
>
> attached is my asm file.


I have made mention of some bugs in you code, and at the end, the code I
would write to overcome them. This may not explain programmer bugs, but
the code should work.


;Erik Werner
;1st PIC tests. FLASH AN LED

       list    p=16F84
       radix   hex
       __config        0x3ffd

You have left the WDT on.

Try using this format which is easier to read...

   __Config  _CP_OFF & _PWRTE_OFF & _WDT_OFF & _XT_OSC


;       #INCLUDE

Include what ????

Perhaps...

    #INCLUDE "P16F84.inc"


       org     0x000

COUNT   equ     0Xfa    ;250 in decimal

You can write COUNT equ d'250' if it's more readable.

PORTB   equ     0X06
PORTA   equ     0x05

If you added the include p16f84.inc, then these ports are already
pre-defined and you don't need to do it.

counter equ     0x0c
;       org     0x004   start of the interupt routine
;

START
       movlw   0x00    ;put zero into W
       movwf   PORTB   ;put w into f
       tris    PORTB   ;make all B-ports output (w)

Microchip recommends not useing TRIS instructions and since PORTA is
also a part of the 16F84, it should also be initialised. If it is not
used, I would set all pins to low outputs and leave them unconnected.


       clrf PORTA      ; all port pins = low
       clrf PORTB

       bsf STATUS,RP0
       clrf TRISA      ; all port pins = outputs
       clrf TRISB
       bcf STATUS,RP0


I would put this line in the PAUSE subroutine.

       movlw   COUNT

       call    OFF
       call    PAUSE
       call    ON
       call    PAUSE

This will cause the PORTS to be re-initialised and you may see 'funny'
results.

       goto    START

ON
       movwf   0x00    ;turn on LED subroutine

This line does not appear to be needed, and would write the W reg data
to the RAM register pointed to by the value in the FSR register - eg.
Indirect Addressing.


       bsf     PORTB,0 ;turn on RB0
       bcf     PORTB,1 ;turn on RB1

It's not wise to use multiple BSF BCF instructions on a PORT. Why not
combine both instructions like this...

       movlw b'00000001'       ; RB0 = on, RB1 = off
       movwf PORTB

       return
OFF
       bcf     PORTB,0 ;turn off RB0
       bsf     PORTB,1 ;turn on RB1

Same here....

       movlw b'00000010'       ; RB0 = off, RB1 = on
       movwf PORTB

       return

PAUSE   movwf   counter         ;pause time.

I would do this...

PAUSE   movlw COUNT
       movwf counter

       decfsz  counter,0

This line will make sure the pause subroutine never exits

       goto    PAUSE

       This line not needed..

       movlw   COUNT

       return

Try...

PAUSE   movlw COUNT
       movwf counter
P_Loop  decfsz counter
       goto P_Loop
       return

       end


You still may not see the LED's flash and this will depend on you
crystal speed. If you are using 4MHz, then you will need to change the
pause subroutine to make it longer.

Something like...

PAUSE   clrf Pause_L
       clrf pause_M
       movlw 3h
       movwf Pause_H
P_Loop  decfsz Pause_L
       goto P_Loop
       decfsz Pause_M
       goto P_Loop
       decfsz Pause_H
       goto P_Loop
       return

You would need to define the new pause registers..

Pause_H equ 0x0C
Pause_M equ 0x0D
Pause_L equ 0x0E

Or let the assembler do it for you like this...

       CBLOCK 0x0C
Pause_H
Pause_M
Pause_L
       ENDC

The CBLOCK statement is explained in the MPASM help file.



Here is the modified code and may now work with the programmer...

;Erik Werner
;2nd PIC tests. FLASH 2 LEDs :-)

       list    p=16F84
       radix   hex

       __Config  _CP_OFF & _PWRTE_OFF & _WDT_OFF & _XT_OSC

      #INCLUDE "P16F84.inc"

       org     0x000
;
; RAM DEFINITIONS
;
       CBLOCK 0x0C
Pause_H
Pause_M
Pause_L
       ENDC
;
; PROGRAM START
;
START
       clrf PORTA      ; all port pins = low
       clrf PORTB

       bsf STATUS,RP0
       clrf TRISA      ; all port pins = outputs
       clrf TRISB
       bcf STATUS,RP0
;
; MAIN PROGRAM LOOP
;
Led_Loop
       call    OFF
       call    PAUSE
       call    ON
       call    PAUSE
       goto    Led_Loop
;
; LED ON SUBROUTINE
;
ON
       movlw b'00000001'       ; RB0 = on, RB1 = off
       movwf PORTB
       return
;
; LED OFF SUBROUTINE
;
OFF
       movlw b'00000010'       ; RB0 = off, RB1 = on
       movwf PORTB
       return
;
; TIME DELAY SUBROUTINE
;
PAUSE   clrf Pause_L
       clrf pause_M
       movlw 3h        ; changing Pause_H, means a coarse
       movwf Pause_H   ; change in time delay
P_Loop  decfsz Pause_L
       goto P_Loop
       decfsz Pause_M
       goto P_Loop
       decfsz Pause_H
       goto P_Loop
       return

       end




--
Best regards

Tony

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

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


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