Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
LinkBack Thread Tools Display Modes
Old 28th November 2007, 03:26 AM   (permalink)
Default

thanks- I will.

Not WORST case, though- the problem with the eeproms powering down to sleep mode doesnt happen with 7999/1 delays (which was the initial problem). I just need to figure out exatly what it is about this new setup that has allowed it to work- then I can hopefully keep that aspect the same, but fix the display.

Its 2am here- I'll get some sleep and continue tomorrow.

-Thanks again.

-Dal.
dalmation is offline  
Old 28th November 2007, 01:10 PM   (permalink)
Default

Quote:
Originally Posted by Pommie
I think Mikes delay macro cannot handle very low values like 1 and consequently the delay time is very long.
The parameter range for the DelayUS() routine is 16..262159 (it's in the program listing). A parameter of '1' is out of range...

Seems you need to experiment with timing values while trying to figure out just how long and how often you need to drive those bus pins... Mike's (Pommie's) code looks fine though I would do it a little differently.

Code:
;
;  setup ports and display sub-system variables
;
        bsf     STATUS,RP0      ; bank 1                          |B1
        movlw   h'FF'           ;                                 |B1
        movwf   TRISA           ; make Port A all inputs          |B1
        clrf    TRISB           ; make Port B all outputs         |B1
        bcf     STATUS,RP0      ; bank 0                          |B0
        clrf    DigSel          ; init b7 digit select bit        |B0
        movlw   TRISA           ; address TRISA (in bank 1)       |B0
        movwf   FSR             ; setup for indirect access       |B0
;
;  display loop (8 msecs, 50% duty cycle, 62.5 Hz refresh rate)
;
Display
        swapf   PORTA,W         ; W = hi nybble in b3..b0 bits    |B0
        btfss   DigSel,7        ; left digit? yes, skip, else     |B0
        movf    PORTA,W         ; W = lo nybble in b3..b0 bits    |B0
        andlw   b'00001111'     ; mask off upper 4 bits           |B0
        call    SegData         ; get segment data in W           |B0
        iorwf   DigSel,W        ; add digit select bit in b7      |B0
        movwf   PORTB           ; display new digit               |B0
        DelayUS(4000-26)        ; 4-msecs including loop time     |B0
        clrf    PORTA           ; clear PORTA output latch        |B0
        clrf    INDF            ; setup PORTA all outputs         |B0
        DelayUS(4000)           ; 4-msecs                         |B0
        comf    INDF,F          ; setup PORTA all inputs          |B0
        movlw   b'10000000'     ; mask for digit select bit       |B0
        xorwf   DigSel,F        ; toggle b7 digit select bit      |B0
        goto    Display         ; loop forever                    |B0

Last edited by Mike, K8LH; 28th November 2007 at 06:05 PM.
Mike, K8LH is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Using Oscilloscopes mechie Electronic Theory 9 29th November 2007 10:49 PM
driving multiplexed 7 segment display mathur2000 Micro Controllers 7 24th June 2007 11:08 PM
7 Segment Led Clock using PC signal vito3693 Electronic Projects Design/Ideas/Reviews 3 18th April 2007 04:22 AM
4-bit binary to decimal into dual 7 segment displays jupiter669 Electronic Projects Design/Ideas/Reviews 8 15th February 2004 03:06 AM
Convert Leds to 7 Segment Display Almazick General Electronics Chat 21 19th August 2003 08:53 PM



All times are GMT. The time now is 02:09 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker