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 11th August 2008, 11:05 PM   #16
Default

O haha I see now wow can't belive I didn't get it untill now basically instead of all the LED subroutines why not just change the bits so that I can light up 3 LED's in one colum with 2 lines of code instead of like 10-15 makes much more sense now and too loop the whole display I would only need to loop 8 lines of code 2 for each colum 1000 times a second makes complete sense now here is what I have so far is this right or am I still doing something wrong hahaha this is the code I have so far for the Name Sam I only have S and A done but im seeing some problems as I will try to tell you don't know how to get around them yet like this for instance lighting up Q4 fully will cause Q3 to light up as well am I correct on this using the following code and you did say you could light up too 3 LED's in each row so here it goes now I only want 10 and 12 lit in Q4 under this is the Code I have so far for Sam once again S and A are done still working on M I also tried to loop it 1000 times don't know if this is the correct way to do so each loop, loops 256 times so I needed 4 loops to get 1000 so its after this little bit of code also when I clarify the Variables at the start of the code for the sc variables can I just put comas between them like so sc,sc1,sc2,sc3 so that I don't have to waste like 10-15 lines just to clarify them

Code:
                movlw	b'010111'	; Letter A Q3 Completly lit
		movwf	GPIO
		call	delay100
		movlw	b'010101'	; Letter A Q4 LED #'s 10,12 lit
		movwf	GPIO
		call	delay100

Code:
Sam
		
		
		clrf	sc			; Sets Counter's loop amount to 256
		clrf	sc1
		clrf	sc2
		clrf	sc3
letS	        movlw	b'000000'	; Clears all LED's to low
		movwf	GPIO
		call	delay100
		movlw	b'010111'	; Letter S Q1 Completly lit
		movwf	GPIO
		call	delay100
		movlw	b'000011'	; Letter S Q2 LED #4 lit
		movwf	GPIO
		call	delay100
		movlw	b'010111'	; Letter S Q3 Completly lit
		movlw	GPIO
		call	delay100
		movlw	b'010111'	; Letter S Q4 Completly lit
		movwf	GPIO
		call	delay100
		decfsz	sc,f		; Inner Loop Counter
		goto	letS
		decfsz	sc1,f		; 1st Middle Loop Counter
		goto	letS
		decfsz	sc2,f
		goto	letS
		decfsz	sc3,f
		goto	letS

Last edited by Darkstar64; 12th August 2008 at 03:41 AM.
Darkstar64 is offline  
Old 14th August 2008, 12:59 AM   #17
Default

Srry for the double post but does this look correct? it loops 1000 times in 1 second using the setup you have also with the same numbers

Last edited by Darkstar64; 14th August 2008 at 03:05 AM.
Darkstar64 is offline  
Reply

Tags
delay, needing, times

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
second times a charm please help wjyates Electronic Projects Design/Ideas/Reviews 2 7th August 2008 11:12 PM
Newbie project, mechanic needing delay timer & more i12v greg123 Electronic Projects Design/Ideas/Reviews 5 23rd March 2008 01:17 AM
Adding 8 Times a 10bit Number Suraj143 Micro Controllers 11 21st February 2008 05:32 AM
alternating flasher with variable on times for each led savarin Electronic Projects Design/Ideas/Reviews 16 13th December 2007 06:15 PM
Why do we use .63 as the times the toatal voltage change... helpmeplz Electronic Projects Design/Ideas/Reviews 7 14th March 2003 12:25 AM



All times are GMT. The time now is 11:09 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker