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 26th July 2008, 11:50 AM   #91
Default

Has anyone checked the outputs to see if this project puts out a square wave?
Flex is offline  
Old 26th July 2008, 12:18 PM   #92
Default

Quote:
Originally Posted by Flex View Post
Found this tread and think this project is really cool.<strike> But i cant seem to compile any of the code. I have tried SourceBoost IDE 6.87 as the compiler.
Is there another compiler i can use or is it a setting thing.
</strike>

Thank You,
Are you getting an error message? Are you using MPLAB as the IDE or the SourceBoost IDE?

Mike
Mike, K8LH is offline  
Old 26th July 2008, 12:19 PM   #93
Default

Quote:
Originally Posted by Flex View Post
Has anyone checked the outputs to see if this project puts out a square wave?
The LED outputs are square waves with a variable duty cycle...

Mike
Mike, K8LH is offline  
Old 26th July 2008, 12:54 PM   #94
Default

Quote:
Originally Posted by Mike, K8LH View Post
Are you getting an error message? Are you using MPLAB as the IDE or the SourceBoost IDE?

Mike
I had the wrong Clock/mHz setting for the chip that was failing to compile.

Also in futz code that has "void reset(void);" was failing, But i changed the name for all the reset(); functions to resetled();/void resetled(void); and works now. It was saying that reset had a body at the line where the rest function was setting all the led's to 0 duty cycle.
it seems that void reset(void ) is "Declared in boostc.h" as "(inline function)“Soft ”resets the CPU.Please note that “soft ”reset may differ
from hardware reset in the way how SFRs get initialised."
and as I read more about system.h its also includes boostc.h so
#include <boostc.h>
is not needed. witch was also in futz's code.

I still need to build this and find a programmer for the chip, est......

But its really cool how u use mostly all the pin and what i see that is different then another one like this is yours has duty cycle
Heres the other 1 like this Look for LED Chaser
Flex is offline  
Old 26th July 2008, 01:50 PM   #95
Default

Sorry you experienced problems. I wonder if you're using the code on something other than a 12F683?

That program on Futz' site includes portions of my program and seems to be missing a lot of the important comments. I'm not sure what that void reset(void) is. It's not in my program.

Anyway, I've attached the last version of my program below which has 64 PWM levels. Please let me know if you have problems.

Mike
Attached Files
File Type: c 12F683_LED_PWM.c (7.6 KB, 32 views)

Last edited by Mike, K8LH; 26th July 2008 at 01:52 PM.
Mike, K8LH is offline  
Old 26th July 2008, 05:55 PM   #96
Default

Quote:
Originally Posted by Flex View Post
Also in futz code that has "void reset(void);" was failing, But i changed the name for all the reset(); functions to resetled();/void resetled(void); and works now. It was saying that reset had a body at the line where the rest function was setting all the led's to 0 duty cycle.
it seems that void reset(void ) is "Declared in boostc.h" as "(inline function)“Soft ”resets the CPU.Please note that “soft ”reset may differ
from hardware reset in the way how SFRs get initialised."
and as I read more about system.h its also includes boostc.h so
#include <boostc.h>
is not needed. witch was also in futz's code.
That's actually pretty much Mike's code, not mine. The line at the top (void reset(void); ) is just an unused function prototype that I accidently left in there when I changed something. Delete the line. It's not doing anything except generate confusion.

I'll edit the page right now and fix that. EDIT: Done. Removed a couple other unnecessary lines as well.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================

Last edited by futz; 26th July 2008 at 06:07 PM.
futz is online now  
Old 27th July 2008, 08:14 AM   #97
Default

Quote:
Originally Posted by Mike, K8LH View Post
Anyway, I've attached the last version of my program below which has 64 PWM levels. Please let me know if you have problems.
You got 64 levels out of it! Great! Guess I'll have a play with it tomorrow.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is online now  
Old 1st September 2008, 05:49 AM   #98
Default

Hi,

Just joined this group so pardon not being upto date on latest things here.

I've been working with Mike over at instructables where there's been quite a lively thread on charliplexing.

http://www.instructables.com/id/Char...s--The-theory/

Anyway, the cylon eye code with trailing Leds is attached, it's Mikes older 16 level code I think. Just replace do_random with do_cylon (or any other patterns in the pattern.c file. Sorry it's not well commented.

Phil
Attached Files
File Type: zip HPCharlie.zip (4.2 KB, 11 views)
rgbphil is offline  
Old 16th September 2008, 06:33 AM   #99
Default

fantastic, seriously. almost the perfect solution for a project i just started. 8 pairs of red/yellow smt leds embedded in a tiny resin block which is poured and dried into a mold as a flame. you should already guess that i intend to make the flames flicker. the red and yellow leds are laid anti-parallel so only one will be on at a given time. with a high enough refresh rate i should be able to more accurately simulate a flame with the mixture of dual colors.

where my project will differ a little is ramping up/down the leds in a quasi-random order.

but first i must receive the tiny13s i ordered and learn how to 'avr' =0
__________________
Gay/geek/firefighter/mechanic/gardner/<insert many things>. Linux software developer/user - Kernel, Apache, PostgreSQL, Sendmail, etc. mostly into digital toys, my analog clue is quite lacking
http://blue-labs.org/ - http://southmeriden-vfd.org/
FirefighterBlu3 is offline  
Old 8th January 2009, 06:16 AM   #100
Default

Yes, i know i am very NEW to this! but i have been using google alot lately for these kind of things, but have one question of how to get C code (never used this type before) to assembly to hex? (think thats right) i have a programmer and everything i have been making other little projects!
THX,
Nick
killer skittle is offline  
Old 8th January 2009, 06:18 AM   #101
Default

Quote:
Originally Posted by killer skittle View Post
how to get C code (never used this type before) to assembly to hex? (think thats right)
What you're looking for is called a C compiler.
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is online now  
Old 8th January 2009, 06:50 AM   #102
Default

Quote:
Originally Posted by futz View Post
What you're looking for is called a C compiler.
So what kind of compilers would you suggest other than BoostC, HATE that program never works for me!
killer skittle is offline  
Old 8th January 2009, 06:55 AM   #103
Default

Quote:
Originally Posted by killer skittle View Post
So what kind of compilers would you suggest other than BoostC, HATE that program never works for me!
On the basis that it works for lots of other people I would respectfully suggest that the problem may be in something you are doing.

Why not give BoostC another go and if you get stuck start a thread on here.

Mike.
Pommie is online now  
Old 8th January 2009, 06:57 AM   #104
Default

Quote:
Originally Posted by killer skittle View Post
So what kind of compilers would you suggest other than BoostC, HATE that program never works for me!
I always recommend BoostC. My favorite PIC compiler. It's real easy to use. Be sure to integrate it into MPLAB and use MPLAB rather than the BoostC IDE. Easier that way, IMHO.

What wouldn't it do for you?
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is online now  
Old 8th January 2009, 07:04 AM   #105
Default



Its probabily a simple fix, but i am kinda new to it



Ohh and NICE website!

Last edited by killer skittle; 8th January 2009 at 07:05 AM.
killer skittle 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 05:10 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker