Maker Pro
Maker Pro

newbie needs some PIC help!

F

Fhyndoh

Jan 1, 1970
0
any help is greatly appreciated poeple, i'm just starting out with PIC
programming, and trying to get an LED to flash from a PIC16F628,

i can get the following to comple in MPLAB IDE without errors
(most code is "borrowed" and modified from other sources
http://www.winpicprog.co.uk/pic_tutorial.htm
and others)

;flasher
LIST p=16F628
include "P16F628.inc"
__config 0x3D18
cblock 0x20
count1
counta
countb
endc

org 0x0000

movlw 0x07
movwf CMCON

bsf STATUS, RP0
movlw B'00000000'
movwf PORTA
movwf PORTB
bcf STATUS, RP0

loop
movlw 0xff
bsf PORTB, 7
bsf PORTA, 7
nop
nop
call Delay
movlw 0x00
bcf PORTA, 7
bcf PORTB, 7
call Delay
goto loop

Delay movlw d'250'
movwf count1
d1 movlw 0xC7
movwf counta
movlw 0x01
movwf countb
Delay_0
decfsz counta, f ; decrease counta by the value of the F
register utill counta =0
goto $ -1
decfsz countb, f
goto Delay_0
decfsz count1, f
goto d1
retlw 0x00

end

but i can't get the resulting hex code into my pic, PICALLW comes up
with a program error message, i'm using a paarallel port "David Tait"
style programmer, i think it's a P16PRO

any help is GREATLY APPRECIATED

Fhyndoh
 
Top