Matriz led(no soy autor)

Páginas: 17 (4135 palabras) Publicado: 22 de febrero de 2012
;MicroChip pic 16c84 16f84 asm code for propeller clock
;********************************************************CLKSCR2*****************
; TEXTO: .....bienven a electron mendoza
;..........abierto.....
;COPIA DE SCROLLER2 OK .....FINAL 05 2010
;TIMER_INIT ;TOCADO;;;;????????INDEX CAMBIADO ACTIVO BAJO¡¡¡¡¡¡¡¡¡¡¡¡¡
; CAMBIO DECOLOR DE LED : ESTO SUCEDE CUANDO ESTA EN 1 BIT PORTB,7,;HABILITA CAMBIO DE LED HASTA QUE SE VUELVE A ENCONTRAR BIT PORTB,7; previo reset
; de cada vuelta
; EN 1
;-----------------------------------------------------------------
; 3mode.asm ;;;;;;;;
; Copyright Don Zehnder all rights reserved December 1997
;
; Code made for "the propeller clock"
; Copyright Bob Blick all rights reserved February 1997
;
;
; This code give the propeller 3 modes
;; Analog clock mode by Don Zehnder
; Digital mode by Bob Blick
; Scrolling text mode by Don Zehnder
;
; mode 0: digital
; mode 1: analog
; mode 2: message
;
; Assignments on portb. Say, here's a dumb way to hook things up!
; BIT LED (from center=1 to edge=7)
; 0 5
; 1 1
; 2 2
; 3 3
; 4 rotation index input
; 5 4
; 6 7
; 7 6
; hours bit1,2,3,5
; min bit 1,2,3,5,0,7
; seconds bit 6
; time set porta,4
; ~10 MHz crystal
;----------------------------------------------------------------------




list p=16f84
include "p16f84.inc"
__FUSES _CP_OFF & _WDT_ON & _HS_OSC & _PWRTE_OFF

cblock 0x0c
;----unique to analog---
HABLED;DIVISOR1 ;these are to count # of interruptsMCNT;DIVISOR2 ;required to increment ZSEC, decrement DSEC
;DSEC ;There are 256 DSECs in a minute (1 rev)
;ZSEC ;When this rolls over, decrement DMIN
;DMIN ;There are 256 DMINs in an hour (1 rev)
;ZMIN ;When this rolls over, decrement DHOUR
;DHOUR ;There are 256 DHOURs in 12 hours (1 rev)
;mulcnd ; 8 bit multiplicand;H_byte ; High byte of the 16 bit result
;L_byte ; Low byte of the 16 bit result - (unused result)
TEMP ; part of routine for setting hands when period=0

;----unique to digital---
dot_index ;which column is being displayed
digit_index ;which digit is being displayed
;hours ;in display format,not hex(01-12)
;minutes ;00 to 59
;bigtick_dbl ;incremented each interrupt
;bigtick_hi
;bigtick_lo
;scratch ;scratch value
tick ;used by delay
;COUNTER2 ;used as secondary counter to slow time set
;ADJUST ;fine adjust on timing

;---unique to message--------------CT1 ;incremented each interrupt
CT2 ;incremented each interrupt when CT1 rolls-over
CNT ;counter for display of columns in message
MAX ;
OFFSET ;counter for offsetting display. Scrolls by incrementing this

;----common--------------
COUNTER ;used to slow time set
PERIOD_CNT ;incremented eachinterrupt
PERIOD ;stable period after hysteresis calc.
safe_w ;copy of W safe from interrupt
safe_s ;copy of STATUS safe from interrupt
period_dup ;copy of period_count safe from interrupt
flags ;b2=int, b1=minute, b0=prev_flag, b3=mode_bit,b4=toggle
mode
endc

;----ANALOG-----
;#define divisor1_val d'147';roll-over at 109 (256-109)=147
;#define divisor2_val d'235' ;roll-over at 21
;#define zsec_val d'196' ;min hand moves 1/60 fast as sec hand
;#define zmin_val d'244' ;hour hand moves 1/12 fast as min hand
;#define offset_val d'57' ;offset is n/256 rev for analog.
;needed for proper display position
;since we want...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Matriz Led
  • Matriz De Autores
  • matriz de led 8x16 programada
  • Matriz De Autores Del Metodo Biografico
  • Matriz Led
  • MATRIZ DE AUTORES A3 FINAL CORREGIDO
  • Matriz de autores
  • Matriz De Led 8X8

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS