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 June 2008, 10:44 PM   #46
Default

Replace this part of main() with this new version. Should work better on side by side displays:
Code:
	reset();
	trail[0]=10;trail[1]=8;trail[2]=5;trail[3]=2;trail[4]=1;
	while(1){
		for(x=0;x<10;x++){
			reset();
			led[x]=31;
			led[(x-9)+19]=31;
			for(y=0;y<5;y++){
				if((x-(y+1))>-1)
					led[x-(y+1)]=trail[y];
				if(((x-9)+19)-(y+1)>9)
					led[((x-9)+19)-(y+1)]=trail[y];
			}
			delay_ms(30);
		}
		for(x=9;x>0;x--){
			reset();
			led[x]=31;
			led[(x-9)+19]=31;
			for(y=0;y<5;y++){
				if((x+(y+1))<10)
					led[x+(y+1)]=trail[y];
				if(((x-9)+19)+(y+1)<20)
					led[((x-9)+19)+(y+1)]=trail[y];
			}
			delay_ms(30);
		}
	}
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 29th June 2008, 01:47 AM   #47
Default

Here's my version of the schematic. If you want to use GP3 as an input and still be able to use ICSP then you'll have to add a third switch (or some other means of isolation) to switch between VPP use and input use.
BoostC Charlieplexed PWM 32-12f683_leds.png
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 29th June 2008, 03:55 AM   #48
Default

Whether the connections to R6 and R7 be changed to after the programming switch? It would help in-situ programming, not to have load on the chip pins. The schematic after suggested mod is attached.
By the way I saw another youtube video . i felt it excellent. and link is here

YouTube - 12F683 Bluebox
Attached Thumbnails
BoostC Charlieplexed PWM 32-12f683_leds-mod.png  
__________________
Regards,
Sarma.

Last edited by mvs sarma; 29th June 2008 at 04:08 AM.
mvs sarma is offline  
Old 29th June 2008, 04:09 AM   #49
Default

Quote:
Originally Posted by mvs sarma View Post
Whether the connections to R6 and R7 be changed to after the programming switch? It would help in-situ programming, not to have load on the chip pins. The schematic after suggested mod is attached.
Yes, I thought of that. Already had it wired the other way though, and didn't feel like changing it. Anyway, it works perfect as is, without that change. I'm lazily soldering one together. Guess I'll make that change on the soldered one.


Quote:
Originally Posted by mvs sarma View Post
By the way I saw another u-tube video . i felt it excellent. and link is here

YouTube - 12F683 Bluebox
Ya, I watched that. Nice project.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================

Last edited by futz; 29th June 2008 at 04:11 AM.
futz is offline  
Old 29th June 2008, 05:27 AM   #50
Default

Quote:
Originally Posted by mvs sarma View Post
Whether the connections to R6 and R7 be changed to after the programming switch? It would help in-situ programming, not to have load on the chip pins.
Here it is, Mr. Sarma. Added the third switch as well, so that one last input pin can be used.
BoostC Charlieplexed PWM 32-12f683_leds.png
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 29th June 2008, 08:53 AM   #51
Default

Quote:
Originally Posted by futz View Post
Here it is, Mr. Sarma. Added the third switch as well, so that one last input pin can be used.
Attachment 20072
Nice Futz, ultimate as all pins are now free for use. Great job.

On the trailing lamps project, please imagine the lamps physically mounted in a curve shape and let the trail display . , hope it would simulate a snake motion. ofcourse we may have to mask the board by say a green foil or perspex.
__________________
Regards,
Sarma.
mvs sarma is offline  
Old 29th June 2008, 04:32 PM   #52
Default

Quote:
Originally Posted by futz View Post
Replace this part of main() with this new version. Should work better on side by side displays:
Code:
    reset();
    trail[0]=10;trail[1]=8;trail[2]=5;trail[3]=2;trail[4]=1;
    while(1){
        for(x=0;x<10;x++){
            reset();
            led[x]=31;
            led[(x-9)+19]=31;
            for(y=0;y<5;y++){
                if((x-(y+1))>-1)
                    led[x-(y+1)]=trail[y];
                if(((x-9)+19)-(y+1)>9)
                    led[((x-9)+19)-(y+1)]=trail[y];
            }
            delay_ms(30);
        }
        for(x=9;x>0;x--){
            reset();
            led[x]=31;
            led[(x-9)+19]=31;
            for(y=0;y<5;y++){
                if((x+(y+1))<10)
                    led[x+(y+1)]=trail[y];
                if(((x-9)+19)+(y+1)<20)
                    led[((x-9)+19)+(y+1)]=trail[y];
            }
            delay_ms(30);
        }
    }
Futz,

You've come up with a couple extremely nice "Cylon Eye" examples. Thank you.

I tried to come up with my own version late last night and I'm still stuck. It's much harder than I thought it would be when I casually suggested someone "throw something together" (grin).

Mike
Mike, K8LH is offline  
Old 30th June 2008, 12:13 AM   #53
Default

Mike. I have one little question. How are your LEDs laid out?
00-19
01-18
02-17
03-16
04-15
05-14
06-13
07-12
08-11
09-10

or

00-10
01-11
02-12
03-13
04-14
05-15
06-16
07-17
08-18
09-19

I lean toward the first layout.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 30th June 2008, 12:39 AM   #54
Default

That board was originally a Serial LED Bar/Dot Controller so led 00 is bottom left, 09 is top left, 10 is bottom right, and 19 is top right.

BTW, I completely understand both of your Cylon Eye examples. I was just trying to see if I could come up with something as good or better. Talk about a humbling experience (grin)...

Last edited by Mike, K8LH; 30th June 2008 at 12:43 AM.
Mike, K8LH is offline  
Old 30th June 2008, 06:43 AM   #55
Default

Quote:
Originally Posted by Mike, K8LH View Post
Hi Gayan,

I'm not sure what you mean by "hack my design".

Attached is picture of bottom of board. It contains one surface mount PNP row driver transistor on GP0 (an experiment to increase peak current from 20 ma to around 50 ma).

Mike
Thanks for that Mike.Because I like to know what methods other guys use when they are soldering..........

ahhhhhhhhhhh
This guy has made a UV meter from PIC16F628.Unfortunately I couldn't find any schematic from it.

It also has a fade trail.

YouTube - PIC16F628 64 led bar
__________________
Gayan

My Website
http://gsmicro.blogspot.com/

Last edited by Gayan Soyza; 30th June 2008 at 06:43 AM.
Gayan Soyza is offline  
Old 30th June 2008, 07:17 AM   #56
Default

I finished my permanent Mike-K8LH blinky thing. Works fine and now I can have my breadboard back. Here's a couple pics:



__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 30th June 2008, 10:16 AM   #57
Default

Quote:
Originally Posted by futz View Post
I finished my permanent Mike-K8LH blinky thing. Works fine and now I can have my breadboard back. Here's a couple pics:
Oh! what an wiring effort Futz... looks Good and thanks for the photos.
__________________
Regards,
Sarma.

Last edited by mvs sarma; 30th June 2008 at 10:17 AM.
mvs sarma is offline  
Old 30th June 2008, 11:23 AM   #58
Default

Futz,

Your board looks excellent...

Those PCB mounted slide switches look great. May I ask about Manufacturer, Part Number, Source, please?

You probably could have done away with the switch on GP3. I just added a push button "mode" switch onto my board at GP3 with a pull-up resistor. You can also potentially use GP3 for bit-banged serial receive.

Mike

Last edited by Mike, K8LH; 30th June 2008 at 11:38 AM.
Mike, K8LH is offline  
Old 30th June 2008, 03:23 PM   #59
Default

Quote:
Originally Posted by Mike, K8LH View Post
Those PCB mounted slide switches look great. May I ask about Manufacturer, Part Number, Source, please?
They are Digikey part# EG1903-ND. That's a Canadian link. For US link, click here.

Those switches work great on breadboards too.

Quote:
You probably could have done away with the switch on GP3. I just added a push button "mode" switch onto my board at GP3 with a pull-up resistor. You can also potentially use GP3 for bit-banged serial receive.
True. Could rig a single tact switch to control all three lines. Just hold down to program.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================

Last edited by futz; 30th June 2008 at 03:23 PM.
futz is offline  
Old 30th June 2008, 04:18 PM   #60
Default

Quote:
Originally Posted by futz View Post
Could rig a single tact switch to control all three lines. Just hold down to program.
I don't understand.

You wouldn't need a slide switch at all for GP3 because that would be connected to a normally open push button switch.

How would you connect a single push button switch to disconnect GP0/ICSPDAT and GP1/ICSPCLK from the LED circuitry when you push it and hold it down?
Mike, K8LH is offline  
Reply

Tags
boostc, charlieplexed, pwm

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
BoostC question.. AddressOf Mike, K8LH Micro Controllers 8 25th June 2008 12:20 AM
LCD degree symbol with sprintf (BoostC) futz Micro Controllers 29 5th June 2008 05:19 AM
math.h and lib for BoostC? futz Micro Controllers 3 31st March 2008 06:29 AM
Charlieplexed code segment for the Cricket Thermostat William At MyBlueRoom Micro Controllers 2 14th March 2006 05:12 PM
My PIC Projects Site NEW (includes 2 Charlieplexed Display) William At MyBlueRoom Electronic Projects Design/Ideas/Reviews 0 28th February 2006 02:31 PM



All times are GMT. The time now is 02:13 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker