• 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.

pic16f84 or pic16f877, interface with leds

Status
Not open for further replies.

watty

New Member
Ok, I'll explain what I want to do first.

This is the basic circuit I want to modify. http://www.interq.or.jp/japan/se-inoue/e_pic6_1.htm

But, what I want is to be able to control different patterns just like the above circuit, but control more led's that are further away.

I have been told that I could use a 74LS164 serial to parallel (shift register) ic connected to the serial part of the pic, I assume that I would use a pic16f877 as the serail part of these chips is much better?

I want 3 lines of 16 leds I want to be able to specify what line is tunred on and what leds to light up, and be able to light multiple leds, I do realise that if I turn 2 lines on and turn on an led it will light up on both lines, this is ok, but would prefer to be able to turn each one on but trying to keep wires down.

just wondering how do I connect the shift register IC to the pic how do I tell the pic which shift register to use (do they have address's? and if so how many can be used?)

Any help for this project would be great,
Thanks
 

watty

New Member
I forgot to mention that I might be going to use darlington ICs to drive the leds because they are high brightness and use transistors for the lines, just so I don't put too much load on the ICs.

Thanks
 

spiralbrain

New Member
:lol: http://www.zws.com/products/picxie2/index.html take a look at this link mate i am sure this is what u r looking for.This uses the 74HC374 shift register.
Pics can easily control LEDs all u need is a series resistance to limit the current.all PICs have inbuilt buffers that can easily spit 20mA generally required to drive an LED.
 

TheAnimus

New Member
Hi, i would like to say that your probably using the wrong PIC for the job, your just about to add another chip, when u could just add a few more pins to the PIC, try using a PIC16F870.
Same instruction set, slightly more memory space and pins.
Would save messing about with a shift register or Latche(s)!
 

watty

New Member
Yeah I realise that I could do this with a chip easily but I don't want 19 wires running from the controller to the LED's that will be about 9 foot from it.

I can't use multipliers either I don't think because these can only have one turned on at a time, don't know how latching works? if someone could explain that then I might use that idea, but was mainly thinking of the shift registers?

thanks
 

spiralbrain

New Member
well latching can be done using shift registers but it would still require a bit of multiplexing. what u can do is place the shift registers on the led board and send power and serial data to the shift registers from the PIC.
 

watty

New Member
It still doesn't bring down the cable amount that much it's still 12 cables.
I thought there was a way where parallel data could be truned into serial and then back again? or straight from serial to parallel from the pic?

the 74hc374 help me get more led's, thanks, but the main thing I'm trying to do here is bring down the number of cables to about at least 8 but least would be even better.
 
You can do this with 5 I/O on any PIC. Get a serial to 8 Bit Shift register..or if they havea serial to 16 bit evern better, then you only need 4 lines. Each Shift register will have a enable line. you set up logic gate to select between the registers. So on the PIC you would count in Binary 0-2 for 3 16 bit shift reg. or 0-5 on a 8 bit shift reg. then the forth line will be for the serial data you want for the line of LEDs. Oh add one one line for a clock output the the reg.
 

TheAnimus

New Member
with 48 LEDs to refresh, (assuming you use a matrix to drive them) and clock the data out serialy u might get flickering as 6 feet will mean u won't be able to go that fast without good quality cable. If this is about cost cutting on 14 pin ribon cable, personally i can't see any other solution that dosen't involve at least 2 shift resgisters. Because of this another PIC or PLD might be apropriate? is it cost ur fighting, or the 14 wire cable?
 

watty

New Member
OK taking everyones opinions into thought, I have what I think should work, I have a pic on each of the lines of 48 with 16 x 3 matrix, which then connect to a controller pic, this way I can even control which lights are on and which lights are off, I will explain it in more detail once I start making it.

Just got to buy the pics now, any suggestions where to get them from?

Thanks
 

watty

New Member
what do you mean I can get free samples?
Plus I don't think it'll help as I live in Australia.

Thanks anyway
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top