Sunday, October 9, 2011

Re: [HamBrewers] Help needed in completing a classic 8digit LED counter kit

 

Thought I might add the reward for hexing me the code(first workable hex) ..... one free LMX2322 freq.divider. Am too busy to study compilers so I'll leave this for you. Please email me the hex and not post in the reflector.

73ees,
Pat

--- On Sun, 10/9/11, patrick_sawian <patrick_pugh2000@yahoo.com> wrote:

From: patrick_sawian <patrick_pugh2000@yahoo.com>
Subject: [HamBrewers] Help needed in completing a classic 8digit LED counter kit
To: HamBrewers@yahoogroups.com
Date: Sunday, October 9, 2011, 4:48 PM

Hi all,

My dual 7217 with 7017 and a 6.5Mhz crystal osc 8 digit counter 3.5 Mhz common anode LED kit blew up with one of the 7217s in smoke. The LEDs did not light up and am hoping to replace the circuitry with a PIC16F84+4051 combination from here:- http://www.qsl.net/y/yo5ofh//pic/digiscale.htm

Could a kind soul help me with hexing the source code from C please for my common anode display please. PIC is 16F84A

    ; 8DGTCACC.INC: 8 digits CA or CC 7-segments LED display
; using conditional assembly

;-------------------- keywords for conditional assembly -----------------

; uncomment only one among these two directives
;#define useCAdisplay        ; if using Common Anode 7-segment display
#define useCCdisplay        ; if using Common Cathode 7-segment display

; uncomment only one among these five directives
;#define PORTX    5        ; if using PORTA (full 8 bits, example: PIC16F628)
#define PORTX    6        ; if using PORTB (any 18 pins mid-range PICmicro)
;#define PORTX    7        ; if using PORTC (any 28 pins mid-range PICmicro)
;#define PORTX    8        ; if using PORTD (any 40 pins mid-range PICmicro)
;#define PORTX    9        ; if using PORTE (any 40 pins mid-range PICmicro)

;------------------------------------------------------------------------
; declare in the main file:
;------------------------------------------------------------------------
;    numdgt            ; .128, then .64, .32, .16, .8, .4, .2, .1
;    rlfcnt            ; .8, then .7, .6, .5, .4, .3, .2, .1
;    affvis            ; ratio display visible
;    dgtvis            ; digit currently displayed
;
;    dgtDS7            ; digit #7 (left most digit)
;    dgtDS6            ; digit #6
;    dgtDS5            ; digit #5
;    dgtDS4            ; digit #4
;    dgtDS3            ; digit #3
;    dgtDS2            ; digit #2
;    dgtDS1            ; digit #1
;    dgtDS0            ; digit #0 (right most digit)
;
;------------------------------------------------------------------------
; macro to prepare input parameters to "Disp" routine
;------------------------------------------------------------------------
DISPDGT    macro    posdgt, dgt
    MOVLW    posdgt
    MOVWF    rlfcnt
    MOVF    dgt, w
    CALL    Disp
    endm

;------------------------------------------------------------------------
config. RBx & CC as outputs, (if Common Cathode), then RBx=HIGH & CC=LOW
;Config. RBx & CA as outputs, (if Common Anode), then RBx=LOW & CA=HIGH
;------------------------------------------------------------------------
SEGx    macro REGx, RBx, jump, configRB, dgtX
    BTFSC dgtX, RBx
    GOTO  jump

#ifdef    useCCdisplay
    BTFSS REGx, RBx        ; conditional assembly

No comments:

Post a Comment