Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 28th May 2009, 08:05 PM   #31
Default

Yes Jason, I think you've got it. Basically we use RB0 and RB1 as column driver lines during display "on" time and retask them for use as DAT and CLK signal lines during display "off" time to load the shift register.

One really neat thing about this method is that you can use a PWM signal on the RCK + EN pins for complete fade-to-black brightness control.

Regards, Mike
Mike, K8LH is offline  
Old 28th May 2009, 08:08 PM   #32
Default

Quote:
Originally Posted by AtomSoft View Post
I must ask sorry to go off topic but what program are you doing that nice drawing in?
I do those sketches using the drawing tools in Microsoft Excel...
Mike, K8LH is offline  
Old 28th May 2009, 08:17 PM   #33
Default

serious? Dude how? info info i have Office 2007 somewhere on dvd here. I gota reinstall that sucka lol

Im learning autocad inventor right now its nice!
AtomSoft is offline  
Old 28th May 2009, 08:26 PM   #34
Default

Jason, you can't be serious. I just saw some sketches you posted the other day that blew my socks off. They were really heavy duty man (LOL)...

Last edited by Mike, K8LH; 28th May 2009 at 08:26 PM.
Mike, K8LH is offline  
Old 28th May 2009, 08:49 PM   #35
Default

im learning the 3d stuff for fun but the Autocad Inventor i want to learn so i can make custom parts like:

Plastic Cases, Connectors and stuff. Like if i was to make something then find out i can make money from it and then have to learn this stuff it would suck because byt the time i learn it its too late so i learn now and be prepared for later even if it doesnt come then i still gained experience.

EDIT:
Thanks! But i like the way those schematics come out. So life like and makes me want to do it lol
Do you have more info on how you do it?

Last edited by AtomSoft; 28th May 2009 at 08:50 PM.
AtomSoft is offline  
Old 29th May 2009, 10:43 AM   #36
Default

Quote:
Originally Posted by Angry Badger View Post
Hi,

I've done away with the latch - I just turn the digit off whilst loading the data.

Code:
;PART OF CODE:    
Main:
    movlw   .7                  ;serial data has to be shifted seven times
    movwf   shift_count     
    movfw   units               ;zero at start-up, incremented later by button
    call    Binaryto7seg        ;get led segment data corresponding to value of 'units'
    movwf   LED1
Shift_bits:
    rrf     LED1
;determine state of data bit  
    btfsc   STATUS,C        ;is the data bit '1'?
    bsf     PORTC,0         ;yes, copy the data bit to the port bit
;data clk        
    bsf     PORTC,1         ;clk pulse low to high shifts data bit into Q0 74HC164
    bcf     PORTC,1         ;clk pulse low
    bcf     PORTC,0         ;set it to '0' if it had been set to '1'
    decfsz  shift_count
    goto    Shift_bits
;turn the digits on/off
    call    Display
;test the switch input    
    btfsc   PORTA,0                 ;is RA0 low (switch pressed)?
    goto    Main                    ;no
;count up    
    incf    units                   ;yes
    movlw   .10
    subwf   units,w
    btfsc   STATUS,Z
    clrf    units
;test the switch input    
    btfsc   PORTA,0                 ;is RA0 high (switch released)?
    goto    Main                    ;yes
    call    Display                 ;no
    goto    $-3                     ;loop until switch released     
 
    goto    Main                    ;no
    
;__________________________________________________________________________________________________________    
   
Display:
;Digit_on_time:
    bsf     PORTC,7         ;Drive the mosfet to show the digit   
    clrf    TMR2
    btfss   T2_done
    goto    $-1
    bcf     T2_done  
;Digit_off_time:    
    bcf     PORTC,7
    clrf    TMR2
    btfss   T2_done
    goto    $-1
    bcf     T2_done
             
    return
Hi Angry Badger,

So CLK = portc.1, DAT = portc.0, and digit1 = portc.7, right? What about digit2? Is it connected to a port pin?

How are you developing your delays?

Mike

Last edited by Mike, K8LH; 29th May 2009 at 10:44 AM.
Mike, K8LH is offline  
Old 29th May 2009, 11:41 AM   #37
Default

By the way Atomsoft, don't install 2 year old software. Download Openoffice if you need to open MS stuff.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."
Sceadwian is online now  
Old 29th May 2009, 08:48 PM   #38
Default

Quote:
Originally Posted by Mike, K8LH View Post
Hi Angry Badger,

So CLK = portc.1, DAT = portc.0, and digit1 = portc.7, right? What about digit2? Is it connected to a port pin?

How are you developing your delays?

Mike
Hello Mike,

Haven't got around to the other digits yet! I'm now in the middle of my 4 x 12 hours work shift pattern so no time for PICs! Will attack the other digits next week.
Angry Badger is offline  
Reply

Tags
74hc164, data, serial

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Sending serial data zenhuynh Electronic Projects Design/Ideas/Reviews 1 24th April 2009 02:38 PM
Difference b/n 74HC164 and 74HC4094? picstudent General Electronics Chat 4 25th February 2009 03:50 AM
74HC164 Shift Register Doubt Gayan Soyza Micro Controllers 15 18th February 2009 03:54 AM
help on serial data transmission srimannarayanakarthik Electronic Projects Design/Ideas/Reviews 3 3rd January 2007 03:01 PM
VB serial data Kane2oo2 Micro Controllers 8 10th November 2003 11:15 PM



All times are GMT. The time now is 06:14 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker