you can try this circuit is to flash a walking led
throug the port B of 16F84 or 16C84 this is the circuit
to 5v
|
to 5v --------- |5k1|
| | |-----------|
|---|10k|---| | 330pF----
|------------| | ----
| | |
| | #
------| | \\
| | |-----|<|---|220|------- to 5v
# | |
| | \\
| |-----|<|---|220|------- to 5v
| |
| |
----------
the 5k1 Ohm and the 330pF is the external RC oscilator
and only show two RB outputs but yhe other are in the
same way. You need to program the PIC for RC Osc.
and Disable the wachdog timer.
this is the assembler code:
;WL_MPASM.ASM WALKING LED PROGRAM FOR MPASM MICROCHIP ;ASSEMBLER
;INVOKED WITH "MPASM WL_MPASM" for PIC16C84!
;BY Felix Centeno.
W EQU 0 ;NEEDED FOR MPASM
F EQU 1
STATUS EQU 03H
STATUS2 EQU 083H
PORTA EQU 05H
PORTB EQU 06H
OPTS EQU 081H
BANKS EQU B'101'
TMR0 EQU 01H
INTCON EQU 0BH
LED EQU 0CH
LED_ON EQU 0FH
DELAY1 EQU 0DH
DELAY2 EQU 0EH
;
LIST P=16F84
ORG 0
GOTO 5 ;JUMP TO START AT ADDRESS 5
ORG 5 ;SETS ORG TO ADDRESS 5
START
MOVLW 00 ;CLEAR W
TRIS PORTB ;SET PORTB TO OUTPUT
MOVWF PORTB ;SET PORT B LOW
WALK
BCF STATUS,1 ; SET TO ONE CARRY
LOOP1
MOVLW 0FFH ; SET BIT OF LEDS RB7-RB4
LOOP
MOVWF PORTB ; ENCIENDE LED
RRF W,0 ;ROTA EL BIT Y ENCIENDE OTRO LED
GOTO LOOP ;SET EL OTRO LED
END
----------
> From: Joachim laforge <cjoachim@HOTMAIL.COM>
> To: PICLIST@MITVMA.MIT.EDU
> Subject: test circuit
> Date: S‡bado 15 de Noviembre de 1997 09:46 PM
>
> Helo All
>
> Can someone point me towards a simple test circuit (with code) so that i
> can test my programmmer.
>
> Thank you
>
> Charles
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com