Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Three microcontroller ports drive 12 LEDs :EDN

Status
Not open for further replies.

fever

New Member
hello all,
when i first saw this idea,
**broken link removed**
i ordered pic10f200 without thinking.as i felt it is very much suitable ckt for (tacho with LED's and compact design) my application.
but after reading the comments iam stuck.is this tacho gona work or will it fail as per the commented by a guy(I Ron)
can u guys just confirm this ckt.
thanks
 
thanks guys.
actually i have no knowledge of PIC programming etc.i found this ckt while browsing generally.why i liked it is bcz it looks simple to built and occupies very less space.and the required code is already available.
but the comment (of the right side)
"t is not clear how the design prevents the upper or lower LEDs to turn on when the middle ones are turned on."
made me to post a thread here.
and if u guys know any compact designs of tacho.pls let me know.
thanks once again.
 
3v0 said:
Why use it ?
Use a chip with enough pins to drive a matrix of LEDs.
Agreed, there is a tendency to use undersized PICs (with scads of glue logic) for some reason. I think most of us have done it.

You can drive 12 LEDs with 4 I/O pins, 20 with 5, 30 with 6, 42 with 7 but only one can be on at a time.

Matrix LEDs are discussed here.
 

Attachments

  • PIC Tips & Tricks Hardware Techniques.pdf
    488.5 KB · Views: 249
Last edited:
fever said:
thanks guys.
actually i have no knowledge of PIC programming etc.
Maybe this would be a good reason to start programming !

You would be surprised to feel how satisfying it is to get your first LED to blink.

It is not overly expensive. For about $50 you can build an inchworm kit, a 5V power supply and buy a solderless breadboard etc.
 
Last edited:
blueroomelectronics said:
Agreed, there is a tendency to use undersized PICs (with scads of glue logic) for some reason. I think most of us have done it.

You can drive 12 LEDs with 4 I/O pins, 20 with 5, 30 with 6, 42 with 7 but only one can be on at a time.

Matrix LEDs are discussed here.
All of the LEDs in an N(N-1) or Charlieplexed type matrix can be on at the same time by simply adding column driver transistors.
 
gramo said:
You can drive 12 LED's with a 18 Pin PIC, use all of PORTB (8 Pins), and 4 Pins from PORTA, but it doesn’t leave you with much...

A 28 Pin would be better suited for the job, depending on other requirements
There are a number of ways to multiplex LED displays but the creatively impaired often throw a bigger chip at the problem (grin).
 
thanks for the replies guys.
@3v0 i'll start learning abt mcu's as u said.

actually my problem is we are working on a new design of automotive(college project).where my part is to take care of lighting system and other simple electronics.so i have to finish it and fix it as soon as possible as most of the work is already finished.
i have multi pic programmer(v5.2) for burning pic's.so can i use it for 10f200 or is there any spl type of programmer do i need?

and another thing i observed is similarity between 10f200 and 12f629.it has almost same pins as 10f200(gp0,gp1,gp2,gp3).so can i use the same code with 12f629 with modified circuit?

thanks once again for ur help
 

Attachments

  • 12f629.GIF
    12f629.GIF
    11.7 KB · Views: 900
This is an ouch. Wait till the last minute and then come here asking for somthing ASAP. Sort of sounds fimiilar.

Regarding pins. Microchip has setup its processors so that processors with the same number of pins have the same pinouts. The gotchas are most often that the config bits are different.

The 10f200 processor is a low-range processor and the 12f629 is a mid range processor. It is late at night but I am fairly sure they have different instruction sets.

No I do not think the 12f629 will run 10f200 code.

The source code provided is for the CCS C compiler.

Your best bet is to order the correct chip from Newark. They ship 2nd day for the same price as ground.

You did not fill in you location (bad) so I have no clue where you are. If you are close to Mouser (TX) or DigiKey (MN) you can use UPS ground fromt them in a day or two ( I know this is true of Mouser but have not used DigiKey much of late). I am a state away from Mouser and some orders come in under 24 hours. Mouser has no min order. If you are not in the US you are on your own. Again no location.

Good luck.
 
3v0 said:
This is an ouch. Wait till the last minute and then come here asking for somthing ASAP. Sort of sounds fimiilar.

Regarding pins. Microchip has setup its processors so that processors with the same number of pins have the same pinouts. The gotchas are most often that the config bits are different.

The 10f200 processor is a low-range processor and the 12f629 is a mid range processor. It is late at night but I am fairly sure they have different instruction sets.

No I do not think the 12f629 will run 10f200 code.

The low end PIC's are 12 bit, the mid range are 14 bit (16F series, but also 12F629) - the 14 bit devices are upwards compatible from the 12 bit ones, they just have a couple of extra instructions.

So it should be pretty trivial to convert from 10F to 12F.
 
Nigel Goodwin said:
The low end PIC's are 12 bit, the mid range are 14 bit (16F series, but also 12F629) - the 14 bit devices are upwards compatible from the 12 bit ones, they just have a couple of extra instructions.

So it should be pretty trivial to convert from 10F to 12F.

Thanks Nigel. :eek:
 
ok it seems better to use 10f200 only.i'll get them soon.
and for programming it(multi pic programmer),i did some search on net and found a pcb layout to convert it in to dip type.
**broken link removed**
just scroll down u'll find the layout in a Japanese page.

i compared it against 12f629 for programming.have a look **broken link removed**
i hope it might be useful who are looking for some homemade adapter.
 
gramo said:
BTW, the circuit is putting multiple LED's in reverse bias in some conditions, and that will reduce the life span of the devices each time it occurs.
Please explain how this happens. LEDs are diodes, and the acceptable reverse voltage is given in the data sheet. Are all of the LED data sheets mistaken?
 
Reverse bias can't hurt a diode unless the PN junction temperature is violated. The voltage drop of a diode undergoing zener and/or avalanche effects is higher than a forward biased diode, but as long as the reverse current isn't so high as to violate the devices power rateing nothing bad is going to happen and it doesn't degrade anything that I'm aware of. Devices that use Zener regulation run their diodes reverse biased AND conducting for their entire life.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top