![]() | ![]() | ![]() |
| | |||||||
| 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. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| 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. | |
| |
| | (permalink) | |
| Quote:
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. | ||
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| 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 |