noob with an idea???

Status
Not open for further replies.

charlie_r

Member
how strange!!

anyway, since i am going to have to get into the PIC game, i thought i might be able to combine a project or two.

I need to know if it would be possible to combine functions of two projects in one PIC.

project 1 is the sequential turn signal, and i'm thinking the wigwag flash here too (see thisthread)
and

project 2 being a speedometer/odometer LCD thing.

don't have a clue how many i/o i would need for this. might have to learn a bit about SMT to get an MCU with enough.

any suggestions?

C
 

Forget learning the PIC really don't compare to AVR if you want something that is easy to use and plenty of grunt go straight for the atmega128.

As for soldering it is simple ... just tack one pin in each corner (use ample flux) then run a bead of solder across each pin don't worry about shorts ....
Once that is done hold PCB upside down and with the iron let the excess solder run back onto the iron tip (clean tip regularly) and carefully check to make sure no shorts remain.... The real trick is use more flux then you think and gravity is your friend !!!

ATmega128 could easly drive 50 leds( all though you want to run them on and off so fast they look as if they are on ) because you dont want to exceed the IC total port current specs... nor waste power ... as for driving the LCD also no problem can easily do such a project with the chip...
 
seveprim said:
Forget learning the PIC really don't compare to AVR if you want something that is easy to use and plenty of grunt go straight for the atmega128.

Choice of a micro-controller is mainly a personal choice, but the PIC is by FAR the most popular, and generally considered the easier to learn (and also has plenty of 'grunt'). But either will easily do the job, as will almost any other micro-controller - and 'grunt' is rarely a concern, mostly they are vastly overpowered for what they do.
 

Yes I agree 90% the time they excuting loops so grunt is not an issue, but when I first started designing the senior engineer said they always want more functions(the customers) so go straight to the top of you price(BOM) for the micro and so you not having to worry where the pin is coming from ... I have to agree with advice as it has saved me many a time from redesigns...
 
I can easily drive 50 LEDs with a 16F627 which costs around £1 here in quantities.

In fact I regularly drive about that quantity of LEDs (well 49 anyway) with them as I use them in my products
 
picbits said:
I can easily drive 50 LEDs with a 16F627 which costs around £1 here in quantities.

In fact I regularly drive about that quantity of LEDs (well 49 anyway) with them as I use them in my products

One of my tutorials uses a 16F628 (same as 627 but 2K of program memory) to drive 64 LED's, it's simple to do.
 
I do realise that you can do a mutiplexed arrangement but I was suggesting a straight brute force approach only to keep it simple for a noob hence the reason to go for pin count over explaining how to mutilplex led (matrix)
 
seveprim said:
I do realise that you can do a mutiplexed arrangement but I was suggesting a straight brute force approach only to keep it simple for a noob hence the reason to go for pin count over explaining how to mutilplex led (matrix)

Not really a very good idea, and you would also need a current limiting resistor for every LED - multiplexing isn't really very difficult. I expect someone to suggest charlie-plexing any moment!
 
Nigel Goodwin said:
One of my tutorials uses a 16F628 (same as 627 but 2K of program memory) to drive 64 LED's, it's simple to do.
I need a couple of spare pins for the RS232 (its on an addressable RS232 bus) so thats the pin count used up for me lmao.

I only use the 627 as I bought a job lot of a thousand or so in surface mount for a very very good price. My choice now would be a 1220/1320 with a serial bootloader but the 627 will suffice until I run out.
 


Didn't some wise engineer just suggest to go with more pins to stop from having to redesign opps that is right it was me !!!lol
 
Nigel Goodwin said:
Not really a very good idea, and you would also need a current limiting resistor for every LED - multiplexing isn't really very difficult. I expect someone to suggest charlie-plexing any moment!

Are grass hopper you forget if you turn on one led very fast(leaving the other off) your slow eye will believe it remains on ... so you could use one common current limiting resistor for all leds driving them in fast sequence arh grass hopper it is not time for you to leave the school !!!!


Please note grasshopper I am not cherring for the one pin per led option I only suggest it to keep the design simple but totally agree in mutiplexing leds ( I have been doing so for years on my elevator floor indicators)
 
Last edited:
seveprim said:
Didn't some wise engineer just suggest to go with more pins to stop from having to redesign opps that is right it was me !!!lol
Wise engineers tend to have more money to spend on pins than poor engineers like me

I buy first and design later .........
 

Except you then need 50 times the current to give a similar brightness, and pulsing the I/O pins with that amount of current isn't going to do them much good?, and probably not the LED's either?. Doesn't seem a very good idea?.
 
Guys-

I have been doing a lot of reading......and have looked at multiplexing and even charlie-plexing.....multiplexing I can understand how it works, sort of. Charlie-plexing is however WAAAAAAAY beyond my understanding right now. It's one thing to read about something and quite another to put into practice what I've read. But I have been known to tackle projects with steep learning curves just to expand my own mind, thusly this set of projects. The writing is on the walls, and has been for many years. I'm just a bit slow to finally see it, LOL.

However, the whole point is that this old dog NEEDS to learn new tricks! And not just for my own projects!

@Nigel- despite my earlier comment (can't remember where), I have been reading your tutorial as well as others before I make a final choice on which way I go.

@Seveprim- as I have not done enough research to satisfy my own needs, I don't know yet which way I'll go....might even go initially with what appears to my untrained eyes as the simplest route...the picaxe, at least just to get my feet wet, and then graduate to the more powerful and - at least for me - more difficult MCUs. As far as m-plex goes, I can see in the programing stuff i've read that it is fairly easy for an experienced programmer to write in changes for each individual pin, I.E. during this cycle you are an input, and during this cycle you are an output for each available pin. I think this is also the basis for charlie-plexing, isn't it? each pin having 3 states available....source, sink, and high impedance (I'm just parroting what I've read, don't know enough yet!!!).

@picbits- I hear ya! Cost is a factor here as well. Not much $$ available here for my project. But we do what we can when we can!

Thanks for all your replies!

C
 
If $$$ are an issue then go with the Microchip PIC. You can get free samples from Microchip (please please please don't abuse this service though as it ruins it for the genuine samplers). Programmers can be knocked up for a couple of $$ from the millions of available "free" programmers.

I'd suggest using something like an 18F1320 to start off with - reasonable amount of pins, easier to program than the 16F series, internal oscillator, less gotchas. If you're sampling then also go for the 18F452 (40 Pin). If you're feeling very adventurous, get hold of a MAX232 and you can make your own bootloader with the 1320 and serial program it in circuit but thats a bit more advanced.

My favourite processor is the 18F1220/1320 for prototyping (and many finished products) - they are just so easy to use and fairly cheap.
 
Nigel Goodwin said:
Except you then need 50 times the current to give a similar brightness, and pulsing the I/O pins with that amount of current isn't going to do them much good?, and probably not the LED's either?. Doesn't seem a very good idea?.


First I am not a fan off the single pin per led ... just stated for the noob ... second LEDs can happily be pulsed at higher currents as I have indicators running 24 hr 365 days for over 6 yrs and never suffered any led failure(80 milliamp pulses that is 4 times the maximun DC rating but the average is far less then 20 ma )

if in doubt look how they drive IR leds on your TV remote(2 amp pulses) thirdly you dont need 50 times the current forth you can always run high brightness leds requires less current for a given brightness ...

and what the hell is charlie plexing .. lol

If you read back you noticed I stated mulitplex is the way to go if you know how ...
 

But that's only FOUR times, you were suggesting pulsing the LED's (and the drivers) at fifty times the current.

if in doubt look how they drive IR leds on your TV remote(2 amp pulses) thirdly you dont need 50 times the current forth you can always run high brightness leds requires less current for a given brightness ...

I'm fully aware of pulsing LED's, and my tutorials even explain it - but you still need 50 times the current for the same brightness if pulsing them at 1/50th duty cycle. If you're comparing high brightness LED's with normal ones, then it would be somewhat less - but if you were using high brighness ones to start with, it's still 50 times the current for the same brightness!.

and what the hell is charlie plexing .. lol

Perhaps you should google it?, or even search here for the many examples of it - I'll give you a clue, a guy called Charlie invented it (or at least is credited for it), I believe he worked for Maxim?.

If you read back you noticed I stated mulitplex is the way to go if you know how ...

Yes, as did I, but then you suggested multiplexing 1x50 to save 49 resistors - which was really getting rather silly?.
 
@picbits- i will probably do the microchip routine, and will build the inchworm+.

Further down the road, I'll also try out the AVR system as well, as I may find apps I want where that would be more suitable. I don't want to be locked into one system.

On further reading about the picaxe, I finally saw that it is the microchip with bootloader already installed, so I assume fuses would be already set, unless I'm still confused. Or is the fuse thing AVR? Must do more reading!!

Next question- For keeping current down, can I connect the output pins to a pair of switching transistors npn (source) & pnp (sink) to handle the higher currents to drive the LEDs?
 
Last edited:
charlie_r said:
Further down the road, I'll also try out the AVR system as well, as I may find apps I want where that would be more suitable. I don't want to be locked into one system.

Warnings: Moving to AVR is a one way street. Very few would turn back to PICs again after the experience.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…