Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

i'm having trouble about my program..,can you plz help me!!

Status
Not open for further replies.

sandy1258

Newbie level 1
Joined
Sep 10, 2011
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,294
can somebody check my program??
because it has many errors...and i don't know what is it
here's my program....thank you!!
please mail me at

DOS
movf Gpr 0,10
call table
movwf portb
call 1sec
inct Gpr 0,f
movf Gpr 0,w
sublw d'16'
btfss 03h,2
Goto $-8
goto Uno

One sec:
call ms ;delay for 1 second
call ms
call ms
call ms
return

One min; movlw d'60' :delay 1min
movwf Grprl
call 1sec
decfsz Grprl,f
goto $-2
Return
mc: movlw P'250'

Nms: movwf Grp3
Mlp: movlw P'248'
call mc
nop
decfsz Gpr3,f
Goto mlp
return

Table ANDLW H'0f'
ADDLW PCL,F
RETLW H'4e'
RETLW H'c0'
RETLW H'47'
RETLW H'86'
RETLW H'07'
RETLW H'87'
RETLW H'06'
RETLW H'a4'
RETLW H'30'
RETLW H'c7'
RETLW H'09'
RETLW H'88'
RETLW H'03'
RETLW H'92'
RETLW H'79'
RETLW H'f9'
END
 

hexreader

Advanced Member level 2
Joined
Apr 7, 2011
Messages
543
Helped
196
Reputation
396
Reaction score
196
Trophy points
1,323
Location
England
Activity points
5,002
I strongly recommend that you complete the gooligum tutorials

here Gooligum Electronics

Your code is completely hopeless, but I have made a wild guess at some kind of improvement, given the limited information.

Code:
    processor 16f628a
    include <p16f628a.inc>
    __config _HS_OSC & _WDT_OFF & _PWRTE_OFF & _CP_OFF
    errorlevel -302

    cblock  0x20
Gpr0
Gprl
Gpr3
mlp
    endc

Uno:
    banksel TRISB
    clrf    TRISB       ; all output
    banksel PORTB
    clrf    PORTB       ; all low

DOS:
    movlw	d'10'
    movwf   Gpr0
    call	Table
    movwf	PORTB
    call	One_sec
    incf	Gpr0,f
    movf	Gpr0,w
    sublw	d'16'
    btfss	03h,2
    Goto	DOS
    goto	Uno

One_sec:
    call	ms	;delay for 1 second
    call	ms
    call	ms
    call	ms
    return

One_min;
	movlw	d'60'	;delay 1min
    movwf	Gprl
mloop:
    call    One_sec
    decfsz	Gprl,f
    goto	mloop
    Return
mc:
	movlw	d'250'

ms:
	movwf	Gpr3
Mlp:
	movlw	d'248'
    call	mc
    nop
    decfsz	Gpr3,f
    Goto	mlp
    return

Table
	ANDLW	H'0f'
    ADDWF	PCL,F
    RETLW	H'4e'
    RETLW	H'c0'
    RETLW	H'47'
    RETLW	H'86'
    RETLW	H'07'
    RETLW	H'87'
    RETLW	H'06'
    RETLW	H'a4'
    RETLW	H'30'
    RETLW	H'c7'
    RETLW	H'09'
    RETLW	H'88'
    RETLW	H'03'
    RETLW	H'92'
    RETLW	H'79'
    RETLW	H'f9'

    END
 

hexreader

Advanced Member level 2
Joined
Apr 7, 2011
Messages
543
Helped
196
Reputation
396
Reaction score
196
Trophy points
1,323
Location
England
Activity points
5,002
Guess the OP got bored, or disappointed that he didn't get a personal email delivered direct to the door :sad:
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top